Commit 3219611a3296922b7925d241513b31df00a45584
1 parent
f8e54dda
fix: vue3 vben codegen dict
Showing
1 changed file
with
16 additions
and
2 deletions
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm
| ... | ... | @@ -53,7 +53,14 @@ export const searchFormSchema: FormSchema[] = [ |
| 53 | 53 | component: 'Select', |
| 54 | 54 | componentProps: { |
| 55 | 55 | #if ("" != $dictType)## 设置了 dictType 数据字典的情况 |
| 56 | - options: getIntDictOptions(DICT_TYPE.$dictType.toUpperCase()) | |
| 56 | + #if ($javaType == "Integer" || $javaType == "Long" || $javaType == "Byte" || $javaType == "Short") | |
| 57 | + #set ($dictMethod = "getIntDictOptions") | |
| 58 | + #elseif ($javaType == "String") | |
| 59 | + #set ($dictMethod = "getStrDictOptions") | |
| 60 | + #elseif ($javaType == "Boolean") | |
| 61 | + #set ($dictMethod = "getBoolDictOptions") | |
| 62 | + #end | |
| 63 | + options: $dictMethod(DICT_TYPE.$dictType.toUpperCase()) | |
| 57 | 64 | #else## 未设置 dictType 数据字典的情况 |
| 58 | 65 | options: [] |
| 59 | 66 | #end |
| ... | ... | @@ -99,7 +106,14 @@ export const formSchema: FormSchema[] = [ |
| 99 | 106 | component: 'Select', |
| 100 | 107 | componentProps: { |
| 101 | 108 | #if ("" != $dictType)## 有数据字典 |
| 102 | - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) | |
| 109 | + #if ($javaType == "Integer" || $javaType == "Long" || $javaType == "Byte" || $javaType == "Short") | |
| 110 | + #set ($dictMethod = "getIntDictOptions") | |
| 111 | + #elseif ($javaType == "String") | |
| 112 | + #set ($dictMethod = "getStrDictOptions") | |
| 113 | + #elseif ($javaType == "Boolean") | |
| 114 | + #set ($dictMethod = "getBoolDictOptions") | |
| 115 | + #end | |
| 116 | + options: $dictMethod(DICT_TYPE.$dictType.toUpperCase()) | |
| 103 | 117 | #else##没数据字典 |
| 104 | 118 | options:[] |
| 105 | 119 | #end | ... | ... |