From 4a70c7e7e5066ca73b22281b81ad919b68a55873 Mon Sep 17 00:00:00 2001 From: zhang zhuo Date: Fri, 26 Dec 2025 11:39:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/piDictText/index.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/piDictText/index.vue b/src/components/piDictText/index.vue index 174b34b..9eacae7 100644 --- a/src/components/piDictText/index.vue +++ b/src/components/piDictText/index.vue @@ -22,7 +22,6 @@ let defaultValue = ref({}) onMounted(() => { getData() - getDictLabel() }) function getDictLabel() { @@ -36,9 +35,10 @@ async function getData() { if (cacheKey) { const data = tools.data.get(cacheKey) if (data) { - tableData.value = data; - loading.value = false; - return; + tableData.value = data + loading.value = false + getDictLabel() + return } } const res = await dictConfig.api({key: props.type}); @@ -46,7 +46,8 @@ async function getData() { if (cacheKey) { tools.data.set(cacheKey, res.data, 7200) } - loading.value = false; + loading.value = false + getDictLabel() } function genCacheKey() {