From db4795744e2ed0337f0b22a88988253631145011 Mon Sep 17 00:00:00 2001 From: AhJindeg Date: Fri, 5 Apr 2024 13:51:27 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=F0=9F=8C=88=20add=20more=20readable?= =?UTF-8?q?=20for=20open?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/role/RoleDataPermissionForm.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/views/system/role/RoleDataPermissionForm.vue b/src/views/system/role/RoleDataPermissionForm.vue index 3b8c3ee6..32745e95 100644 --- a/src/views/system/role/RoleDataPermissionForm.vue +++ b/src/views/system/role/RoleDataPermissionForm.vue @@ -102,10 +102,9 @@ const open = async (row: RoleApi.RoleVO) => { formData.name = row.name formData.code = row.code formData.dataScope = row.dataScope - await nextTick((): void => { - row.dataScopeDeptIds?.forEach((deptId: number): void => { - treeRef.value.setChecked(deptId, true, false) - }) + await nextTick() + row.dataScopeDeptIds?.forEach((deptId: number): void => { + treeRef.value.setChecked(deptId, true, false) }) } defineExpose({ open }) // 提供 open 方法,用于打开弹窗