We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7403cf6 commit 73b77cbCopy full SHA for 73b77cb
src/views/list/modules/RoleModal.vue
@@ -122,7 +122,7 @@ export default {
122
})
123
// 把权限表遍历一遍,设定要勾选的权限 action
124
this.permissions.forEach(permission => {
125
- permission.selected = permissionsAction[permission.id]
+ permission.selected = permissionsAction[permission.id] || []
126
127
}
128
@@ -175,9 +175,10 @@ export default {
175
176
},
177
loadPermissions () {
178
+ const that = this
179
getPermissions().then(res => {
180
const result = res.result
- this.permissions = result.map(permission => {
181
+ that.permissions = result.map(permission => {
182
const options = actionToObject(permission.actionData)
183
permission.checkedAll = false
184
permission.selected = []
0 commit comments