去除上级菜单校验,默认为顶级

This commit is contained in:
RuoYi 2019-10-09 10:41:53 +08:00
parent 7c908e9a56
commit 3ba458b108
1 changed files with 1 additions and 4 deletions

View File

@ -79,7 +79,7 @@
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row> <el-row>
<el-col :span="24" v-if="form.parentId !== 0"> <el-col :span="24" v-if="form.parentId !== 0">
<el-form-item label="上级菜单" prop="parentId"> <el-form-item label="上级菜单">
<treeselect <treeselect
v-model="form.parentId" v-model="form.parentId"
:options="menuOptions" :options="menuOptions"
@ -204,9 +204,6 @@ export default {
form: {}, form: {},
// //
rules: { rules: {
parentId: [
{ required: true, message: "上级菜单不能为空", trigger: "blur" }
],
menuName: [ menuName: [
{ required: true, message: "菜单名称不能为空", trigger: "blur" } { required: true, message: "菜单名称不能为空", trigger: "blur" }
], ],