fix(测试用例): 修复创建用例保存并继续步骤信息未继承模板默认值
This commit is contained in:
parent
4c6c1e69eb
commit
23e23d1392
|
@ -318,16 +318,16 @@
|
||||||
const formRef = ref<FormInstance>();
|
const formRef = ref<FormInstance>();
|
||||||
const caseFormRef = ref<FormInstance>();
|
const caseFormRef = ref<FormInstance>();
|
||||||
|
|
||||||
// 步骤描述
|
const initStepData: StepList = {
|
||||||
const stepData = ref<StepList[]>([
|
|
||||||
{
|
|
||||||
id: getGenerateId(),
|
id: getGenerateId(),
|
||||||
step: '',
|
step: '',
|
||||||
expected: '',
|
expected: '',
|
||||||
showStep: false,
|
showStep: false,
|
||||||
showExpected: false,
|
showExpected: false,
|
||||||
},
|
};
|
||||||
]);
|
|
||||||
|
// 步骤描述
|
||||||
|
const stepData = ref<StepList[]>([{ ...initStepData }]);
|
||||||
|
|
||||||
const featureCaseStore = useFeatureCaseStore();
|
const featureCaseStore = useFeatureCaseStore();
|
||||||
const modelId = computed(() => featureCaseStore.moduleId[0] || 'root');
|
const modelId = computed(() => featureCaseStore.moduleId[0] || 'root');
|
||||||
|
@ -778,6 +778,7 @@
|
||||||
async function resetForm() {
|
async function resetForm() {
|
||||||
caseFormRef.value?.resetFields();
|
caseFormRef.value?.resetFields();
|
||||||
form.value = { ...initForm, templateId: form.value.templateId };
|
form.value = { ...initForm, templateId: form.value.templateId };
|
||||||
|
stepData.value = [{ ...initStepData }];
|
||||||
await initDefaultFields();
|
await initDefaultFields();
|
||||||
form.value.customFields = formItem.value.map((item: any) => {
|
form.value.customFields = formItem.value.map((item: any) => {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue