add internationalization / dynamic themes

This commit is contained in:
landaiqing
2024-08-09 19:51:56 +08:00
parent c13613ec07
commit 438965f2a2
28 changed files with 402 additions and 391 deletions

View File

@@ -1,8 +1,6 @@
import {defineStore} from 'pinia';
import {ref} from 'vue';
import {User} from "@/types/user";
import {parse, stringify} from "zipson/lib";
import {handleLocalforage} from "@/utils/localforage";
export const useAuthStore = defineStore(
@@ -31,14 +29,11 @@ export const useAuthStore = defineStore(
},
{
// 开启数据持久化
persist: {
persistedState: {
key: 'user',
paths: ['user'],
storage: handleLocalforage,
serializer: {
deserialize: parse,
serialize: stringify,
},
storage: localStorage,
includePaths: ["user"],
overwrite: true,
}
}
);