From c2b3473c5eb09165215d2fda38e38075e031aee0 Mon Sep 17 00:00:00 2001 From: zou Date: Tue, 18 Aug 2026 16:00:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(F006):=20=E7=94=A8=E6=88=B7=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=BC=B9=E7=AA=97=E5=85=88=E9=BB=91=E4=B8=80=E4=B8=8B?= =?UTF-8?q?=20-=20loading=E6=8F=90=E5=89=8D=E8=A6=86=E7=9B=96=E5=85=A8?= =?UTF-8?q?=E7=A8=8B+=E4=BC=81=E4=B8=9A=E4=B8=8B=E6=8B=89=E4=B8=8E?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=B9=B6=E8=A1=8C=E5=8A=A0=E8=BD=BD+?= =?UTF-8?q?=E9=81=AE=E7=BD=A9=E9=80=8F=E6=98=8E=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/user/UserFormDialog.vue | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/modules/user/UserFormDialog.vue b/src/modules/user/UserFormDialog.vue index 39dcfb7..84fd853 100644 --- a/src/modules/user/UserFormDialog.vue +++ b/src/modules/user/UserFormDialog.vue @@ -88,10 +88,16 @@ watch( () => props.visible, async (v) => { if (!v) return + // 2026-08-18 修复"先黑一下": loading 提前置 true 覆盖整个加载过程, + // 企业下拉与用户详情并行加载, 避免空表单闪现 + 后半程才出现遮罩 + loading.value = true resetForm() - await loadEnterprises() - if (props.userId) { - await loadDetail() + try { + const jobs: Promise[] = [loadEnterprises()] + if (props.userId) jobs.push(loadDetail()) + await Promise.all(jobs) + } finally { + loading.value = false } } ) @@ -213,7 +219,12 @@ async function submit() { @update:model-value="(v: boolean) => emit('update:visible', v)" @closed="resetForm" > -
+ +