chore: 注释
This commit is contained in:
parent
e91eb2492a
commit
6e6f5cb096
@ -15,10 +15,8 @@ export function getDict(dictName: string): DictData[] {
|
|||||||
const { getDict, setDictInfo } = useDictStore();
|
const { getDict, setDictInfo } = useDictStore();
|
||||||
// 这里拿到
|
// 这里拿到
|
||||||
const dictList = getDict(dictName);
|
const dictList = getDict(dictName);
|
||||||
if (
|
// 检查请求状态缓存
|
||||||
dictList.length === 0 && // 检查请求状态缓存
|
if (dictList.length === 0 && !dictRequestCache.has(dictName)) {
|
||||||
!dictRequestCache.has(dictName)
|
|
||||||
) {
|
|
||||||
dictRequestCache.set(
|
dictRequestCache.set(
|
||||||
dictName,
|
dictName,
|
||||||
dictDataInfo(dictName).then((resp) => {
|
dictDataInfo(dictName).then((resp) => {
|
||||||
@ -36,10 +34,8 @@ export function getDict(dictName: string): DictData[] {
|
|||||||
export function getDictOptions(dictName: string): Option[] {
|
export function getDictOptions(dictName: string): Option[] {
|
||||||
const { getDictOptions, setDictInfo } = useDictStore();
|
const { getDictOptions, setDictInfo } = useDictStore();
|
||||||
const dictOptionList = getDictOptions(dictName);
|
const dictOptionList = getDictOptions(dictName);
|
||||||
if (
|
// 检查请求状态缓存
|
||||||
dictOptionList.length === 0 && // 检查请求状态缓存
|
if (dictOptionList.length === 0 && !dictRequestCache.has(dictName)) {
|
||||||
!dictRequestCache.has(dictName)
|
|
||||||
) {
|
|
||||||
dictRequestCache.set(
|
dictRequestCache.set(
|
||||||
dictName,
|
dictName,
|
||||||
dictDataInfo(dictName).then((resp) => {
|
dictDataInfo(dictName).then((resp) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user