src/main/java/com/ruoyi/common/constant/GenConstants.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/vm/vue/index-tree.vue.vm | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/vm/vue/index.vue.vm | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/ruoyi/common/constant/GenConstants.java
@@ -77,7 +77,7 @@ public static final String HTML_DATETIME = "datetime"; /** 上传控件 */ public static final String HTML_UPLOAD_IMAGE = "uploadImage"; public static final String HTML_IMAGE_UPLOAD = "imageUpload"; /** 富文本控件 */ public static final String HTML_EDITOR = "editor"; src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java
@@ -112,10 +112,10 @@ { column.setHtmlType(GenConstants.HTML_SELECT); } // 文件字段设置上传控件 // 图片字段设置单图控件 else if (StringUtils.endsWithIgnoreCase(columnName, "image")) { column.setHtmlType(GenConstants.HTML_UPLOAD_IMAGE); column.setHtmlType(GenConstants.HTML_IMAGE_UPLOAD); } // 内容字段设置富文本控件 else if (StringUtils.endsWithIgnoreCase(columnName, "content")) src/main/resources/vm/vue/index-tree.vue.vm
@@ -153,9 +153,9 @@ <el-form-item label="${comment}" prop="${field}"> <el-input v-model="form.${field}" placeholder="请输入${comment}" /> </el-form-item> #elseif($column.htmlType == "uploadImage") #elseif($column.htmlType == "imageUpload") <el-form-item label="${comment}"> <uploadImage v-model="form.${field}"/> <imageUpload v-model="form.${field}"/> </el-form-item> #elseif($column.htmlType == "editor") <el-form-item label="${comment}"> @@ -244,8 +244,8 @@ import Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; #foreach($column in $columns) #if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "uploadImage") import UploadImage from '@/components/UploadImage'; #if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "imageUpload") import ImageUpload from '@/components/ImageUpload'; #break #end #end @@ -260,8 +260,8 @@ name: "${BusinessName}", components: { #foreach($column in $columns) #if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "uploadImage") UploadImage, #if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "imageUpload") ImageUpload, #break #end #end src/main/resources/vm/vue/index.vue.vm
@@ -185,9 +185,9 @@ <el-form-item label="${comment}" prop="${field}"> <el-input v-model="form.${field}" placeholder="请输入${comment}" /> </el-form-item> #elseif($column.htmlType == "uploadImage") #elseif($column.htmlType == "imageUpload") <el-form-item label="${comment}"> <uploadImage v-model="form.${field}"/> <imageUpload v-model="form.${field}"/> </el-form-item> #elseif($column.htmlType == "editor") <el-form-item label="${comment}"> @@ -274,8 +274,8 @@ <script> import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName}, export${BusinessName} } from "@/api/${moduleName}/${businessName}"; #foreach($column in $columns) #if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "uploadImage") import UploadImage from '@/components/UploadImage'; #if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "imageUpload") import ImageUpload from '@/components/ImageUpload'; #break #end #end @@ -290,8 +290,8 @@ name: "${BusinessName}", components: { #foreach($column in $columns) #if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "uploadImage") UploadImage, #if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "imageUpload") ImageUpload, #break #end #end