From c320a64c0077b87422a8bc05272cae1957fc6f32 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期二, 05 一月 2021 16:18:26 +0800 Subject: [PATCH] 设置单图上传控件 --- src/main/java/com/ruoyi/common/constant/GenConstants.java | 2 +- src/main/resources/vm/vue/index-tree.vue.vm | 12 ++++++------ src/main/resources/vm/vue/index.vue.vm | 12 ++++++------ src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/ruoyi/common/constant/GenConstants.java b/src/main/java/com/ruoyi/common/constant/GenConstants.java index dbab267..a1de93d 100644 --- a/src/main/java/com/ruoyi/common/constant/GenConstants.java +++ b/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"; diff --git a/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java b/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java index fee9aa5..e530ca4 100644 --- a/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java +++ b/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")) diff --git a/src/main/resources/vm/vue/index-tree.vue.vm b/src/main/resources/vm/vue/index-tree.vue.vm index f12eb2f..d9b6f4d 100644 --- a/src/main/resources/vm/vue/index-tree.vue.vm +++ b/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 diff --git a/src/main/resources/vm/vue/index.vue.vm b/src/main/resources/vm/vue/index.vue.vm index 534012c..ded7e2d 100644 --- a/src/main/resources/vm/vue/index.vue.vm +++ b/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 -- Gitblit v1.9.3