Standardize store exports to named useXxxStore convention

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 13:25:00 +08:00
parent 147b16ca34
commit 90048d0505
69 changed files with 241 additions and 241 deletions

View File

@@ -64,12 +64,12 @@
import { onBeforeMount, computed, } from 'vue';
import { storeToRefs } from 'pinia';
import { useRoute } from 'vue-router';
import LoadingStore from '@/stores/loading.js';
import AllMapDataStore from '@/stores/allMapData.js';
import ConformanceStore from '@/stores/conformance.js';
import { useLoadingStore } from '@/stores/loading.js';
import { useAllMapDataStore } from '@/stores/allMapData.js';
import { useConformanceStore } from '@/stores/conformance.js';
import cytoscapeMap from '@/module/cytoscapeMap.js';
import CytoscapeStore from '@/stores/cytoscapeStore';
import MapPathStore from '@/stores/mapPathStore';
import { useCytoscapeStore } from '@/stores/cytoscapeStore';
import { useMapPathStore } from '@/stores/mapPathStore';
import SidebarView from '@/components/Discover/Map/SidebarView.vue';
import SidebarState from '@/components/Discover/Map/SidebarState.vue';
import SidebarTraces from '@/components/Discover/Map/SidebarTraces.vue';
@@ -83,8 +83,8 @@ const ImgCapsules = [ImgCapsule1, ImgCapsule2, ImgCapsule3, ImgCapsule4];
export default {
setup() {
const loadingStore = LoadingStore();
const allMapDataStore = AllMapDataStore();
const loadingStore = useLoadingStore();
const allMapDataStore = useAllMapDataStore();
const { isLoading } = storeToRefs(loadingStore);
const route = useRoute();
const { processMap, bpmn, stats, insights, traceId, traces, baseTraces, baseTraceId,
@@ -93,7 +93,7 @@ export default {
postRuleData
} = storeToRefs(allMapDataStore);
const cytoscapeStore = CytoscapeStore();
const cytoscapeStore = useCytoscapeStore();
const { setCurrentGraphId } = cytoscapeStore;
@@ -151,7 +151,7 @@ export default {
cytoscapeGraph: null,
curveStyle: 'unbundled-bezier', // unbundled-bezier | taxi
mapType: 'processMap', // processMap | bpmn
mapPathStore: MapPathStore(),
mapPathStore: useMapPathStore(),
dataLayerType: 'freq', // freq | duration
dataLayerOption: 'total',
rank: 'LR', // 直向 TB | 橫向 LR
@@ -534,7 +534,7 @@ export default {
const isCheckPage = to.name.includes('Check');
if (isCheckPage) {
const conformanceStore = ConformanceStore();
const conformanceStore = useConformanceStore();
switch (to.params.type) {
case 'log':
conformanceStore.conformanceLogCreateCheckId = to.params.fileId;