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

@@ -222,12 +222,12 @@
</template>
<script>
import { storeToRefs, mapActions, } from 'pinia';
import MapCompareStore from '@/stores/mapCompareStore';
import LoginStore from '@/stores/login';
import filesStore from '@/stores/files.js';
import AllMapDataStore from '@/stores/allMapData.js';
import PageAdmin from '@/stores/pageAdmin.js';
import LoadingStore from '@/stores/loading.js';
import { useMapCompareStore } from '@/stores/mapCompareStore';
import { useLoginStore } from '@/stores/login';
import { useFilesStore } from '@/stores/files.js';
import { useAllMapDataStore } from '@/stores/allMapData.js';
import { usePageAdminStore } from '@/stores/pageAdmin.js';
import { useLoadingStore } from '@/stores/loading.js';
import IconDataFormat from '@/components/icons/IconDataFormat.vue';
import IconRule from '@/components/icons/IconRule.vue';
import IconsFilter from '@/components/icons/IconsFilter.vue';
@@ -240,7 +240,7 @@
export default {
data() {
return {
mapCompareStore: MapCompareStore(),
mapCompareStore: useMapCompareStore(),
isActive: null,
isHover: null,
switchListOrGrid: false,
@@ -286,10 +286,10 @@
}
},
setup() {
const loginStore = LoginStore();
const store = filesStore();
const allMapDataStore = AllMapDataStore();
const loadingStore = LoadingStore();
const loginStore = useLoginStore();
const store = useFilesStore();
const allMapDataStore = useAllMapDataStore();
const loadingStore = useLoadingStore();
const { dependentsData, filesTag } = storeToRefs(store);
const { createFilterId, baseLogId } = storeToRefs(allMapDataStore);
const { isLoading } = storeToRefs(loadingStore);
@@ -605,7 +605,7 @@
}
},
...mapActions(
PageAdmin, ['setCurrentMapFile',],
usePageAdminStore, ['setCurrentMapFile',],
)
},
mounted() {