changes
This commit is contained in:
26
stores/index.js
Normal file
26
stores/index.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { defineStore } from 'pinia'
|
||||
export const useStore = defineStore('main', {
|
||||
state: () => ({
|
||||
viewport: undefined,
|
||||
login: undefined,
|
||||
token: undefined,
|
||||
common: undefined,
|
||||
pagetrack: {},
|
||||
settings: [],
|
||||
showmodal: undefined,
|
||||
snackbar: undefined,
|
||||
service: undefined,
|
||||
country: undefined,
|
||||
lang: 'vi',
|
||||
branch: {id: 1}
|
||||
}),
|
||||
actions: {
|
||||
commit(name, data) {
|
||||
this[name] = data
|
||||
}
|
||||
},
|
||||
persist: {
|
||||
pick: ['token', 'login', 'lang'],
|
||||
storage: piniaPluginPersistedstate.localStorage()
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user