fix(测试计划): 修复测试计划报告初次上来禁用恢复默认

This commit is contained in:
xinxin.wu 2024-07-12 18:34:58 +08:00 committed by Craftsman
parent 949ede28f7
commit 1f5aca029f
1 changed files with 11 additions and 6 deletions

View File

@ -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 }