feat: 将用户存储的 token 从同步改为异步存储
This commit is contained in:
@@ -6,7 +6,7 @@ interface State {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const useUserStore = defineStore("user", () => {
|
export const useUserStore = defineStore("user", () => {
|
||||||
const token = useStorage<string | null>("user-token", null);
|
const token = useStorageAsync<string | null>("user-token", null);
|
||||||
const state = reactive<State>({
|
const state = reactive<State>({
|
||||||
userProfile: null,
|
userProfile: null,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user