树选择框由tree-select升级为el-tree-select

This commit is contained in:
dataprince 2023-12-03 14:39:49 +08:00
parent afd95d2499
commit 930d5aaa70
3 changed files with 23 additions and 13 deletions

View File

@ -103,11 +103,13 @@
<el-row>
<el-col :span="24">
<el-form-item label="上级菜单">
<tree-select
v-model:value="form.parentId"
:options="menuOptions"
:objMap="{ value: 'menuId', label: 'menuName', children: 'children' }"
<el-tree-select
v-model="form.parentId"
:data="menuOptions"
:props="{ value: 'menuId', label: 'menuName', children: 'children' }"
value-key="menuId"
placeholder="选择上级菜单"
check-strictly
/>
</el-form-item>
</el-col>

View File

@ -206,11 +206,13 @@
</el-col>
<el-col :span="12">
<el-form-item label="归属部门" prop="deptId">
<tree-select
v-model:value="form.deptId"
:options="deptOptions"
<el-tree-select
v-model="form.deptId"
:data="deptOptions"
:props="{ value: 'id', label: 'label', children: 'children' }"
value-key="id"
placeholder="请选择归属部门"
:objMap="{ value: 'id', label: 'label', children: 'children' }"
check-strictly
/>
</el-form-item>
</el-col>

View File

@ -68,11 +68,17 @@
<el-icon><question-filled /></el-icon>
</el-tooltip>
</template>
<tree-select
v-model:value="info.parentMenuId"
:options="menuOptions"
:objMap="{ value: 'menuId', label: 'menuName', children: 'children' }"
placeholder="请选择系统菜单"
<el-tree-select
v-model="info.parentMenuId"
:data="menuOptions"
:props="{ value: 'menuId', label: 'menuName', children: 'children' }"
value-key="menuId"
node-key="menuId"
placeholder="选择上级菜单"
check-strictly
filterable
clearable
highlight-current
/>
</el-form-item>
</el-col>