Skip to content

Commit 85b25ad

Browse files
committed
refactor: implement page permission handling in Role component
1 parent 1198f8f commit 85b25ad

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

apps/daas/src/views/role/Role.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,15 @@ export default {
261261
//保留当前操作数据
262262
this.updateData(data.checked, data)
263263
264+
// 页面权限开启
265+
if (type === 'page' && data.checked) {
266+
// 按钮权限全部开启
267+
data.buttons?.forEach((el) => {
268+
el.checked = true
269+
this.updateData(el.checked, el)
270+
})
271+
}
272+
264273
// 页面权限关闭
265274
if (type === 'page' && !data.checked) {
266275
// 如果父元素的页面权限全部不勾选,则父元素也隐藏

0 commit comments

Comments
 (0)