This commit is contained in:
dev
2025-10-28 09:25:46 +08:00
commit 9431e325df
1089 changed files with 143917 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
import {
defineStore
} from 'pinia';
import app from './app';
const sys = defineStore({
id: 'sys',
state: () => ({
theme: '', // 主题,
mode: 'light', // 明亮模式、暗黑模式(暂未支持)
modeAuto: false, // 跟随系统
fontSize: 1, // 设置默认字号等级(0-4)
tabbarPlaceholderHeight: 0
}),
getters: {},
actions: {
setTheme(theme = '') {
if (theme === '') {
this.theme = app().template?.basic.theme || 'blue';
} else {
this.theme = theme;
}
},
setTabbarPlaceholderHeight(height) {
this.tabbarPlaceholderHeight = height
}
},
persist: {
enabled: true,
strategies: [{
key: 'sys-store',
}, ],
},
});
export default sys;