chore: 更新依赖,相关兼容处理

This commit is contained in:
xiaoxian521
2024-05-02 22:39:18 +08:00
parent d24f334a81
commit a56061ac81
6 changed files with 660 additions and 665 deletions

View File

@@ -23,7 +23,7 @@ const { isDisabled, text } = useVerifyCode();
const onLogin = async (formEl: FormInstance | undefined) => {
loading.value = true;
if (!formEl) return;
await formEl.validate((valid, fields) => {
await formEl.validate(valid => {
if (valid) {
// 模拟登录请求,需根据实际开发进行修改
setTimeout(() => {
@@ -34,7 +34,6 @@ const onLogin = async (formEl: FormInstance | undefined) => {
}, 2000);
} else {
loading.value = false;
return fields;
}
});
};

View File

@@ -45,7 +45,7 @@ const repeatPasswordRule = [
const onUpdate = async (formEl: FormInstance | undefined) => {
loading.value = true;
if (!formEl) return;
await formEl.validate((valid, fields) => {
await formEl.validate(valid => {
if (valid) {
if (checked.value) {
// 模拟请求,需根据实际开发进行修改
@@ -63,7 +63,6 @@ const onUpdate = async (formEl: FormInstance | undefined) => {
}
} else {
loading.value = false;
return fields;
}
});
};

View File

@@ -42,7 +42,7 @@ const repeatPasswordRule = [
const onUpdate = async (formEl: FormInstance | undefined) => {
loading.value = true;
if (!formEl) return;
await formEl.validate((valid, fields) => {
await formEl.validate(valid => {
if (valid) {
// 模拟请求,需根据实际开发进行修改
setTimeout(() => {
@@ -53,7 +53,6 @@ const onUpdate = async (formEl: FormInstance | undefined) => {
}, 2000);
} else {
loading.value = false;
return fields;
}
});
};

View File

@@ -64,7 +64,7 @@ const ruleForm = reactive({
const onLogin = async (formEl: FormInstance | undefined) => {
if (!formEl) return;
await formEl.validate((valid, fields) => {
await formEl.validate(valid => {
if (valid) {
loading.value = true;
useUserStoreHook()
@@ -86,8 +86,6 @@ const onLogin = async (formEl: FormInstance | undefined) => {
}
})
.finally(() => (loading.value = false));
} else {
return fields;
}
});
};