!414 fix(role): add nextTick for open

Merge pull request !414 from AhJindeg/hotfix-role
This commit is contained in:
芋道源码 2024-04-07 13:28:38 +00:00 committed by Gitee
commit f6e4753b34
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

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