fix: dict

pull/4/MERGE
xingyuv 2023-04-14 15:49:14 +08:00
parent f2ef97517f
commit f4bff0c836
2 changed files with 1 additions and 4 deletions

View File

@ -50,9 +50,6 @@ export const useRender = {
}
},
renderDict: (text, type, dictType?) => {
if (!text) {
return ''
}
if (type) {
return h(DictTag, {
type: type,

View File

@ -68,7 +68,7 @@ export const getBoolDictOptions = (dictType: string) => {
export const getDictObj = (dictType: string, value: any) => {
const dictOptions: DictDataType[] = getDictOptions(dictType)
if (dictOptions && dictOptions.length > 0) {
if (dictOptions) {
dictOptions.forEach((dict: DictDataType) => {
if (dict.value === value.toString()) {
return dict