调整暂存逻辑
This commit is contained in:
@@ -2529,17 +2529,14 @@ const handleSubmit = async () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 暂存
|
// 暂存(跳过表单校验,允许部分填写)
|
||||||
const handleTempStore = async () => {
|
const handleTempStore = async () => {
|
||||||
if (loading.value) return;
|
if (loading.value) return;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const valid = await formRef.value?.validate().catch(() => {});
|
// 暂存模式不进行表单校验,允许用户部分填写后保存
|
||||||
if (!valid) {
|
// 提交时才会执行完整的校验规则
|
||||||
loading.value = false;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const submitData: any = {
|
const submitData: any = {
|
||||||
...dataForm,
|
...dataForm,
|
||||||
|
|||||||
Reference in New Issue
Block a user