This commit is contained in:
zhang zhuo 2025-12-26 11:39:46 +08:00
parent c1ad9148d7
commit 4a70c7e7e5
1 changed files with 6 additions and 5 deletions

View File

@ -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() {