From 6980ca0b5336771f12250d21b515d75452700553 Mon Sep 17 00:00:00 2001 From: baiqi Date: Fri, 24 May 2024 11:53:54 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=20=20=E9=83=A8=E5=88=86=20bug=20=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/ms-add-attachment/index.vue | 5 ++++- .../pure/ms-time-selector/MsTimeSelector.vue | 12 +++++++--- .../pure/ms-user-admin-div/index.vue | 2 +- frontend/src/components/pure/navbar/index.vue | 4 ++-- frontend/src/config/permission.ts | 12 ---------- frontend/src/hooks/usePermission.ts | 3 ++- frontend/src/utils/permission.ts | 22 ++++++++++++++----- .../components/requestComposition/body.vue | 8 +++---- .../management/mock/mockDetailDrawer.vue | 8 +++---- .../management/mock/mockResponse.vue | 10 ++++----- .../step/stepNodeComposition/csvTag.vue | 11 ++-------- .../menuManagement/menuManagement.vue | 2 +- .../testPlan/components/planTable.vue | 1 - .../testPlan/components/testPlanTree.vue | 2 +- .../featureCase/components/caseTree.vue | 2 +- .../src/views/test-plan/testPlan/index.vue | 1 + 16 files changed, 53 insertions(+), 52 deletions(-) delete mode 100644 frontend/src/config/permission.ts diff --git a/frontend/src/components/business/ms-add-attachment/index.vue b/frontend/src/components/business/ms-add-attachment/index.vue index 862c022257..24da337a85 100644 --- a/frontend/src/components/business/ms-add-attachment/index.vue +++ b/frontend/src/components/business/ms-add-attachment/index.vue @@ -376,7 +376,10 @@ fileList.value = [{ ...file, fileId: file.uid || '', fileName: file.name || '' }]; inputFileName.value = file.name || ''; } - emit('change', fileList.value); + nextTick(() => { + // fileList赋值以后需要 nextTick 才能获取到更新后的值 + emit('change', fileList.value); + }); } const inputFilesPopoverVisible = ref(false); diff --git a/frontend/src/components/pure/ms-time-selector/MsTimeSelector.vue b/frontend/src/components/pure/ms-time-selector/MsTimeSelector.vue index d4a76dc524..58984ec246 100644 --- a/frontend/src/components/pure/ms-time-selector/MsTimeSelector.vue +++ b/frontend/src/components/pure/ms-time-selector/MsTimeSelector.vue @@ -99,9 +99,15 @@ }); } - onBeforeMount(() => { - initNumberAndType(); - }); + watch( + () => modelValue.value, + () => { + initNumberAndType(); + }, + { + immediate: true, + } + );