| 1234567891011121314151617181920212223242526272829303132333435 |
- import { theme } from "tailwindcss/stubs/defaultConfig.stub";
- /*
- * @Author: your name
- * @Date: 2024-05-27 15:09:27
- * @LastEditTime: 2025-07-17 16:23:06
- * @LastEditors: bogon
- * @Description: In User Settings Edit
- * @FilePath: /performance-test/src/store/themes.js
- */
- import { colorSchemes } from "@/views/overview/js/colors";
- export default {
- namespaced: true,
- state: {
- theme: localStorage.getItem("theme") || process.env.VUE_APP_THEM, //华电默认主题色
- themeColor: [...colorSchemes[0].colors],
- },
- mutations: {
- setTheme(state, theme) {
- state.theme = theme;
- localStorage.setItem("theme", theme);
- },
- setThemeColor(state, theme) {
- state.themeColor = theme;
- },
- },
- actions: {
- switchTheme({ commit }, theme) {
- commit("setTheme", theme);
- },
- themeChange({ commit }, theme) {
- commit("setThemeColor", theme);
- },
- },
- };
|