13 lines
255 B
TypeScript
13 lines
255 B
TypeScript
export const useThemeStore = defineStore('themeStore', {
|
|
state: () => ({
|
|
theme: '',
|
|
}),
|
|
actions: {
|
|
async set(theme: string) {
|
|
this.theme = theme;
|
|
},
|
|
},
|
|
persist: {
|
|
storage: piniaPluginPersistedstate.localStorage(),
|
|
},
|
|
});
|