From 31bb5fe0278d2f8132c535f8129354bfad56b7b1 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期三, 06 十一月 2024 11:25:24 +0800 Subject: [PATCH] 代码生成loading --- src/views/model/mpk/project/ProjectForm.vue | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/views/model/mpk/project/ProjectForm.vue b/src/views/model/mpk/project/ProjectForm.vue index 3f8f5be..d6937f7 100644 --- a/src/views/model/mpk/project/ProjectForm.vue +++ b/src/views/model/mpk/project/ProjectForm.vue @@ -56,6 +56,7 @@ id: undefined, projectName: undefined, projectCode: undefined, + models: undefined, }) @@ -106,9 +107,11 @@ const data = { ...formData.value } - data.models = data.models.map(e => { - return {id: e} - }) + if (data.models && data.models.length > 0) { + data.models = data.models.map(e => { + return {id: e} + }) + } if (formType.value === 'create') { await ProjectApi.createProject(data) message.success(t('common.createSuccess')) -- Gitblit v1.9.3