From ab09b7c67ec5d1549dae0b6a073814f2f515263c Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 11 Feb 2021 18:06:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=20vue=20=E7=9A=84=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0/=E4=BF=AE=E6=94=B9=E8=A1=A8=E5=8D=95=E9=83=A8?= =?UTF-8?q?=E5=88=86=E7=9A=84=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/FileUpload/index.vue | 179 ++++++++++++++++++ ruoyi-ui/src/components/ImageUpload/index.vue | 100 ++++++++++ .../resources/codegen/vue/views/index.vue.vm | 74 +++----- 3 files changed, 304 insertions(+), 49 deletions(-) create mode 100644 ruoyi-ui/src/components/FileUpload/index.vue create mode 100644 ruoyi-ui/src/components/ImageUpload/index.vue diff --git a/ruoyi-ui/src/components/FileUpload/index.vue b/ruoyi-ui/src/components/FileUpload/index.vue new file mode 100644 index 000000000..69942aa08 --- /dev/null +++ b/ruoyi-ui/src/components/FileUpload/index.vue @@ -0,0 +1,179 @@ + + + + + \ No newline at end of file diff --git a/ruoyi-ui/src/components/ImageUpload/index.vue b/ruoyi-ui/src/components/ImageUpload/index.vue new file mode 100644 index 000000000..8996329a6 --- /dev/null +++ b/ruoyi-ui/src/components/ImageUpload/index.vue @@ -0,0 +1,100 @@ + + + + + \ No newline at end of file diff --git a/src/main/resources/codegen/vue/views/index.vue.vm b/src/main/resources/codegen/vue/views/index.vue.vm index f0568f93f..95751b63a 100644 --- a/src/main/resources/codegen/vue/views/index.vue.vm +++ b/src/main/resources/codegen/vue/views/index.vue.vm @@ -20,7 +20,7 @@ #if ("" != $dictType)## 设置了 dictType 数据字典的情况 + :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue"/> #else## 未设置 dictType 数据字典的情况 #end @@ -116,80 +116,56 @@ #end -#elseif($column.htmlType == "imageUpload") +#elseif($column.htmlType == "imageUpload")## 图片上传 -#elseif($column.htmlType == "fileUpload") +#elseif($column.htmlType == "fileUpload")## 文件上传 -#elseif($column.htmlType == "editor") +#elseif($column.htmlType == "editor")## 文本编辑器 -#elseif($column.htmlType == "select" && "" != $dictType) - - - - - -#elseif($column.htmlType == "select" && $dictType) +#elseif($column.htmlType == "select")## 下拉框 + #if ("" != $dictType)## 有数据字典 + + #else##没数据字典 + #end -#elseif($column.htmlType == "checkbox" && "" != $dictType) - - - - {{dict.dictLabel}} - - - -#elseif($column.htmlType == "checkbox" && $dictType) +#elseif($column.htmlType == "checkbox")## 多选框 + #if ("" != $dictType)## 有数据字典 + {{dict.label}} + #else##没数据字典 请选择字典生成 + #end -#elseif($column.htmlType == "radio" && "" != $dictType) - - - {{dict.dictLabel}} - - -#elseif($column.htmlType == "radio" && $dictType) +#elseif($column.htmlType == "radio")## 单选框 + #if ("" != $dictType)## 有数据字典 + {{dict.label}} + #else##没数据字典 请选择字典生成 + #end -#elseif($column.htmlType == "datetime") +#elseif($column.htmlType == "datetime")## 时间框 - - + -#elseif($column.htmlType == "textarea") +#elseif($column.htmlType == "textarea")## 文本框