From 0053daed2f74a8f967a4dc8acc57ea99197b688a Mon Sep 17 00:00:00 2001 From: MTrun <1262327911@qq.com> Date: Fri, 25 Mar 2022 20:00:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9useChartHistoryStoreSt?= =?UTF-8?q?ore=E5=91=BD=E5=90=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plop/store-template/index.hbs | 2 +- src/store/modules/chartEditStore/chartEditStore.ts | 4 ++-- src/store/modules/chartHistoryStore/chartHistoryStore.ts | 2 +- src/views/chart/ContentEdit/components/EditHistory/index.vue | 4 ++-- src/views/chart/index.vue | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) 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() // 记录初始化