|  |  | 
 |  |  |     <p class="tip" v-if="form.parent != null && form.id == null">为 <em>{{parentName}}</em> 新建子菜单</p> | 
 |  |  |     <el-form :model="form" ref="form" :rules="rules"> | 
 |  |  |       <el-form-item label="上级菜单" prop="parentId"> | 
 |  |  |         <MenuSelect v-if="visible" v-model="form.parentId" placeholder="请选择上级菜单" :exclude-id="excludeMenuId" clearable :inline="false"/> | 
 |  |  |         <MenuSelect v-if="visible" v-model="form.parentId" :type="type" placeholder="请选择上级菜单" :exclude-id="excludeMenuId" clearable :inline="false"/> | 
 |  |  |       </el-form-item> | 
 |  |  |       <el-form-item label="菜单名称" prop="name" required> | 
 |  |  |         <el-input v-model="form.name" placeholder="请输入菜单名称" v-trim maxlength="50"/> | 
 |  |  | 
 |  |  |   name: 'OperaMenuWindow', | 
 |  |  |   extends: BaseOpera, | 
 |  |  |   components: { MenuSelect, GlobalWindow }, | 
 |  |  |   props: { | 
 |  |  |     type: { | 
 |  |  |       type: String|Number, | 
 |  |  |       default: 0 | 
 |  |  |     } | 
 |  |  |   }, | 
 |  |  |   data () { | 
 |  |  |     return { | 
 |  |  |       icons, | 
 |  |  | 
 |  |  |         name: '', | 
 |  |  |         path: '', | 
 |  |  |         icon: '', | 
 |  |  |         remark: '', | 
 |  |  |         type: '' | 
 |  |  |         type: '', | 
 |  |  |         remark: '' | 
 |  |  |       }, | 
 |  |  |       // 验证规则 | 
 |  |  |       rules: { | 
 |  |  | 
 |  |  |         this.excludeMenuId = null | 
 |  |  |         this.$nextTick(() => { | 
 |  |  |           this.$refs.form.resetFields() | 
 |  |  |           this.form.type = this.type | 
 |  |  |           this.form.id = null | 
 |  |  |           this.form.type = parent.type | 
 |  |  |           this.form.parentId = parent == null ? null : parent.id | 
 |  |  |           this.parentName = parent == null ? null : parent.name | 
 |  |  |         }) |