系统管理
This commit is contained in:
@@ -139,3 +139,15 @@ export function getDictDataLabel(dictType, value) {
|
||||
const dict = getDictData(dictType, value);
|
||||
return dict ? dict.label : '';
|
||||
}
|
||||
|
||||
// table中用来过滤字典
|
||||
export function publicFormatter(dictTable) {
|
||||
const dictDatas = getDictDatas(dictTable)
|
||||
return function (val) {
|
||||
const arr = {}
|
||||
dictDatas.map((item) => {
|
||||
arr[item.value] = item.label
|
||||
})
|
||||
return arr?.[val]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user