Commit accc35f37cb9c63a974e93c6707cb312f6b66dec
1 parent
caeb22cb
fix:修改租户角色-新增时菜单全部展开问题,应该只展开第一级即可和重复提交问题
Showing
1 changed file
with
6 additions
and
1 deletions
| ... | ... | @@ -13,7 +13,6 @@ |
| 13 | 13 | v-if="treeData.length > 0" |
| 14 | 14 | :treeData="treeData" |
| 15 | 15 | :expandedKeys="treeExpandData" |
| 16 | - autoExpandParent | |
| 17 | 16 | :replaceFields="{ title: 'menuName' }" |
| 18 | 17 | :checkedKeys="roleMenus" |
| 19 | 18 | @check="handleCheckClick" |
| ... | ... | @@ -86,6 +85,7 @@ |
| 86 | 85 | setDrawerProps({ confirmLoading: false }); |
| 87 | 86 | allCheckedKeys.value = []; |
| 88 | 87 | originMenus.value = []; |
| 88 | + treeExpandData.value; | |
| 89 | 89 | allCheckedKeys.value.length = 0; |
| 90 | 90 | resetFields(); |
| 91 | 91 | roleId.value = ''; |
| ... | ... | @@ -98,6 +98,11 @@ |
| 98 | 98 | const menuListModel = await getMenuList(); |
| 99 | 99 | processChildren(menuListModel); |
| 100 | 100 | treeData.value = menuListModel; |
| 101 | + //修复角色菜单新增-全部展开问题-只展开第一级即可 | |
| 102 | + nextTick(() => { | |
| 103 | + const getAllIds = lookForAllId(treeData.value, []); | |
| 104 | + treeExpandData.value = getAllIds; | |
| 105 | + }); | |
| 101 | 106 | } |
| 102 | 107 | // 更新 |
| 103 | 108 | if (unref(isUpdate)) { | ... | ... |