@ -0,0 +1,35 @@
|
||||
import { store } from '@/store'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export interface ConfigState {
|
||||
|
||||
DataConfig: boolean
|
||||
}
|
||||
|
||||
export const useDataHeaderStore = defineStore({
|
||||
id: 'app-config',
|
||||
state: (): ConfigState => ({
|
||||
|
||||
DataConfig: false,
|
||||
|
||||
}),
|
||||
getters: {
|
||||
|
||||
getDataConfig():boolean {
|
||||
return this.DataConfig
|
||||
},
|
||||
|
||||
},
|
||||
actions: {
|
||||
|
||||
setDataConfig(value) {
|
||||
this.DataConfig = value
|
||||
},
|
||||
|
||||
},
|
||||
})
|
||||
|
||||
// Need to be used outside the setup
|
||||
export function useConfig() {
|
||||
return useDataHeaderStore(store)
|
||||
}
|
Loading…
Reference in new issue