From 6a6271d284c0a5ba7b0beeaed419f91dcdde8b34 Mon Sep 17 00:00:00 2001 From: lbw Date: Wed, 18 Oct 2023 15:03:23 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20Fixing=20a=20bug.#5248=20=E3=80=90?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=90=9C=E7=B4=A2=E3=80=91=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E8=A2=AB=E8=BF=BD=E5=8A=A0=E8=87=B3=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E6=A0=91=E7=A7=8D=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/admin/menu/index.vue | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/views/admin/menu/index.vue b/src/views/admin/menu/index.vue index a087df40..0e1e7629 100644 --- a/src/views/admin/menu/index.vue +++ b/src/views/admin/menu/index.vue @@ -6,11 +6,12 @@ - - - {{ $t('common.queryBtn') }} - - + + + {{ $t('common.queryBtn') }} + + {{ $t('common.resetBtn') }} + @@ -102,6 +103,7 @@ const { t } = useI18n(); // 定义变量内容 const tableRef = ref(); const menuDialogRef = ref(); +const queryRef = ref(); const showSearch = ref(true); const isExpand = ref(false); const state: BasicTableProps = reactive({ @@ -144,6 +146,19 @@ const toggleExpand = (children: any[], unfold = true) => { } }; +// 搜索事件 +const query = () => { + state.dataList = []; + getDataList(); +}; + +// 清空搜索条件 +const resetQuery = () => { + queryRef.value.resetFields(); + state.dataList = []; + getDataList(); +}; + // 删除操作 const handleDelete = async (row: any) => { try {