This commit is contained in:
落日晚风
2023-12-13 11:25:22 +08:00
parent 7c2ab0b7ad
commit cff33ad7d1
6370 changed files with 378844 additions and 82245 deletions
-32
View File
@@ -1,32 +0,0 @@
import { defineStore } from 'pinia';
import app from './app';
const sys = defineStore({
id: 'sys',
state: () => ({
theme: '', // 主题,
mode: 'light', // 明亮模式、暗黑模式(暂未支持)
modeAuto: false, // 跟随系统
fontSize: 1, // 设置默认字号等级(0-4)
}),
getters: {},
actions: {
setTheme(theme = '') {
if (theme === '') {
this.theme = app().template?.basic.theme || 'orange';
} else {
this.theme = theme;
}
},
},
persist: {
enabled: true,
strategies: [
{
key: 'sys-store',
},
],
},
});
export default sys;