From d00f8538fd7a1f790373e3c72d8ea4c2cadf7103 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 7 Oct 2025 10:42:04 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90antd=E3=80=91=E3=80=90ele?= =?UTF-8?q?=E3=80=91=E3=80=90member=20=E4=BC=9A=E5=91=98=E3=80=91tag=20?= =?UTF-8?q?=E8=BF=81=E7=A7=BB=20antd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/member/tag/data.ts | 11 +++++++++++ apps/web-antd/src/views/member/tag/index.vue | 13 ++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/apps/web-antd/src/views/member/tag/data.ts b/apps/web-antd/src/views/member/tag/data.ts index c0da8541e..36f3c20e8 100644 --- a/apps/web-antd/src/views/member/tag/data.ts +++ b/apps/web-antd/src/views/member/tag/data.ts @@ -18,6 +18,9 @@ export function useFormSchema(): VbenFormSchema[] { component: 'Input', fieldName: 'name', label: '标签名称', + componentProps: { + placeholder: '请输入标签名称', + }, rules: 'required', }, ]; @@ -30,6 +33,10 @@ export function useGridFormSchema(): VbenFormSchema[] { fieldName: 'name', label: '标签名称', component: 'Input', + componentProps: { + placeholder: '请输入标签名称', + allowClear: true, + }, }, { fieldName: 'createTime', @@ -37,6 +44,7 @@ export function useGridFormSchema(): VbenFormSchema[] { component: 'RangePicker', componentProps: { ...getRangePickerDefaultProps(), + placeholder: ['开始日期', '结束日期'], }, }, ]; @@ -48,14 +56,17 @@ export function useGridColumns(): VxeTableGridOptions['columns'] { { field: 'id', title: '编号', + minWidth: 100, }, { field: 'name', title: '标签名称', + minWidth: 200, }, { field: 'createTime', title: '创建时间', + minWidth: 180, formatter: 'formatDateTime', }, { diff --git a/apps/web-antd/src/views/member/tag/index.vue b/apps/web-antd/src/views/member/tag/index.vue index 03ef962c4..20bc9cd03 100644 --- a/apps/web-antd/src/views/member/tag/index.vue +++ b/apps/web-antd/src/views/member/tag/index.vue @@ -2,7 +2,7 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { MemberTagApi } from '#/api/member/tag'; -import { DocAlert, Page, useVbenModal } from '@vben/common-ui'; +import { Page, useVbenModal } from '@vben/common-ui'; import { message } from 'ant-design-vue'; @@ -19,7 +19,7 @@ const [FormModal, formModalApi] = useVbenModal({ }); /** 刷新表格 */ -function onRefresh() { +function handleRefresh() { gridApi.query(); } @@ -41,10 +41,8 @@ async function handleDelete(row: MemberTagApi.Tag) { }); try { await deleteMemberTag(row.id as number); - message.success({ - content: $t('ui.actionMessage.deleteSuccess', [row.name]), - }); - onRefresh(); + message.success($t('ui.actionMessage.deleteSuccess', [row.name])); + handleRefresh(); } finally { hideLoading(); } @@ -71,6 +69,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ }, rowConfig: { keyField: 'id', + isHover: true, }, toolbarConfig: { refresh: true, @@ -88,7 +87,7 @@ const [Grid, gridApi] = useVbenVxeGrid({ url="https://doc.iocoder.cn/member/user/" /> - +