We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cdcd98 commit 9307d08Copy full SHA for 9307d08
web/src/utils/dictionary.js
@@ -5,3 +5,15 @@ export const getDict = async(type) => {
5
await dictionaryStore.getDictionary(type)
6
return dictionaryStore.dictionaryMap[type]
7
}
8
+
9
+// 字典文字展示方法
10
+export const showDictLabel = (dict, code) => {
11
+ if (!dict) {
12
+ return ''
13
+ }
14
+ const dictMap = {}
15
+ dict.forEach(item => {
16
+ dictMap[item.value] = item.label
17
+ })
18
+ return dictMap[code]
19
+}
0 commit comments