mirror of
https://gitee.com/liuxioabin/fengketrade.git
synced 2026-04-17 21:03:17 +08:00
30 lines
618 B
JavaScript
30 lines
618 B
JavaScript
import { defineStore } from 'pinia';
|
|
import app from './app';
|
|
|
|
const sys = defineStore({
|
|
id: 'sys',
|
|
state: () => ({
|
|
theme: 'blue', // ⭐ 主题强制设置为蓝色
|
|
mode: 'light', // 明亮模式、暗黑模式(暂未支持)
|
|
modeAuto: false, // 跟随系统
|
|
fontSize: 1, // 设置默认字号等级(0-4)
|
|
}),
|
|
getters: {},
|
|
actions: {
|
|
setTheme(theme = '') {
|
|
// ⭐ 强制使用蓝色主题,忽略所有参数
|
|
this.theme = 'blue';
|
|
},
|
|
},
|
|
persist: {
|
|
enabled: true,
|
|
strategies: [
|
|
{
|
|
key: 'sys-store',
|
|
},
|
|
],
|
|
},
|
|
});
|
|
|
|
export default sys;
|