houyaf 3 anni fa
parent
commit
8481ed63e3
1 ha cambiato i file con 3 aggiunte e 6 eliminazioni
  1. 3 6
      src/views/personal/setting.vue

+ 3 - 6
src/views/personal/setting.vue

@@ -6,7 +6,7 @@ meta:
 </route>
 
 <script lang="ts" setup name="PersonalProfile">
-import type { FormInstance, FormRules, UploadProps } from 'element-plus'
+import type { FormRules, UploadProps } from 'element-plus'
 
 const state = reactive({
   loading: false,
@@ -26,9 +26,6 @@ const state = reactive({
   },
 })
 
-const router = useRouter()
-const formRef = ref<FormInstance>()
-
 const validatePass2 = (rule: any, value: any, callback: any) => {
   if (value === '') {
     callback(new Error('请再次输入密码'))
@@ -68,14 +65,14 @@ const uploadSuccess: UploadProps['onSuccess'] = (res) => {
 
 function submitForm(formName: string) {
   if (formName === 'basic') {
-    basicFormRef.value && basicFormRef.value.validate((valid) => {
+    basicFormRef.value && basicFormRef.value.validate((valid: any) => {
       if (valid) {
         window.console.log('abc')
       }
     })
   }
   else {
-    passFormRef.value && passFormRef.value.validate((valid) => {
+    passFormRef.value && passFormRef.value.validate((valid: any) => {
       if (valid) {
         window.console.log('abc')
       }