fix: 字典项为空时getDict方法无限调用接口((无奈兼容 不给字典item本来就是错误用法))
This commit is contained in:
parent
7577f17dd9
commit
6183d22b20
@ -4,6 +4,10 @@
|
|||||||
|
|
||||||
- 通用的vxe-table排序事件(排序逻辑改为在排序事件中处理而非在api处理)
|
- 通用的vxe-table排序事件(排序逻辑改为在排序事件中处理而非在api处理)
|
||||||
|
|
||||||
|
**BUG FIXES**
|
||||||
|
|
||||||
|
- 字典项为空时getDict方法无限调用接口((无奈兼容 不给字典item本来就是错误用法))
|
||||||
|
|
||||||
# 1.1.3
|
# 1.1.3
|
||||||
|
|
||||||
**REFACTOR**
|
**REFACTOR**
|
||||||
|
@ -20,7 +20,14 @@ export function getDict(dictName: string): DictData[] {
|
|||||||
})
|
})
|
||||||
.finally(() => {
|
.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(() => {
|
.finally(() => {
|
||||||
// 移除请求状态缓存
|
// 移除请求状态缓存
|
||||||
dictRequestCache.delete(dictName);
|
/**
|
||||||
|
* 这里主要判断字典item为空的情况(无奈兼容 不给字典item本来就是错误用法)
|
||||||
|
* 会导致if一直进入逻辑导致接口五线刷新
|
||||||
|
* 在这里dictList为空时 不删除缓存
|
||||||
|
*/
|
||||||
|
if (dictOptionList.length > 0) {
|
||||||
|
dictRequestCache.delete(dictName);
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user