commit
This commit is contained in:
parent
f22f42c260
commit
4cd3f62421
3 changed files with 5 additions and 6 deletions
|
|
@ -3,12 +3,14 @@ import App from './App.vue';
|
|||
import router from './router';
|
||||
import "../node_modules/bootstrap/dist/js/bootstrap.js";
|
||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
|
||||
import { useMainStore, pinia } from '@/store';
|
||||
import { useMainStore, } from '@/store';
|
||||
import baseMixin from "@/mixins/base-mixin.js";
|
||||
import { createPinia } from 'pinia';
|
||||
|
||||
const vueApp = createApp(App);
|
||||
|
||||
// Pinia
|
||||
const pinia = createPinia();
|
||||
vueApp.use(pinia);
|
||||
pinia.use(piniaPluginPersistedstate);
|
||||
useMainStore().populateInitialState();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { lazyLoadComponent } from "@/router/dynamic-routing/component-loader";
|
|||
import {issPageValues} from '@/router/router-constants/issPage-values';
|
||||
import { routingTable } from "@/router/router-constants/routing-table";
|
||||
import { useMainStore } from '@/store';
|
||||
import { pinia } from "../store";
|
||||
|
||||
const routes = [
|
||||
{
|
||||
|
|
@ -55,7 +54,7 @@ const router = createRouter({
|
|||
// Get route information by page name.
|
||||
// This will reach out to the Cms and there is a 1:1 relationship between page names and route names.
|
||||
async function GetRouteInfoFromPageName(pageName) {
|
||||
const response = await useMainStore(pinia).getRouteInfo(pageName);
|
||||
const response = await useMainStore().getRouteInfo(pageName);
|
||||
|
||||
const jsonFromResponse = JSON.parse(response.data.Result);
|
||||
let routeData = [];
|
||||
|
|
@ -123,7 +122,7 @@ function navigateToUrl(url, optionalQuery = {}) {
|
|||
function getNavigationMap (scenario, currentRoute) {
|
||||
const issPageValue = currentRoute.query.issPage;
|
||||
try {
|
||||
const matchedQueryValue = routingTable(useMainStore(pinia))
|
||||
const matchedQueryValue = routingTable(useMainStore())
|
||||
.filter(
|
||||
(item) =>
|
||||
item.issPageValue === issPageValue &&
|
||||
|
|
|
|||
|
|
@ -92,5 +92,3 @@ export const useMainStore = defineStore({
|
|||
},
|
||||
persist: true
|
||||
});
|
||||
|
||||
export const pinia = createPinia();
|
||||
Loading…
Reference in a new issue