update: 提取公共定义

This commit is contained in:
midfar 2023-03-10 14:30:06 +08:00
parent e5d3c3e400
commit 56da9fa028
2 changed files with 7 additions and 5 deletions

5
src/types/element-plus.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
import type { FormValidateCallback, FormValidationResult } from 'element-plus';
interface IForm {
validate: (callback?: FormValidateCallback | undefined) => FormValidationResult;
}

View File

@ -62,13 +62,10 @@
import { validUsername } from '@/utils/validate';
import { defineComponent } from 'vue';
import SocialSign from './components/SocialSignin.vue';
import type { FormItemRule, FormValidateCallback, FormValidationResult } from 'element-plus';
import type { FormItemRule } from 'element-plus';
import type { IForm } from '@/types/element-plus';
import store from '@/store';
interface IForm {
validate: (callback?: FormValidateCallback | undefined) => FormValidationResult;
}
export default defineComponent({
name: 'Login',
components: { SocialSign },