From 56da9fa0285466245f10cb0bfe9416a78dadf3dc Mon Sep 17 00:00:00 2001 From: midfar Date: Fri, 10 Mar 2023 14:30:06 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=8F=90=E5=8F=96=E5=85=AC=E5=85=B1?= =?UTF-8?q?=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types/element-plus.d.ts | 5 +++++ src/views/login/index.vue | 7 ++----- 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 src/types/element-plus.d.ts diff --git a/src/types/element-plus.d.ts b/src/types/element-plus.d.ts new file mode 100644 index 0000000..4a6f670 --- /dev/null +++ b/src/types/element-plus.d.ts @@ -0,0 +1,5 @@ +import type { FormValidateCallback, FormValidationResult } from 'element-plus'; + +interface IForm { + validate: (callback?: FormValidateCallback | undefined) => FormValidationResult; +} diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 52db39f..ff3621f 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -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 },