perf: adjustment of form spelling errors, type adjustment, closer to actual development (#4694)

This commit is contained in:
Vben
2024-10-20 21:44:25 +08:00
committed by GitHub
parent 646598afba
commit 860fc15ce6
32 changed files with 95 additions and 122 deletions

View File

@@ -1,5 +1,4 @@
import type { LoginAndRegisterParams } from '@vben/common-ui';
import type { UserInfo } from '@vben/types';
import type { Recordable, UserInfo } from '@vben/types';
import { ref } from 'vue';
import { useRouter } from 'vue-router';
@@ -27,7 +26,7 @@ export const useAuthStore = defineStore('auth', () => {
* @param onSuccess 成功之后的回调函数
*/
async function authLogin(
params: LoginAndRegisterParams,
params: Recordable<any>,
onSuccess?: () => Promise<void> | void,
) {
// 异步处理用户登录操作并获取 accessToken
@@ -86,7 +85,7 @@ export const useAuthStore = defineStore('auth', () => {
resetAllStores();
accessStore.setLoginExpired(false);
// 回登页带上当前路由地址
// 回登页带上当前路由地址
await router.replace({
path: LOGIN_PATH,
query: redirect