fix(测试计划): 修改代码cr问题

This commit is contained in:
xinxin.wu 2024-05-08 14:59:36 +08:00 committed by Craftsman
parent 4358a82355
commit c89a858f52
2 changed files with 6 additions and 10 deletions

View File

@ -76,7 +76,7 @@
}
}
function getDeleteTip() {
const contentTip = computed(() => {
switch (props.record && props.record.status) {
case 'ARCHIVED':
return t('testPlan.testPlanIndex.deleteArchivedPlan');
@ -87,10 +87,6 @@
default:
return t('testPlan.testPlanIndex.deletePendingPlan');
}
}
const contentTip = computed(() => {
return getDeleteTip();
});
</script>

View File

@ -71,7 +71,8 @@
<script setup lang="ts">
import { ref } from 'vue';
import { FormInstance } from '@arco-design/web-vue';
import { FormInstance, ValidatedError } from '@arco-design/web-vue';
import { cloneDeep } from 'lodash-es';
import MsDialog from '@/components/pure/ms-dialog/index.vue';
import type { BatchActionQueryParams } from '@/components/pure/ms-table/type';
@ -108,7 +109,7 @@
tags: [],
value: '',
};
const form = ref({ ...initForm });
const form = ref(cloneDeep(initForm));
const attrOptions = [
{
@ -123,12 +124,11 @@
isVisible.value = false;
formRef.value?.resetFields();
form.value = { ...initForm };
form.value.tags = [];
}
async function confirmHandler(enable: boolean | undefined) {
await formRef.value?.validate().then(async (error) => {
if (!error) {
formRef.value?.validate(async (errors: undefined | Record<string, ValidatedError>) => {
if (!errors) {
try {
const customField = {
fieldId: '',