Commit 85047bca7b6ad145bc902c0686e54180b4cf15c3
1 parent
69ebfbe1
feat: vben dict
Showing
1 changed file
with
8 additions
and
8 deletions
yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm
| 1 | import { BasicColumn, FormSchema, useRender } from '@/components/Table' | 1 | import { BasicColumn, FormSchema, useRender } from '@/components/Table' |
| 2 | -import { DICT_TYPE, getDictOpts } from '@/utils/dict' | 2 | +import { DICT_TYPE, getDictOptions } from '@/utils/dict' |
| 3 | 3 | ||
| 4 | export const columns: BasicColumn[] = [ | 4 | export const columns: BasicColumn[] = [ |
| 5 | #foreach($column in $columns) | 5 | #foreach($column in $columns) |
| @@ -53,7 +53,7 @@ export const searchFormSchema: FormSchema[] = [ | @@ -53,7 +53,7 @@ export const searchFormSchema: FormSchema[] = [ | ||
| 53 | component: 'Select', | 53 | component: 'Select', |
| 54 | componentProps: { | 54 | componentProps: { |
| 55 | #if ("" != $dictType)## 设置了 dictType 数据字典的情况 | 55 | #if ("" != $dictType)## 设置了 dictType 数据字典的情况 |
| 56 | - options: getDictOpts(DICT_TYPE.$dictType.toUpperCase()) | 56 | + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase()) |
| 57 | #else## 未设置 dictType 数据字典的情况 | 57 | #else## 未设置 dictType 数据字典的情况 |
| 58 | options: [] | 58 | options: [] |
| 59 | #end | 59 | #end |
| @@ -107,7 +107,7 @@ export const createFormSchema: FormSchema[] = [ | @@ -107,7 +107,7 @@ export const createFormSchema: FormSchema[] = [ | ||
| 107 | component: 'Select', | 107 | component: 'Select', |
| 108 | componentProps: { | 108 | componentProps: { |
| 109 | #if ("" != $dictType)## 有数据字典 | 109 | #if ("" != $dictType)## 有数据字典 |
| 110 | - options: getDictOpts(DICT_TYPE.$dictType.toUpperCase()) | 110 | + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number') |
| 111 | #else##没数据字典 | 111 | #else##没数据字典 |
| 112 | options:[] | 112 | options:[] |
| 113 | #end | 113 | #end |
| @@ -116,7 +116,7 @@ export const createFormSchema: FormSchema[] = [ | @@ -116,7 +116,7 @@ export const createFormSchema: FormSchema[] = [ | ||
| 116 | component: 'Checkbox', | 116 | component: 'Checkbox', |
| 117 | componentProps: { | 117 | componentProps: { |
| 118 | #if ("" != $dictType)## 有数据字典 | 118 | #if ("" != $dictType)## 有数据字典 |
| 119 | - options: getDictOpts(DICT_TYPE.$dictType.toUpperCase()) | 119 | + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number') |
| 120 | #else##没数据字典 | 120 | #else##没数据字典 |
| 121 | options:[] | 121 | options:[] |
| 122 | #end | 122 | #end |
| @@ -125,7 +125,7 @@ export const createFormSchema: FormSchema[] = [ | @@ -125,7 +125,7 @@ export const createFormSchema: FormSchema[] = [ | ||
| 125 | component: 'Radio', | 125 | component: 'Radio', |
| 126 | componentProps: { | 126 | componentProps: { |
| 127 | #if ("" != $dictType)## 有数据字典 | 127 | #if ("" != $dictType)## 有数据字典 |
| 128 | - options: getDictOpts(DICT_TYPE.$dictType.toUpperCase()) | 128 | + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number') |
| 129 | #else##没数据字典 | 129 | #else##没数据字典 |
| 130 | options:[] | 130 | options:[] |
| 131 | #end | 131 | #end |
| @@ -173,7 +173,7 @@ export const updateFormSchema: FormSchema[] = [ | @@ -173,7 +173,7 @@ export const updateFormSchema: FormSchema[] = [ | ||
| 173 | component: 'Select', | 173 | component: 'Select', |
| 174 | componentProps: { | 174 | componentProps: { |
| 175 | #if ("" != $dictType)## 有数据字典 | 175 | #if ("" != $dictType)## 有数据字典 |
| 176 | - options: getDictOpts(DICT_TYPE.$dictType.toUpperCase()) | 176 | + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number') |
| 177 | #else##没数据字典 | 177 | #else##没数据字典 |
| 178 | options:[] | 178 | options:[] |
| 179 | #end | 179 | #end |
| @@ -182,7 +182,7 @@ export const updateFormSchema: FormSchema[] = [ | @@ -182,7 +182,7 @@ export const updateFormSchema: FormSchema[] = [ | ||
| 182 | component: 'Checkbox', | 182 | component: 'Checkbox', |
| 183 | componentProps: { | 183 | componentProps: { |
| 184 | #if ("" != $dictType)## 有数据字典 | 184 | #if ("" != $dictType)## 有数据字典 |
| 185 | - options: getDictOpts(DICT_TYPE.$dictType.toUpperCase()) | 185 | + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number') |
| 186 | #else##没数据字典 | 186 | #else##没数据字典 |
| 187 | options:[] | 187 | options:[] |
| 188 | #end | 188 | #end |
| @@ -191,7 +191,7 @@ export const updateFormSchema: FormSchema[] = [ | @@ -191,7 +191,7 @@ export const updateFormSchema: FormSchema[] = [ | ||
| 191 | component: 'Radio', | 191 | component: 'Radio', |
| 192 | componentProps: { | 192 | componentProps: { |
| 193 | #if ("" != $dictType)## 有数据字典 | 193 | #if ("" != $dictType)## 有数据字典 |
| 194 | - options: getDictOpts(DICT_TYPE.$dictType.toUpperCase()) | 194 | + options: getDictOptions(DICT_TYPE.$dictType.toUpperCase(), 'number') |
| 195 | #else##没数据字典 | 195 | #else##没数据字典 |
| 196 | options:[] | 196 | options:[] |
| 197 | #end | 197 | #end |