From 1f5aca029ffe65d92f30841eb10d14d6e7251ffa Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Fri, 12 Jul 2024 18:34:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=8A=A5?= =?UTF-8?q?=E5=91=8A=E5=88=9D=E6=AC=A1=E4=B8=8A=E6=9D=A5=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E6=81=A2=E5=A4=8D=E9=BB=98=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/detail/component/config.vue | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/frontend/src/views/test-plan/report/detail/component/config.vue b/frontend/src/views/test-plan/report/detail/component/config.vue index ce64014eb7..8c54e4f8e2 100644 --- a/frontend/src/views/test-plan/report/detail/component/config.vue +++ b/frontend/src/views/test-plan/report/detail/component/config.vue @@ -273,18 +273,23 @@ }; }); } + const isInit = ref(true); watch( [() => configList.value, () => cardItemList.value], () => { - const configValue = resetConfigEditList(configList.value); - const cardItemValue = resetConfigEditList(cardItemList.value); + const configValue = resetConfigEditList(cloneDeep(configList.value)); + const cardItemValue = resetConfigEditList(cloneDeep(cardItemList.value)); const isisEqualList = props.isGroup ? cloneDeep(defaultGroupConfig) : cloneDeep(defaultSingleConfig); - if (!isEqual(configValue, isisEqualList) || !isEqual(cardItemValue, isisEqualList)) { - nextTick(() => { - hasChange.value = true; - }); + if (!isEqual(configValue, isisEqualList) || (!isEqual(cardItemValue, isisEqualList) && !isInit.value)) { + if (isInit.value) { + isInit.value = false; + } else { + nextTick(() => { + hasChange.value = true; + }); + } } }, { deep: true }