From 17d5751452e3baa7b2f484ad3e6c5d411236721a Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Thu, 30 Jul 2020 21:50:01 +0800
Subject: [PATCH] 表单类型为Integer/Long设置整形默认值
---
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm | 2 +-
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
index a662589..c7a3f6e 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm
@@ -343,7 +343,7 @@
this.form = {
#foreach ($column in $columns)
#if($column.htmlType == "radio")
- $column.javaField: "0"#if($velocityCount != $columns.size()),#end
+ $column.javaField: #if($column.javaType == "Integer" || $column.javaType == "Long")0#else"0"#end#if($velocityCount != $columns.size()),#end
#elseif($column.htmlType == "checkbox")
$column.javaField: []#if($velocityCount != $columns.size()),#end
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
index 8c61a5d..c4ebb52 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm
@@ -357,7 +357,7 @@
this.form = {
#foreach ($column in $columns)
#if($column.htmlType == "radio")
- $column.javaField: "0"#if($velocityCount != $columns.size()),#end
+ $column.javaField: #if($column.javaType == "Integer" || $column.javaType == "Long")0#else"0"#end#if($velocityCount != $columns.size()),#end
#elseif($column.htmlType == "checkbox")
$column.javaField: []#if($velocityCount != $columns.size()),#end
--
Gitblit v1.9.3