fix: 修改历史记录的最大值的设定位置
This commit is contained in:
parent
295115b6be
commit
8a30a763f0
@ -38,4 +38,7 @@ export const carouselInterval = 4000
|
||||
export const backgroundImageSize = 5
|
||||
|
||||
// 数据请求间隔
|
||||
export const requestInterval = 30
|
||||
export const requestInterval = 30
|
||||
|
||||
// 工作区域历史记录存储最大数量
|
||||
export const editHistoryMax = 100
|
@ -1,6 +1,6 @@
|
||||
import { SettingStoreEnums, ToolsStatusEnum } from '@/store/modules/settingStore/settingStore.d'
|
||||
|
||||
// * 系统全局设置
|
||||
// * 用户配置项
|
||||
export const systemSetting = {
|
||||
// 侧边栏折叠是否隐藏全部
|
||||
[SettingStoreEnums.ASIDE_ALL_COLLAPSED]: true,
|
||||
|
@ -2,6 +2,7 @@ import { defineStore } from 'pinia'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
import { EditCanvasType } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||
import { loadingStart, loadingFinish, loadingError } from '@/utils'
|
||||
import { editHistoryMax } from '@/settings/designSetting'
|
||||
import {
|
||||
HistoryStackItemEnum,
|
||||
HistoryActionTypeEnum,
|
||||
@ -61,7 +62,7 @@ export const useChartHistoryStore = defineStore({
|
||||
): void {
|
||||
if (item instanceof Array) this.backStack = [...this.backStack, ...item]
|
||||
else this.backStack.push(item)
|
||||
this.backStack.splice(0, this.backStack.length - 20)
|
||||
this.backStack.splice(0, this.backStack.length - editHistoryMax)
|
||||
// 新动作需清空前进栈
|
||||
if (notClear) return
|
||||
this.clearForwardStack()
|
||||
|
@ -25,7 +25,7 @@
|
||||
<help-outline-icon></help-outline-icon>
|
||||
</n-icon>
|
||||
</template>
|
||||
<span>最多只保留 20 条记录</span>
|
||||
<span>最多只保留{{ editHistoryMax }}条记录</span>
|
||||
</n-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
@ -37,6 +37,7 @@ import { renderIcon } from '@/utils'
|
||||
import { useChartHistoryStore } from '@/store/modules/chartHistoryStore/chartHistoryStore'
|
||||
import { historyActionTypeName } from '@/store/modules/chartHistoryStore/chartHistoryDefine'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
import { editHistoryMax } from '@/settings/designSetting'
|
||||
import {
|
||||
HistoryItemType,
|
||||
HistoryTargetTypeEnum,
|
||||
|
Loading…
x
Reference in New Issue
Block a user