Skip to content

Commit 73b77cb

Browse files
committed
fix: RoleModal edit method
1 parent 7403cf6 commit 73b77cb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/views/list/modules/RoleModal.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default {
122122
})
123123
// 把权限表遍历一遍,设定要勾选的权限 action
124124
this.permissions.forEach(permission => {
125-
permission.selected = permissionsAction[permission.id]
125+
permission.selected = permissionsAction[permission.id] || []
126126
})
127127
}
128128
@@ -175,9 +175,10 @@ export default {
175175
})
176176
},
177177
loadPermissions () {
178+
const that = this
178179
getPermissions().then(res => {
179180
const result = res.result
180-
this.permissions = result.map(permission => {
181+
that.permissions = result.map(permission => {
181182
const options = actionToObject(permission.actionData)
182183
permission.checkedAll = false
183184
permission.selected = []

0 commit comments

Comments
 (0)