23 lines
449 B
JavaScript
23 lines
449 B
JavaScript
import { defineStore, skipHydrate } from "pinia";
|
|
|
|
export const useThemeStore = defineStore({
|
|
id: "theme",
|
|
state: () => ({
|
|
theme: "default",
|
|
layoutType: "vertical",
|
|
codeTheme: "oneDark",
|
|
}),
|
|
persist: true,
|
|
actions: {
|
|
setTheme(theme) {
|
|
this.theme = theme;
|
|
},
|
|
setLayoutType(layoutType) {
|
|
this.layoutType = layoutType;
|
|
},
|
|
setCodeTheme(codeTheme) {
|
|
this.codeTheme = codeTheme;
|
|
},
|
|
},
|
|
});
|