You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
556 B
37 lines
556 B
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)
|
|
}
|