fix: 字典项为空时getDict方法无限调用接口((无奈兼容 不给字典item本来就是错误用法))

master
dap 1 year ago
parent 7577f17dd9
commit 6183d22b20

@ -4,6 +4,10 @@
- 通用的vxe-table排序事件(排序逻辑改为在排序事件中处理而非在api处理)
**BUG FIXES**
- 字典项为空时getDict方法无限调用接口((无奈兼容 不给字典item本来就是错误用法))
# 1.1.3
**REFACTOR**

@ -20,7 +20,14 @@ export function getDict(dictName: string): DictData[] {
})
.finally(() => {
// 移除请求状态缓存
dictRequestCache.delete(dictName);
/**
* item( item)
* if
* dictList
*/
if (dictList.length > 0) {
dictRequestCache.delete(dictName);
}
}),
);
}
@ -42,7 +49,14 @@ export function getDictOptions(dictName: string): Option[] {
})
.finally(() => {
// 移除请求状态缓存
dictRequestCache.delete(dictName);
/**
* item( item)
* if线
* dictList
*/
if (dictOptionList.length > 0) {
dictRequestCache.delete(dictName);
}
}),
);
}

Loading…
Cancel
Save