fix: error

This commit is contained in:
xingyu4j
2022-11-15 13:59:22 +08:00
parent a701c1d76c
commit c7972f9a06
8 changed files with 31 additions and 25 deletions

View File

@ -15,19 +15,16 @@ const dictStore = useDictStoreWithOut()
export interface DictDataType {
dictType: string
label: string
value: string | number | boolean
colorType?: ElementPlusInfoType | '' | 'default' | 'primary'
cssClass?: string
value: string | number
colorType: ElementPlusInfoType | '' | 'default' | 'primary'
cssClass: string
}
export const getDictOptions = (dictType: string) => {
const dictOptions: DictDataType[] = []
dictStore.getDictMap.forEach((dict: DictDataType) => {
if (dict.dictType.toString() === dictType) {
dictOptions.push({
...dict,
value: dict.value
})
if (dict.dictType + '' === dictType) {
dictOptions.push(dict)
}
})
return dictOptions