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