18 lines
332 B
TypeScript
18 lines
332 B
TypeScript
import { defineStore } from 'pinia';
|
|
|
|
import { useColorMode } from '@vueuse/core';
|
|
|
|
const SettingStore = defineStore('Setting', {
|
|
state: () => {
|
|
const theme = useColorMode({
|
|
attribute: 'theme',
|
|
});
|
|
return { theme: theme.system };
|
|
},
|
|
getters: {},
|
|
actions: {},
|
|
persist: true,
|
|
});
|
|
|
|
export { SettingStore };
|