refactor: useForm => useResetReactive(同步 GiDemo 更新)

This commit is contained in:
2024-11-23 21:04:48 +08:00
parent be4356fa04
commit 6c45483fae
20 changed files with 53 additions and 38 deletions

View File

@@ -29,7 +29,7 @@ import { type BehaviorCaptchaReq, getEmailCaptcha, updateUserEmail, updateUserPa
import { encryptByRsa } from '@/utils/encrypt'
import { useUserStore } from '@/stores'
import { type Columns, GiForm, type Options } from '@/components/GiForm'
import { useForm } from '@/hooks'
import { useResetReactive } from '@/hooks'
import * as Regexp from '@/utils/regexp'
import modalErrorWrapper from '@/utils/modal-error-wrapper'
import router from '@/router'
@@ -49,7 +49,7 @@ const options: Options = {
btns: { hide: true },
}
const { form, resetForm } = useForm({
const [form, resetForm] = useResetReactive({
phone: '',
email: '',
captcha: '',