basic compare map routing

This commit is contained in:
Cindy Chang
2024-09-03 15:33:25 +08:00
parent d16f7a264e
commit 11d5109164
7 changed files with 597 additions and 6 deletions

View 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,
}
},
},
});