From efbec1a0cc07c4b3fc2ed563d659d174ba491e14 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 21 Dec 2025 18:03:26 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90system=E3=80=91=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=AD=97=E5=85=B8=E7=9A=84=20dictType=20=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=EF=BC=8C=E6=94=AF=E6=8C=81=E9=87=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages-system/dict/components/data-list.vue | 9 --------- src/pages-system/dict/components/data-search-form.vue | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/pages-system/dict/components/data-list.vue b/src/pages-system/dict/components/data-list.vue index 36e0719..1376e62 100644 --- a/src/pages-system/dict/components/data-list.vue +++ b/src/pages-system/dict/components/data-list.vue @@ -91,7 +91,6 @@ const loadMoreState = ref('loading') const queryParams = ref({ pageNo: 1, pageSize: 10, - dictType: undefined as string | undefined, }) /** 颜色类型 => wd-tag 的 type 映射,和 src/components/dict-tag/dict-tag.vue 是一致的 */ @@ -111,11 +110,6 @@ function getTagType(colorType: string): TagType { /** 查询列表 */ async function getList() { - if (!queryParams.value.dictType) { - list.value = [] - loadMoreState.value = 'finished' - return - } loadMoreState.value = 'loading' try { const data = await getDictDataPage(queryParams.value) @@ -134,7 +128,6 @@ function handleQuery(data?: Record) { ...data, pageNo: 1, pageSize: queryParams.value.pageSize, - dictType: data?.dictType || props.dictType, } list.value = [] getList() @@ -174,7 +167,6 @@ watch( () => { if (props.dictType) { queryParams.value.pageNo = 1 - queryParams.value.dictType = props.dictType list.value = [] getList() } @@ -188,7 +180,6 @@ onReachBottom(() => { /** 初始化 */ onMounted(() => { - queryParams.value.dictType = props.dictType getList() }) diff --git a/src/pages-system/dict/components/data-search-form.vue b/src/pages-system/dict/components/data-search-form.vue index 7b95738..943bdc5 100644 --- a/src/pages-system/dict/components/data-search-form.vue +++ b/src/pages-system/dict/components/data-search-form.vue @@ -121,7 +121,7 @@ function handleSearch() { /** 重置 */ function handleReset() { - formData.dictType = props.dictType + formData.dictType = undefined formData.label = undefined formData.status = -1 visible.value = false