From 8e8dae2f6cc9a8e02c6fa236ff037d000753c488 Mon Sep 17 00:00:00 2001
From: dap <15891557205@163.com>
Date: Thu, 30 Apr 2026 14:39:22 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=AD=97=E5=85=B8?=
=?UTF-8?q?=E9=87=8D=E7=BD=AE=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
apps/web-antd/src/views/system/dict/data/index.vue | 5 +++++
apps/web-antd/src/views/system/dict/index.vue | 5 -----
apps/web-antd/src/views/system/dict/mitt.ts | 1 +
apps/web-antd/src/views/system/dict/type/index.vue | 5 +++++
4 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/apps/web-antd/src/views/system/dict/data/index.vue b/apps/web-antd/src/views/system/dict/data/index.vue
index f60e524d7..2d62192ee 100644
--- a/apps/web-antd/src/views/system/dict/data/index.vue
+++ b/apps/web-antd/src/views/system/dict/data/index.vue
@@ -128,9 +128,14 @@ onMounted(() => {
dictType.value = value;
await tableApi.query();
});
+ emitter.on('reset', async () => {
+ dictType.value = '';
+ await tableApi.reload();
+ });
});
onBeforeUnmount(() => {
emitter.off('rowClick');
+ emitter.off('reset');
});
diff --git a/apps/web-antd/src/views/system/dict/index.vue b/apps/web-antd/src/views/system/dict/index.vue
index 220039e6b..c98d347a4 100644
--- a/apps/web-antd/src/views/system/dict/index.vue
+++ b/apps/web-antd/src/views/system/dict/index.vue
@@ -1,13 +1,8 @@
diff --git a/apps/web-antd/src/views/system/dict/mitt.ts b/apps/web-antd/src/views/system/dict/mitt.ts
index f81c6f550..19ca43a10 100644
--- a/apps/web-antd/src/views/system/dict/mitt.ts
+++ b/apps/web-antd/src/views/system/dict/mitt.ts
@@ -4,6 +4,7 @@ import { mitt } from '@vben/utils';
* dictType: string
*/
type Events = {
+ reset: void;
rowClick: string;
};
diff --git a/apps/web-antd/src/views/system/dict/type/index.vue b/apps/web-antd/src/views/system/dict/type/index.vue
index c23d3c7f7..0072cc35a 100644
--- a/apps/web-antd/src/views/system/dict/type/index.vue
+++ b/apps/web-antd/src/views/system/dict/type/index.vue
@@ -32,6 +32,11 @@ const formOptions: VbenFormProps = {
},
schema: querySchema(),
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3',
+ handleReset: () => {
+ tableApi.formApi.resetForm();
+ tableApi.reload();
+ emitter.emit('reset');
+ },
};
const gridOptions: VxeGridProps = {