mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 新增图表展示模式切换
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
export enum ChartModeEnum {
|
||||
SINGLE= 'single',
|
||||
DOUBLE = 'double'
|
||||
}
|
||||
|
||||
export enum LayerModeEnum {
|
||||
THUMBNAIL = 'thumbnail',
|
||||
TEXT = 'text'
|
||||
@@ -7,6 +12,7 @@ export enum ChartLayoutStoreEnum {
|
||||
LAYERS = 'layers',
|
||||
CHARTS = 'charts',
|
||||
DETAILS = 'details',
|
||||
Chart_TYPE = 'chartType',
|
||||
LAYER_TYPE = 'layerType'
|
||||
}
|
||||
|
||||
@@ -17,6 +23,8 @@ export interface ChartLayoutType {
|
||||
[ChartLayoutStoreEnum.CHARTS]: boolean
|
||||
// 详情设置
|
||||
[ChartLayoutStoreEnum.DETAILS]: boolean
|
||||
// 组件展示方式
|
||||
[ChartLayoutStoreEnum.Chart_TYPE]: ChartModeEnum
|
||||
// 层级展示方式
|
||||
[ChartLayoutStoreEnum.LAYER_TYPE]: LayerModeEnum
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ChartLayoutType, LayerModeEnum } from './chartLayoutStore.d'
|
||||
import { ChartLayoutType, LayerModeEnum, ChartModeEnum } from './chartLayoutStore.d'
|
||||
import { setLocalStorage, getLocalStorage } from '@/utils'
|
||||
import { StorageEnum } from '@/enums/storageEnum'
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
||||
@@ -21,6 +21,8 @@ export const useChartLayoutStore = defineStore({
|
||||
charts: true,
|
||||
// 详情设置(收缩为true)
|
||||
details: false,
|
||||
// 组件列表展示类型(默认单列)
|
||||
chartType: ChartModeEnum.SINGLE,
|
||||
// 图层类型(默认图片)
|
||||
layerType: LayerModeEnum.THUMBNAIL
|
||||
},
|
||||
@@ -34,6 +36,9 @@ export const useChartLayoutStore = defineStore({
|
||||
getDetails(): boolean {
|
||||
return this.details
|
||||
},
|
||||
getChartType(): ChartModeEnum {
|
||||
return this.chartType
|
||||
},
|
||||
getLayerType(): LayerModeEnum {
|
||||
return this.layerType
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user