fix: complete form rule type (#376)

This commit is contained in:
yuyang 2022-12-13 15:46:29 +08:00 committed by GitHub
parent 12a88c6d3b
commit 6b1e856657
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,7 +82,8 @@
import { ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import QrcodeVue from 'qrcode.vue';
import { FormInstanceFunctions, MessagePlugin } from 'tdesign-vue-next';
import { MessagePlugin } from 'tdesign-vue-next';
import type { FormInstanceFunctions, FormRule } from 'tdesign-vue-next';
import { useCounter } from '@/hooks';
import { useUserStore } from '@/store';
@ -96,7 +97,7 @@ const INITIAL_DATA = {
checked: false,
};
const FORM_RULES = {
const FORM_RULES: Record<string, FormRule[]> = {
phone: [{ required: true, message: '手机号必填', type: 'error' }],
account: [{ required: true, message: '账号必填', type: 'error' }],
password: [{ required: true, message: '密码必填', type: 'error' }],