修复数据权限无法回显的问题

This commit is contained in:
moon69 2024-03-09 17:38:56 +08:00
parent ecf9f26547
commit 0230a4af01

View File

@ -102,8 +102,12 @@ const open = async (row: RoleApi.RoleVO) => {
formData.name = row.name
formData.code = row.code
formData.dataScope = row.dataScope
row.dataScopeDeptIds?.forEach((deptId: number) => {
treeRef.value.setChecked(deptId, true, false)
// DOM
nextTick(() => {
row.dataScopeDeptIds?.forEach((deptId: number) => {
treeRef.value.setChecked(deptId, true, false)
})
})
}
defineExpose({ open }) // open