|
@@ -20,13 +20,20 @@ export interface DictDataType {
|
|
|
cssClass: string
|
|
|
}
|
|
|
|
|
|
+export interface NumberDictDataType extends DictDataType {
|
|
|
+ value: number
|
|
|
+}
|
|
|
+
|
|
|
export const getDictOptions = (dictType: string) => {
|
|
|
return dictStore.getDictByType(dictType) || []
|
|
|
}
|
|
|
|
|
|
-export const getIntDictOptions = (dictType: string): DictDataType[] => {
|
|
|
- const dictOption: DictDataType[] = []
|
|
|
+export const getIntDictOptions = (dictType: string): NumberDictDataType[] => {
|
|
|
+ // č·å¾éēØē DictDataType å蔨
|
|
|
const dictOptions: DictDataType[] = getDictOptions(dictType)
|
|
|
+ // 转ę¢ę number ē±»åē NumberDictDataType ē±»å
|
|
|
+ // why éč¦ē¹ę®č½¬ę¢ļ¼éæå
IDEA åØ v-for="dict in getIntDictOptions(...)" ę¶ļ¼el-option ē key ä¼åč¦
|
|
|
+ const dictOption: NumberDictDataType[] = []
|
|
|
dictOptions.forEach((dict: DictDataType) => {
|
|
|
dictOption.push({
|
|
|
...dict,
|