basic compare map routing
This commit is contained in:
35
src/stores/mapCompareStore.ts
Normal file
35
src/stores/mapCompareStore.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import AllMapData from '@/stores/allMapData.js';
|
||||
import { INSIGHTS_FIELDS_AND_LABELS } from '@/constants/constants';
|
||||
import ImgCapsuleGlow1 from '@/assets/capsule1-glow.svg';
|
||||
import ImgCapsuleGlow2 from '@/assets/capsule2-glow.svg';
|
||||
import ImgCapsuleGlow3 from '@/assets/capsule3-glow.svg';
|
||||
import ImgCapsuleGlow4 from '@/assets/capsule4-glow.svg';
|
||||
import ImgCapsule1 from '@/assets/capsule1.svg';
|
||||
import ImgCapsule2 from '@/assets/capsule2.svg';
|
||||
import ImgCapsule3 from '@/assets/capsule3.svg';
|
||||
import ImgCapsule4 from '@/assets/capsule4.svg';
|
||||
|
||||
const ImgCapsulesGlow = [ImgCapsuleGlow1, ImgCapsuleGlow2, ImgCapsuleGlow3, ImgCapsuleGlow4];
|
||||
const ImgCapsules = [ImgCapsule1, ImgCapsule2, ImgCapsule3, ImgCapsule4];
|
||||
|
||||
export default defineStore('useMapCompareStore', {
|
||||
state: () => ({
|
||||
routeParam: {
|
||||
primaryType: '',
|
||||
primaryId: '',
|
||||
secondaryType: '',
|
||||
secondaryId: '',
|
||||
},
|
||||
}),
|
||||
actions: {
|
||||
setCompareRouteParam(primaryType: string, primaryId: string, secondaryType: string, secondaryId: string) {
|
||||
this.routeParam = {
|
||||
primaryType: primaryType,
|
||||
primaryId: primaryId,
|
||||
secondaryType: secondaryType,
|
||||
secondaryId: secondaryId,
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user