| 123456789101112131415161718192021222324252627282930313233343536 |
- import { createApp } from 'vue';
- import App from '../App.vue';
- import { createPinia } from 'pinia';
- import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
- const pinia = createPinia();
- pinia.use(piniaPluginPersistedstate);
- let app = createApp(App);
- app.use(pinia);
- import {
- defineStore
- } from 'pinia';
- export const Store = defineStore({
- id: '',
- state: () => {
- return{
- queryMapTables:[],//地图查询表
- roleId:'',//用户权限ID
- realName:'',//登录账号的用户名
- layerID:'',//控制唯一底图加载id
- markID:'',//控制标注id
- keepAlives:['Map3DMain'],//控制加载缓存页面
- userport:'',
- token:'',//token
- }
- },
- getters: {
- keepAlive(state) {
- return state.keepAlives
- }
- },
- actions: {
- },
- persist: true
- })
|