diff --git a/src/components/GoSystemSet/index.vue b/src/components/GoSystemSet/index.vue index 68cc8061..282fe84a 100644 --- a/src/components/GoSystemSet/index.vue +++ b/src/components/GoSystemSet/index.vue @@ -115,6 +115,13 @@ const list = reactive([ desc: '', value: '' }, + { + key: SettingStoreEnums.CHART_TOOLS_STATUS_HIDE, + value: settingStore.getChartToolsStatusHide, + type: 'switch', + name: '隐藏工具栏', + desc: '鼠标移入时,会展示切换到展开模式', + }, { key: SettingStoreEnums.CHART_TOOLS_STATUS, value: settingStore.getChartToolsStatus, diff --git a/src/settings/systemSetting.ts b/src/settings/systemSetting.ts index 65ccc4b2..84eb65d9 100644 --- a/src/settings/systemSetting.ts +++ b/src/settings/systemSetting.ts @@ -13,5 +13,7 @@ export const systemSetting = { // 图表拖拽时的吸附距离(px) [SettingStoreEnums.CHART_ALIGN_RANGE]: 10, // 图表工具栏状态(侧边工具状态) - [SettingStoreEnums.CHART_TOOLS_STATUS]: ToolsStatusEnum.ASIDE + [SettingStoreEnums.CHART_TOOLS_STATUS]: ToolsStatusEnum.ASIDE, + // 图表工具栏状态隐藏(刚开始不隐藏) + [SettingStoreEnums.CHART_TOOLS_STATUS_HIDE]: false, } \ No newline at end of file diff --git a/src/store/modules/settingStore/settingStore.d.ts b/src/store/modules/settingStore/settingStore.d.ts index 5da4dfe6..09ba684f 100644 --- a/src/store/modules/settingStore/settingStore.d.ts +++ b/src/store/modules/settingStore/settingStore.d.ts @@ -4,12 +4,20 @@ export enum ToolsStatusEnum { } export enum SettingStoreEnums { + // 拖拽页面左侧表单分类只有一项的时候是否隐藏 HIDE_PACKAGE_ONE_CATEGORY = 'hidePackageOneCategory', + // 切换语言是否进行路由刷新 CHANGE_LANG_RELOAD = 'changeLangReload', + // 侧边栏折叠是否隐藏全部 ASIDE_ALL_COLLAPSED = 'asideAllCollapsed', + // 图表移动时按方向键移动的距离 CHART_MOVE_DISTANCE = 'chartMoveDistance', + // 图表拖拽时的吸附距离(px) CHART_ALIGN_RANGE = 'chartAlignRange', + // 图表工具栏状态(侧边工具状态) CHART_TOOLS_STATUS = 'chartToolsStatus', + // 图表工具栏状态隐藏 + CHART_TOOLS_STATUS_HIDE = 'chartToolsStatusHide' } export interface SettingStoreType { @@ -19,4 +27,5 @@ export interface SettingStoreType { [SettingStoreEnums.CHART_MOVE_DISTANCE]: number [SettingStoreEnums.CHART_ALIGN_RANGE]: number [SettingStoreEnums.CHART_TOOLS_STATUS]: ToolsStatusEnum + [SettingStoreEnums.CHART_TOOLS_STATUS_HIDE]: boolean } diff --git a/src/store/modules/settingStore/settingStore.ts b/src/store/modules/settingStore/settingStore.ts index 775cd132..4a90f7ae 100644 --- a/src/store/modules/settingStore/settingStore.ts +++ b/src/store/modules/settingStore/settingStore.ts @@ -35,7 +35,10 @@ export const useSettingStore = defineStore({ }, getChartToolsStatus(): ToolsStatusEnum { return this.chartToolsStatus - } + }, + getChartToolsStatusHide(): boolean { + return this.chartToolsStatusHide + }, }, actions: { setItem( diff --git a/src/views/chart/ContentEdit/components/EditTools/index.vue b/src/views/chart/ContentEdit/components/EditTools/index.vue index d824aabd..80c96308 100644 --- a/src/views/chart/ContentEdit/components/EditTools/index.vue +++ b/src/views/chart/ContentEdit/components/EditTools/index.vue @@ -1,38 +1,26 @@