diff --git a/plop/store-template/index.hbs b/plop/store-template/index.hbs index bd184a49..702352da 100644 --- a/plop/store-template/index.hbs +++ b/plop/store-template/index.hbs @@ -3,7 +3,7 @@ import { {{upperDataName}}StoreType } from './{{name}}Store.d' import { setLocalStorage, getLocalStorage } from '@/utils' import { StorageEnum } from '@/enums/storageEnum' -export const use{{upperDataName}}StoreStore = defineStore({ +export const use{{upperDataName}}Store = defineStore({ id: 'use{{upperDataName}}Store', state: (): {{name}}StoreType => ({}), getters: {}, diff --git a/src/store/modules/chartEditStore/chartEditStore.ts b/src/store/modules/chartEditStore/chartEditStore.ts index 48c690aa..cea0fe8e 100644 --- a/src/store/modules/chartEditStore/chartEditStore.ts +++ b/src/store/modules/chartEditStore/chartEditStore.ts @@ -6,7 +6,7 @@ import cloneDeep from 'lodash/cloneDeep' import { defaultTheme, globalThemeJson } from '@/settings/chartThemes/index' import { requestInterval } from '@/settings/designSetting' // 记录记录 -import { useChartHistoryStoreStore } from '@/store/modules/chartHistoryStore/chartHistoryStore' +import { useChartHistoryStore } from '@/store/modules/chartHistoryStore/chartHistoryStore' import { HistoryActionTypeEnum, HistoryItemType, HistoryTargetTypeEnum } from '@/store/modules/chartHistoryStore/chartHistoryStore.d' import { ChartEditStoreEnum, @@ -20,7 +20,7 @@ import { EditCanvasConfigType } from './chartEditStore.d' -const chartHistoryStoreStore = useChartHistoryStoreStore() +const chartHistoryStoreStore = useChartHistoryStore() // 编辑区域内容 export const useChartEditStore = defineStore({ diff --git a/src/store/modules/chartHistoryStore/chartHistoryStore.ts b/src/store/modules/chartHistoryStore/chartHistoryStore.ts index 847feff7..4113eadd 100644 --- a/src/store/modules/chartHistoryStore/chartHistoryStore.ts +++ b/src/store/modules/chartHistoryStore/chartHistoryStore.ts @@ -10,7 +10,7 @@ import { ChartHistoryStoreType } from './chartHistoryStore.d' -export const useChartHistoryStoreStore = defineStore({ +export const useChartHistoryStore = defineStore({ id: 'useChartHistoryStore', state: (): ChartHistoryStoreType => ({ // 后退栈 diff --git a/src/views/chart/ContentEdit/components/EditHistory/index.vue b/src/views/chart/ContentEdit/components/EditHistory/index.vue index c38df282..737cfb3e 100644 --- a/src/views/chart/ContentEdit/components/EditHistory/index.vue +++ b/src/views/chart/ContentEdit/components/EditHistory/index.vue @@ -34,7 +34,7 @@ import { ref, computed } from 'vue' import { icon } from '@/plugins' import { renderIcon } from '@/utils' -import { useChartHistoryStoreStore } from '@/store/modules/chartHistoryStore/chartHistoryStore' +import { useChartHistoryStore } from '@/store/modules/chartHistoryStore/chartHistoryStore' import { historyActionTypeName } from '@/store/modules/chartHistoryStore/chartHistoryDefine' import { CreateComponentType } from '@/packages/index.d' import { @@ -55,7 +55,7 @@ const { const { StackedMoveIcon } = icon.carbon const showDropdownRef = ref(false) -const chartHistoryStoreStore = useChartHistoryStoreStore() +const chartHistoryStoreStore = useChartHistoryStore() // 设置类型对应图标 const iconHandle = (e: HistoryItemType) => { diff --git a/src/views/chart/index.vue b/src/views/chart/index.vue index 3be623d5..a143f748 100644 --- a/src/views/chart/index.vue +++ b/src/views/chart/index.vue @@ -39,9 +39,9 @@ import { loadAsyncComponent } from '@/utils' import { LayoutHeaderPro } from '@/layout/components/LayoutHeaderPro' import { useContextMenu } from './hooks/useContextMenu.hook' import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore' -import { useChartHistoryStoreStore } from '@/store/modules/chartHistoryStore/chartHistoryStore' +import { useChartHistoryStore } from '@/store/modules/chartHistoryStore/chartHistoryStore' -const chartHistoryStoreStore = useChartHistoryStoreStore() +const chartHistoryStoreStore = useChartHistoryStore() const chartEditStore = useChartEditStore() // 记录初始化