refactor(system): 优化角色权限设置功能
- 将 checkStrictly 属性设置为 true,确保菜单选择时父子联动 -移除不必要的 checkList 初始化值- 注释掉多选框事件中修改 checkStrictly 的代码- 注释掉权限菜单过滤的相关代码
This commit is contained in:
@@ -147,7 +147,7 @@
|
||||
:props="treeProps"
|
||||
node-key="menuId"
|
||||
ref="tree"
|
||||
:check-strictly="checkStrictly"
|
||||
:check-strictly="true"
|
||||
show-checkbox
|
||||
@check-change="handleCheckChange"
|
||||
/>
|
||||
@@ -209,7 +209,7 @@ const rules = reactive({
|
||||
{required: true, message: '请选择显示顺序', trigger: 'blur'},
|
||||
]
|
||||
})
|
||||
const checkList = ref(['3'])
|
||||
const checkList = ref([])
|
||||
const treeProps = {
|
||||
value: "menuId",
|
||||
label: 'menuName',
|
||||
@@ -372,7 +372,7 @@ const getMenu = async () => {
|
||||
//多选框事件
|
||||
const changeCheckbox = (checked) => {
|
||||
//父子联动
|
||||
checkStrictly.value = checked.indexOf("3") === -1;
|
||||
// checkStrictly.value = checked.indexOf("3") === -1;
|
||||
let nodes = tree.value.store.nodesMap;
|
||||
console.log('checked',checked)
|
||||
//展开/折叠
|
||||
|
||||
Reference in New Issue
Block a user