mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-06 03:58:04 +08:00
fix: 修改历史记录的最大值的设定位置
This commit is contained in:
parent
991b134e23
commit
ee9a93b353
@ -38,4 +38,7 @@ export const carouselInterval = 4000
|
|||||||
export const backgroundImageSize = 5
|
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'
|
import { SettingStoreEnums, ToolsStatusEnum } from '@/store/modules/settingStore/settingStore.d'
|
||||||
|
|
||||||
// * 系统全局设置
|
// * 用户配置项
|
||||||
export const systemSetting = {
|
export const systemSetting = {
|
||||||
// 侧边栏折叠是否隐藏全部
|
// 侧边栏折叠是否隐藏全部
|
||||||
[SettingStoreEnums.ASIDE_ALL_COLLAPSED]: true,
|
[SettingStoreEnums.ASIDE_ALL_COLLAPSED]: true,
|
||||||
|
@ -2,6 +2,7 @@ import { defineStore } from 'pinia'
|
|||||||
import { CreateComponentType } from '@/packages/index.d'
|
import { CreateComponentType } from '@/packages/index.d'
|
||||||
import { EditCanvasType } from '@/store/modules/chartEditStore/chartEditStore.d'
|
import { EditCanvasType } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||||
import { loadingStart, loadingFinish, loadingError } from '@/utils'
|
import { loadingStart, loadingFinish, loadingError } from '@/utils'
|
||||||
|
import { editHistoryMax } from '@/settings/designSetting'
|
||||||
import {
|
import {
|
||||||
HistoryStackItemEnum,
|
HistoryStackItemEnum,
|
||||||
HistoryActionTypeEnum,
|
HistoryActionTypeEnum,
|
||||||
@ -61,7 +62,7 @@ export const useChartHistoryStore = defineStore({
|
|||||||
): void {
|
): void {
|
||||||
if (item instanceof Array) this.backStack = [...this.backStack, ...item]
|
if (item instanceof Array) this.backStack = [...this.backStack, ...item]
|
||||||
else this.backStack.push(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
|
if (notClear) return
|
||||||
this.clearForwardStack()
|
this.clearForwardStack()
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
<help-outline-icon></help-outline-icon>
|
<help-outline-icon></help-outline-icon>
|
||||||
</n-icon>
|
</n-icon>
|
||||||
</template>
|
</template>
|
||||||
<span>最多只保留 20 条记录</span>
|
<span>最多只保留{{ editHistoryMax }}条记录</span>
|
||||||
</n-tooltip>
|
</n-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -37,6 +37,7 @@ import { renderIcon } from '@/utils'
|
|||||||
import { useChartHistoryStore } from '@/store/modules/chartHistoryStore/chartHistoryStore'
|
import { useChartHistoryStore } from '@/store/modules/chartHistoryStore/chartHistoryStore'
|
||||||
import { historyActionTypeName } from '@/store/modules/chartHistoryStore/chartHistoryDefine'
|
import { historyActionTypeName } from '@/store/modules/chartHistoryStore/chartHistoryDefine'
|
||||||
import { CreateComponentType } from '@/packages/index.d'
|
import { CreateComponentType } from '@/packages/index.d'
|
||||||
|
import { editHistoryMax } from '@/settings/designSetting'
|
||||||
import {
|
import {
|
||||||
HistoryItemType,
|
HistoryItemType,
|
||||||
HistoryTargetTypeEnum,
|
HistoryTargetTypeEnum,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user