修复数据权限无法回显的问题
This commit is contained in:
parent
0230a4af01
commit
4c0a5e8c30
@ -103,12 +103,11 @@ const open = async (row: RoleApi.RoleVO) => {
|
|||||||
formData.code = row.code
|
formData.code = row.code
|
||||||
formData.dataScope = row.dataScope
|
formData.dataScope = row.dataScope
|
||||||
|
|
||||||
|
await nextTick()
|
||||||
// 需要在 DOM 渲染完成后,再设置选中状态
|
// 需要在 DOM 渲染完成后,再设置选中状态
|
||||||
nextTick(() => {
|
|
||||||
row.dataScopeDeptIds?.forEach((deptId: number) => {
|
row.dataScopeDeptIds?.forEach((deptId: number) => {
|
||||||
treeRef.value.setChecked(deptId, true, false)
|
treeRef.value.setChecked(deptId, true, false)
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user