mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-10-17 04:57:15 +08:00
refactor: useForm => useResetReactive(同步 GiDemo 更新)
This commit is contained in:
@@ -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: '',
|
||||
|
@@ -18,8 +18,8 @@ import { useWindowSize } from '@vueuse/core'
|
||||
import { Message } from '@arco-design/web-vue'
|
||||
import { updateUserBaseInfo } from '@/apis/system'
|
||||
import { type Columns, GiForm, type Options } from '@/components/GiForm'
|
||||
import { useForm } from '@/hooks'
|
||||
import { useUserStore } from '@/stores'
|
||||
import { useResetReactive } from '@/hooks'
|
||||
|
||||
const { width } = useWindowSize()
|
||||
const userStore = useUserStore()
|
||||
@@ -33,7 +33,7 @@ const options: Options = {
|
||||
btns: { hide: true },
|
||||
}
|
||||
|
||||
const { form, resetForm } = useForm({
|
||||
const [form, resetForm] = useResetReactive({
|
||||
nickname: userInfo.value.nickname,
|
||||
gender: userInfo.value.gender,
|
||||
})
|
||||
|
Reference in New Issue
Block a user