update ant design vue version

This commit is contained in:
0xJacky 2022-08-13 18:19:47 +08:00
parent 0c0594a7ee
commit 464459faf5
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0
5 changed files with 13 additions and 9 deletions

View file

@ -4,7 +4,7 @@ import {useUserStore} from '@/pinia'
const thisYear = new Date().getFullYear()
import {LockOutlined, UserOutlined} from '@ant-design/icons-vue'
import {reactive, ref} from 'vue'
import {reactive, ref, watch} from 'vue'
import {useRoute, useRouter} from 'vue-router'
import gettext from '@/gettext'
import {Form, message} from 'ant-design-vue'
@ -43,7 +43,7 @@ const rulesRef = reactive({
]
})
const {validate, validateInfos} = Form.useForm(modelRef, rulesRef)
const {validate, validateInfos, clearValidate} = Form.useForm(modelRef, rulesRef)
const onSubmit = () => {
validate().then(() => {
@ -65,6 +65,10 @@ if (user.is_login) {
router.push(next)
}
watch(() => gettext.current, () => {
clearValidate()
})
</script>
<template>