perf: 🎈 add await for nextTick()

This commit is contained in:
AhJindeg 2024-04-04 18:54:51 +08:00
parent c048dcf02a
commit 7b84ddd358

View File

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