提交 8f558cbb 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

修改tree默认选中bug

上级 717ccb7d
......@@ -154,7 +154,10 @@ export default {
const menus = res1.data.menus
const arr = []
menus.map(item => {
arr.push(Number(item.menuId))
// 防止直接选中父级造成全选
if(!menus.some(same=>same.parentId === item.menuId)){
arr.push(Number(item.menuId))
}
})
this.treeIds = arr
const res2 = await getBaseMenuTree()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册