diff --git a/src/views/modules/sys/role/role-add-or-update.vue b/src/views/modules/sys/role/role-add-or-update.vue index c8e1ae6..1dd5d81 100644 --- a/src/views/modules/sys/role/role-add-or-update.vue +++ b/src/views/modules/sys/role/role-add-or-update.vue @@ -124,15 +124,10 @@ export default { if (idx !== -1) { res.role.menuIdList.splice(idx, res.role.menuIdList.length - idx) } - this.dataDemo = res.role.menuIdList - setTimeout(() => { - this.$nextTick(() => { - this.$refs.menuListTree.setCheckedKeys(res.role.menuIdList) - if (this.disable) { - this.$refs.menuListTree.filter(this.dataDemo) - } - }) - }, 50) + if (this.disable) { + this.$refs.menuListTree.filter(res.role.menuIdList) + } + this.defaultCheckedKeys = res.role.menuIdList } }) },