From c88794f212f506d69b0228bbb762014c54da13cf Mon Sep 17 00:00:00 2001 From: xingyu Date: Thu, 27 Apr 2023 13:17:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20vue3=20vben=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=94=AF=E6=8C=81=E5=88=9B=E5=BB=BA=E5=92=8C?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=A4=E7=A7=8D=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../codegen/vue3_vben/views/data.ts.vm | 126 +++++++++--------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm index f2784ce46..6c6ae1f38 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3_vben/views/data.ts.vm @@ -154,68 +154,68 @@ export const updateFormSchema: FormSchema[] = [ show: false, component: 'Input' }, - #foreach($column in $columns) - #if ($column.updateOperation) - #set ($dictType = $column.dictType) - #set ($javaField = $column.javaField) - #set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - #set ($comment = $column.columnComment) - #if (!$column.primaryKey)## 忽略主键,不用在表单里 - { - label: '${comment}', - field: '${javaField}', - #if (($column.createOperation || $column.updateOperation) && !$column.nullable && !${column.primaryKey})## 创建或者更新操作 && 要求非空 && 非主键 - required: true, - #end - #if ($column.htmlType == "input") - component: 'Input' - #elseif($column.htmlType == "imageUpload")## 图片上传 - component: 'Upload' - #elseif($column.htmlType == "fileUpload")## 文件上传 - component: 'Upload' - #elseif($column.htmlType == "editor")## 文本编辑器 - component: 'InputTextArea' - #elseif($column.htmlType == "select")## 下拉框 - component: 'Select', - componentProps: { - #if ("" != $dictType)## 有数据字典 - #if ($javaType == "Integer" || $javaType == "Long" || $javaType == "Byte" || $javaType == "Short") - #set ($dictMethod = "getIntDictOptions") - #elseif ($javaType == "String") - #set ($dictMethod = "getStrDictOptions") - #elseif ($javaType == "Boolean") - #set ($dictMethod = "getBoolDictOptions") - #end - options: $dictMethod(DICT_TYPE.$dictType.toUpperCase()) - #else##没数据字典 - options:[] - #end - } - #elseif($column.htmlType == "checkbox")## 多选框 - component: 'Checkbox', - componentProps: { - #if ("" != $dictType)## 有数据字典 - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) - #else##没数据字典 - options:[] - #end - } - #elseif($column.htmlType == "radio")## 单选框 - component: 'Radio', - componentProps: { - #if ("" != $dictType)## 有数据字典 - options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) - #else##没数据字典 - options:[] - #end - } - #elseif($column.htmlType == "datetime")## 时间框 - component: 'DatePicker' - #elseif($column.htmlType == "textarea")## 文本域 - component: 'InputTextArea' - #end - }, - #end +#foreach($column in $columns) +#if ($column.updateOperation) +#set ($dictType = $column.dictType) +#set ($javaField = $column.javaField) +#set ($AttrName = $column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) +#set ($comment = $column.columnComment) +#if (!$column.primaryKey)## 忽略主键,不用在表单里 + { + label: '${comment}', + field: '${javaField}', + #if (($column.createOperation || $column.updateOperation) && !$column.nullable && !${column.primaryKey})## 创建或者更新操作 && 要求非空 && 非主键 + required: true, #end - #end + #if ($column.htmlType == "input") + component: 'Input' + #elseif($column.htmlType == "imageUpload")## 图片上传 + component: 'Upload' + #elseif($column.htmlType == "fileUpload")## 文件上传 + component: 'Upload' + #elseif($column.htmlType == "editor")## 文本编辑器 + component: 'InputTextArea' + #elseif($column.htmlType == "select")## 下拉框 + component: 'Select', + componentProps: { + #if ("" != $dictType)## 有数据字典 + #if ($javaType == "Integer" || $javaType == "Long" || $javaType == "Byte" || $javaType == "Short") + #set ($dictMethod = "getIntDictOptions") + #elseif ($javaType == "String") + #set ($dictMethod = "getStrDictOptions") + #elseif ($javaType == "Boolean") + #set ($dictMethod = "getBoolDictOptions") + #end + options: $dictMethod(DICT_TYPE.$dictType.toUpperCase()) + #else##没数据字典 + options:[] + #end + } + #elseif($column.htmlType == "checkbox")## 多选框 + component: 'Checkbox', + componentProps: { + #if ("" != $dictType)## 有数据字典 + options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + #else##没数据字典 + options:[] + #end + } + #elseif($column.htmlType == "radio")## 单选框 + component: 'Radio', + componentProps: { + #if ("" != $dictType)## 有数据字典 + options: getIntDictOptions(DICT_TYPE.COMMON_STATUS) + #else##没数据字典 + options:[] + #end + } + #elseif($column.htmlType == "datetime")## 时间框 + component: 'DatePicker' + #elseif($column.htmlType == "textarea")## 文本域 + component: 'InputTextArea' + #end + }, +#end +#end +#end ] \ No newline at end of file