16 lines
310 B
TypeScript
16 lines
310 B
TypeScript
import { ref } from 'vue'
|
|||
|
|
import { defineStore } from 'pinia'
|
||
|
|
|
||
|
|
export const useConfigStore = defineStore('config', () => {
|
||
|
|
const config = ref(window.__APP_CONFIG__?.user)
|
||
|
|
|
||
|
|
async function getConfigData() {
|
||
|
|
config.value = window.__APP_CONFIG__?.user
|
||
|
|
}
|
||
|
|
|
||
|
|
return {
|
||
|
|
config,
|
||
|
|
getConfigData,
|
||
|
|
}
|
||
|
|
})
|