Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
549c7ee9
Commit
549c7ee9
authored
Aug 18, 2020
by
RuoYi
Browse files
代码生成添加select必填选项
parent
5fcf342f
Changes
2
Hide whitespace changes
Inline
Side-by-side
ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
View file @
549c7ee9
...
...
@@ -66,7 +66,7 @@
v-hasPermi=
"['
${
moduleName
}
:
${
businessName
}
:add']"
>
新增
</el-button>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
...
...
@@ -140,7 +140,7 @@
<el-input
v-model=
"form.
${
field
}
"
placeholder=
"请输入
${
comment
}
"
/>
</el-form-item>
#
elseif
($
column
.
htmlType
==
"select"
&&
""
!=
$
dictType
)
<el-form-item
label=
"
${
comment
}
"
>
<el-form-item
label=
"
${
comment
}
"
prop=
"
${
field
}
"
>
<el-select
v-model=
"form.
${
field
}
"
placeholder=
"请选择
${
comment
}
"
>
<el-option
v-for=
"dict in
${
field
}
Options"
...
...
@@ -152,7 +152,7 @@
</el-select>
</el-form-item>
#
elseif
($
column
.
htmlType
==
"select"
&&
$
dictType
)
<el-form-item
label=
"
${
comment
}
"
>
<el-form-item
label=
"
${
comment
}
"
prop=
"
${
field
}
"
>
<el-select
v-model=
"form.
${
field
}
"
placeholder=
"请选择
${
comment
}
"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
...
...
@@ -272,9 +272,8 @@ export default {
#
else
#
set
($
comment
=
$
column
.
columnComment
)
#
end
#
set
($
comment
=
$
column
.
columnComment
)
$
column
.
javaField
:
[
{
required
:
true
,
message
:
"
$
comment
不能为空
"
,
trigger
:
"
blur
"
}
{
required
:
true
,
message
:
"
$
comment
不能为空
"
,
trigger
:
"
#
if
($
column
.
htmlType
==
"select"
)
"
change
"
#
else
"
blur
"
#
end
"
}
]#
if
($
velocityCount
!=
$
columns
.
size
()),#
end
#
end
...
...
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
View file @
549c7ee9
...
...
@@ -306,9 +306,8 @@ export default {
#
else
#
set
($
comment
=
$
column
.
columnComment
)
#
end
#
set
($
comment
=
$
column
.
columnComment
)
$
column
.
javaField
:
[
{
required
:
true
,
message
:
"
$
comment
不能为空
"
,
#
if
($
column
.
htmlType
==
"select"
)
"
change
"
#
else
"
blur
"
#
end
}
{
required
:
true
,
message
:
"
$
comment
不能为空
"
,
trigger
:
#
if
($
column
.
htmlType
==
"select"
)
"
change
"
#
else
"
blur
"
#
end
}
]#
if
($
velocityCount
!=
$
columns
.
size
()),#
end
#
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment