refactor: API类型声明优化调整

Former-commit-id: 0ae696c2e872fa90feba0c5df9a92391c02d3e0b
This commit is contained in:
haoxr
2022-11-08 22:53:42 +08:00
parent 94b93f02a1
commit b39ff7b1f6
38 changed files with 468 additions and 513 deletions

View File

@@ -99,7 +99,7 @@ import useStore from '@/store';
// API依赖
import { useRoute } from 'vue-router';
import { LoginFormData } from '@/types/api/user';
import { LoginForm } from '@/api/auth/types';
const { user } = useStore();
const route = useRoute();
@@ -112,7 +112,7 @@ const state = reactive({
loginForm: {
username: 'admin',
password: '123456'
} as LoginFormData,
} as LoginForm,
loginRules: {
username: [{ required: true, trigger: 'blur' }],
password: [{ required: true, trigger: 'blur', validator: validatePassword }]