Commit e04c9eb8 by 匡雅琴

优化

1 parent 8da258a5
...@@ -97,11 +97,10 @@ const submitForm = async (formEl: FormInstance | undefined) => { ...@@ -97,11 +97,10 @@ const submitForm = async (formEl: FormInstance | undefined) => {
await formEl.validate(async (valid) => { await formEl.validate(async (valid) => {
if (valid) { if (valid) {
// 判断唯一标识 // 判断唯一标识
let res isUniqueName().then(async (result) => {
isUniqueName().then(result => { console.log(result);
res = result if (!result) return;
})
if (!res) return;
//发起请求(新增或编辑) //发起请求(新增或编辑)
let statusMessage; let statusMessage;
let statusCode; let statusCode;
...@@ -128,6 +127,7 @@ const submitForm = async (formEl: FormInstance | undefined) => { ...@@ -128,6 +127,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
} else { } else {
ElMessage.error(statusMessage); ElMessage.error(statusMessage);
} }
});
} }
}); });
}; };
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!