go-view-worker 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +221 -0
- package/dist/chunks/403-382550a8.js +42 -0
- package/dist/chunks/404-3d357d75.js +42 -0
- package/dist/chunks/500-96d14fb0.js +43 -0
- package/dist/chunks/StylesSetting-952ff564.js +338 -0
- package/dist/chunks/chartEditStore-a725b558.js +4975 -0
- package/dist/chunks/designStore-fe92c2ba.js +6268 -0
- package/dist/chunks/index-00b6339d.js +588 -0
- package/dist/chunks/index-0472b3a5.js +173 -0
- package/dist/chunks/index-097ae4b0.js +436 -0
- package/dist/chunks/index-09e62bb4.js +284 -0
- package/dist/chunks/index-1cb69ab6.js +136 -0
- package/dist/chunks/index-32d13283.js +26 -0
- package/dist/chunks/index-3fd591ea.js +81 -0
- package/dist/chunks/index-51458edb.js +143 -0
- package/dist/chunks/index-54f304ef.js +89 -0
- package/dist/chunks/index-62a7855c.js +51 -0
- package/dist/chunks/index-82d00e13.js +300 -0
- package/dist/chunks/index-9502bd7e.js +155 -0
- package/dist/chunks/index-95c5f0a0.js +1664 -0
- package/dist/chunks/index-a410a1d3.js +250 -0
- package/dist/chunks/index-da8ddb02.js +13 -0
- package/dist/chunks/index-de0a1234.js +482 -0
- package/dist/chunks/index-e31a7881.js +32 -0
- package/dist/chunks/index-f266153a.js +1985 -0
- package/dist/chunks/index-f97e5ffc.js +13 -0
- package/dist/chunks/index-fdf7dc1e.js +88 -0
- package/dist/chunks/index-fec9f9f8.js +368 -0
- package/dist/chunks/index.vue_vue_type_script_setup_true_lang-c6159a17.js +3357 -0
- package/dist/chunks/lodash-c80b695e.js +3680 -0
- package/dist/chunks/router-106a6abc.js +57 -0
- package/dist/chunks/useKeyboard.hook-da88451a.js +341 -0
- package/dist/chunks/useSyncUpdate.hook-5517a8ad.js +40 -0
- package/dist/chunks/useTargetData.hook-28a7e43b.js +12 -0
- package/dist/chunks/wrapper-4c15ca94.js +28 -0
- package/dist/favicon.ico +0 -0
- package/dist/go-view-worker.js +23 -0
- package/dist/init.js +688 -0
- package/dist/style.css +7 -0
- package/dist/types/packages/index.d.ts +12 -0
- package/dist/types/packages/init.d.ts +6 -0
- package/dist/types/packages/utils/resize.d.ts +1 -0
- package/dist/types/src/components/GoAppProvider/index.d.ts +3 -0
- package/dist/types/src/components/GoIconify/index.d.ts +3 -0
- package/dist/types/src/components/GoLoading/index.d.ts +5 -0
- package/dist/types/src/components/GoReload/index.d.ts +3 -0
- package/dist/types/src/components/GoSkeleton/index.d.ts +3 -0
- package/dist/types/src/components/GoSystemInfo/index.d.ts +3 -0
- package/dist/types/src/components/GoSystemSet/index.d.ts +3 -0
- package/dist/types/src/components/GoThemeSelect/index.d.ts +3 -0
- package/dist/types/src/components/GoUserInfo/index.d.ts +3 -0
- package/dist/types/src/components/Pages/ChartGlobImage/index.d.ts +3 -0
- package/dist/types/src/components/Pages/ChartItemSetting/index.d.ts +11 -0
- package/dist/types/src/components/Pages/Flipper/index.d.ts +4 -0
- package/dist/types/src/components/Pages/ThemeColorSelect/index.d.ts +3 -0
- package/dist/types/src/components/Pages/VChartItemSetting/index.d.ts +8 -0
- package/dist/types/src/components/Plugins/DialogContent/index.d.ts +3 -0
- package/dist/types/src/components/Plugins/LoadingContent/index.d.ts +3 -0
- package/dist/types/src/components/Plugins/MessageContent/index.d.ts +3 -0
- package/dist/types/src/components/Tips/MacOsControlBtn/index.d.ts +3 -0
- package/dist/types/src/directives/index.d.ts +2 -0
- package/dist/types/src/enums/editPageEnum.d.ts +55 -0
- package/dist/types/src/enums/eventEnum.d.ts +32 -0
- package/dist/types/src/enums/fileTypeEnum.d.ts +7 -0
- package/dist/types/src/enums/httpEnum.d.ts +96 -0
- package/dist/types/src/enums/pageEnum.d.ts +34 -0
- package/dist/types/src/enums/pluginEnum.d.ts +6 -0
- package/dist/types/src/enums/storageEnum.d.ts +10 -0
- package/dist/types/src/enums/styleEnum.d.ts +14 -0
- package/dist/types/src/hooks/index.d.ts +6 -0
- package/dist/types/src/hooks/useCanvasInitOptions.hook.d.ts +8 -0
- package/dist/types/src/hooks/useChartDataPondFetch.hook.d.ts +8 -0
- package/dist/types/src/hooks/useChartInteract.hook.d.ts +9 -0
- package/dist/types/src/hooks/useLang.hook.d.ts +126 -0
- package/dist/types/src/hooks/useLifeHandler.hook.d.ts +10 -0
- package/dist/types/src/hooks/usePreviewScale.hook.d.ts +32 -0
- package/dist/types/src/hooks/useTheme.hook.d.ts +7 -0
- package/dist/types/src/layout/components/LayoutFooter/index.d.ts +3 -0
- package/dist/types/src/layout/components/LayoutHeader/index.d.ts +3 -0
- package/dist/types/src/layout/components/LayoutHeaderPro/index.d.ts +3 -0
- package/dist/types/src/layout/components/LayoutMain/index.d.ts +3 -0
- package/dist/types/src/layout/components/LayoutTransitionMain/index.d.ts +3 -0
- package/dist/types/src/main.d.ts +1 -0
- package/dist/types/src/packages/chartConfiguration/echarts/axis.d.ts +24 -0
- package/dist/types/src/packages/chartConfiguration/echarts/index.d.ts +4 -0
- package/dist/types/src/packages/chartConfiguration/echarts/label.d.ts +10 -0
- package/dist/types/src/packages/chartConfiguration/echarts/legend.d.ts +18 -0
- package/dist/types/src/packages/chartConfiguration/echarts/line.d.ts +8 -0
- package/dist/types/src/packages/chartConfiguration/vcharts/index.d.ts +3 -0
- package/dist/types/src/packages/chartConfiguration/vcharts/label.d.ts +14 -0
- package/dist/types/src/packages/chartConfiguration/vcharts/legends.d.ts +27 -0
- package/dist/types/src/packages/chartConfiguration/vcharts/style.d.ts +18 -0
- package/dist/types/src/packages/components/Charts/Bars/BarCommon/config.d.ts +63 -0
- package/dist/types/src/packages/components/Charts/Bars/BarCommon/index.d.ts +3 -0
- package/dist/types/src/packages/components/Charts/Bars/index.d.ts +2 -0
- package/dist/types/src/packages/components/Charts/index.d.ts +8 -0
- package/dist/types/src/packages/components/Photos/Private/index.d.ts +17 -0
- package/dist/types/src/packages/components/Photos/Share/index.d.ts +14 -0
- package/dist/types/src/packages/components/Photos/index.d.ts +9 -0
- package/dist/types/src/packages/index.d.ts +214 -0
- package/dist/types/src/packages/public/index.d.ts +2 -0
- package/dist/types/src/packages/public/publicConfig.d.ts +81 -0
- package/dist/types/src/packages/public/vChart.d.ts +14 -0
- package/dist/types/src/plugins/customComponents.d.ts +7 -0
- package/dist/types/src/plugins/directives.d.ts +7 -0
- package/dist/types/src/plugins/icon.d.ts +111 -0
- package/dist/types/src/plugins/index.d.ts +5 -0
- package/dist/types/src/plugins/initFunction.d.ts +4 -0
- package/dist/types/src/plugins/naive.d.ts +3 -0
- package/dist/types/src/router/base.d.ts +7 -0
- package/dist/types/src/router/constant.d.ts +5 -0
- package/dist/types/src/router/index.d.ts +6 -0
- package/dist/types/src/router/modules/chart.route.d.ts +4 -0
- package/dist/types/src/router/modules/index.d.ts +5 -0
- package/dist/types/src/router/modules/preview.route.d.ts +4 -0
- package/dist/types/src/router/router-guards.d.ts +3 -0
- package/dist/types/src/router/types.d.ts +26 -0
- package/dist/types/src/settings/animations/index.d.ts +7 -0
- package/dist/types/src/settings/chartThemes/index.d.ts +195 -0
- package/dist/types/src/settings/designSetting.d.ts +33 -0
- package/dist/types/src/settings/pathConst.d.ts +3 -0
- package/dist/types/src/settings/systemSetting.d.ts +11 -0
- package/dist/types/src/settings/vchartThemes/index.d.ts +139 -0
- package/dist/types/src/store/index.d.ts +5 -0
- package/dist/types/src/store/modules/chartEditStore/chartEditStore.d.ts +215 -0
- package/dist/types/src/store/modules/chartHistoryStore/chartHistoryDefine.d.ts +20 -0
- package/dist/types/src/store/modules/chartHistoryStore/chartHistoryStore.d.ts +79 -0
- package/dist/types/src/store/modules/chartLayoutStore/chartLayoutStore.d.ts +36 -0
- package/dist/types/src/store/modules/designStore/designStore.d.ts +20 -0
- package/dist/types/src/store/modules/globalConfigStore/globalConfigStore.d.ts +183 -0
- package/dist/types/src/store/modules/langStore/langStore.d.ts +6 -0
- package/dist/types/src/store/modules/packagesStore/packagesStore.d.ts +10 -0
- package/dist/types/src/store/modules/settingStore/settingStore.d.ts +31 -0
- package/dist/types/src/utils/components.d.ts +13 -0
- package/dist/types/src/utils/file.d.ts +19 -0
- package/dist/types/src/utils/index.d.ts +8 -0
- package/dist/types/src/utils/plugin.d.ts +30 -0
- package/dist/types/src/utils/router.d.ts +77 -0
- package/dist/types/src/utils/storage.d.ts +35 -0
- package/dist/types/src/utils/style.d.ts +154 -0
- package/dist/types/src/utils/type.d.ts +8 -0
- package/dist/types/src/utils/utils.d.ts +128 -0
- package/dist/types/src/views/chart/ContentBox/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentCharts/components/ChartsItemBox/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentCharts/components/ChartsOptionContent/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentCharts/components/ChartsSearch/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentCharts/hooks/useAside.hook.d.ts +11 -0
- package/dist/types/src/views/chart/ContentCharts/hooks/useLayout.hook.d.ts +10 -0
- package/dist/types/src/views/chart/ContentCharts/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentConfigurations/components/CanvasPage/components/CreateColorRender/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentConfigurations/components/CanvasPage/components/CreateColorRenderChart/barOptions.d.ts +2 -0
- package/dist/types/src/views/chart/ContentConfigurations/components/CanvasPage/components/CreateColorRenderChart/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentConfigurations/components/CanvasPage/components/CreateColorRenderChart/lineOptions.d.ts +2 -0
- package/dist/types/src/views/chart/ContentConfigurations/components/CanvasPage/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentConfigurations/components/hooks/useTargetData.hook.d.ts +57 -0
- package/dist/types/src/views/chart/ContentConfigurations/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentEdit/components/EditAlignLine/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentEdit/components/EditBottom/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentEdit/components/EditGroup/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentEdit/components/EditHistory/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentEdit/components/EditRange/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentEdit/components/EditRule/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentEdit/components/EditSelect/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentEdit/components/EditShapeBox/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentEdit/components/EditShortcutKey/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentEdit/components/EditTools/hooks/useFile.hooks.d.ts +9 -0
- package/dist/types/src/views/chart/ContentEdit/components/EditTools/hooks/useSyncUpdate.hook.d.ts +3 -0
- package/dist/types/src/views/chart/ContentEdit/components/EditTools/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentEdit/components/EditTools/utils/index.d.ts +1 -0
- package/dist/types/src/views/chart/ContentEdit/components/EditWatermark/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentEdit/hooks/useDrag.hook.d.ts +13 -0
- package/dist/types/src/views/chart/ContentEdit/hooks/useLayout.hook.d.ts +1 -0
- package/dist/types/src/views/chart/ContentEdit/hooks/useStyle.hook.d.ts +17 -0
- package/dist/types/src/views/chart/ContentEdit/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentHeader/headerLeftBtn/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentHeader/headerRightBtn/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentHeader/headerTitle/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentLayers/components/LayersGroupListItem/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentLayers/components/LayersListItem/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentLayers/components/LayersStatus/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentLayers/enums.d.ts +0 -0
- package/dist/types/src/views/chart/ContentLayers/index.d.ts +3 -0
- package/dist/types/src/views/chart/ContentLoad/index.d.ts +3 -0
- package/dist/types/src/views/chart/hooks/useContextMenu.hook.d.ts +12 -0
- package/dist/types/src/views/chart/hooks/useKeyboard.hook.d.ts +38 -0
- package/dist/types/src/views/chart/hooks/useSync.hook.d.ts +5 -0
- package/dist/types/src/views/preview/components/PreviewRenderGroup/index.d.ts +3 -0
- package/dist/types/src/views/preview/components/PreviewRenderList/index.d.ts +3 -0
- package/dist/types/src/views/preview/hooks/useComInstall.hook.d.ts +5 -0
- package/dist/types/src/views/preview/hooks/useScale.hook.d.ts +17 -0
- package/dist/types/src/views/preview/hooks/useStore.hook.d.ts +3 -0
- package/dist/types/src/views/preview/utils/drag.d.ts +1 -0
- package/dist/types/src/views/preview/utils/index.d.ts +4 -0
- package/dist/types/src/views/preview/utils/keyboard.d.ts +1 -0
- package/dist/types/src/views/preview/utils/storage.d.ts +6 -0
- package/dist/types/src/views/preview/utils/style.d.ts +26 -0
- package/package.json +99 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { default as themeJson } from './global.theme.json';
|
|
2
|
+
|
|
3
|
+
declare type ThemeJsonType = typeof themeJson;
|
|
4
|
+
export declare type FontType = {
|
|
5
|
+
fontSize: number;
|
|
6
|
+
fontFamily: string;
|
|
7
|
+
fontWeight: string;
|
|
8
|
+
fill: string;
|
|
9
|
+
dy?: number;
|
|
10
|
+
dx?: number;
|
|
11
|
+
angle?: number;
|
|
12
|
+
[T: string]: any;
|
|
13
|
+
};
|
|
14
|
+
export interface vChartGlobalThemeJsonType extends Partial<ThemeJsonType> {
|
|
15
|
+
dataset?: any;
|
|
16
|
+
[T: string]: any;
|
|
17
|
+
}
|
|
18
|
+
export declare const vChartGlobalThemeJson: {
|
|
19
|
+
dataset: null;
|
|
20
|
+
legends: {
|
|
21
|
+
visible: boolean;
|
|
22
|
+
position: string;
|
|
23
|
+
orient: string;
|
|
24
|
+
item: {
|
|
25
|
+
visible: boolean;
|
|
26
|
+
align: string;
|
|
27
|
+
shape: string;
|
|
28
|
+
label: {
|
|
29
|
+
style: {
|
|
30
|
+
fontSize: number;
|
|
31
|
+
fill: string;
|
|
32
|
+
fontFamily: string;
|
|
33
|
+
fontWeight: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
}[];
|
|
38
|
+
tooltip: {
|
|
39
|
+
visible: boolean;
|
|
40
|
+
style: {
|
|
41
|
+
panel: {
|
|
42
|
+
padding: {
|
|
43
|
+
top: number;
|
|
44
|
+
bottom: number;
|
|
45
|
+
left: number;
|
|
46
|
+
right: number;
|
|
47
|
+
};
|
|
48
|
+
backgroundColor: string;
|
|
49
|
+
border: {
|
|
50
|
+
color: string;
|
|
51
|
+
width: number;
|
|
52
|
+
radius: number;
|
|
53
|
+
};
|
|
54
|
+
shadow: {
|
|
55
|
+
x: number;
|
|
56
|
+
y: number;
|
|
57
|
+
blur: number;
|
|
58
|
+
spread: number;
|
|
59
|
+
color: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
titleLabel: {
|
|
63
|
+
fontSize: number;
|
|
64
|
+
fill: string;
|
|
65
|
+
fontWeight: string;
|
|
66
|
+
fontFamily: string;
|
|
67
|
+
align: string;
|
|
68
|
+
lineHeight: number;
|
|
69
|
+
};
|
|
70
|
+
keyLabel: {
|
|
71
|
+
fontSize: number;
|
|
72
|
+
fill: string;
|
|
73
|
+
fontWeight: string;
|
|
74
|
+
fontFamily: string;
|
|
75
|
+
align: string;
|
|
76
|
+
lineHeight: number;
|
|
77
|
+
};
|
|
78
|
+
valueLabel: {
|
|
79
|
+
fontSize: number;
|
|
80
|
+
fill: string;
|
|
81
|
+
fontWeight: string;
|
|
82
|
+
fontFamily: string;
|
|
83
|
+
align: string;
|
|
84
|
+
lineHeight: number;
|
|
85
|
+
};
|
|
86
|
+
shape: {
|
|
87
|
+
size: number;
|
|
88
|
+
spacing: number;
|
|
89
|
+
shapeLineWidth: number;
|
|
90
|
+
};
|
|
91
|
+
spaceRow: number;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
label: {
|
|
95
|
+
visible: boolean;
|
|
96
|
+
position: string;
|
|
97
|
+
offset: number;
|
|
98
|
+
type: string;
|
|
99
|
+
style: {
|
|
100
|
+
fontSize: number;
|
|
101
|
+
fill: string;
|
|
102
|
+
fontFamily: string;
|
|
103
|
+
fontWeight: string;
|
|
104
|
+
angle: number;
|
|
105
|
+
dx: number;
|
|
106
|
+
dy: number;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
bar: {
|
|
110
|
+
style: {
|
|
111
|
+
width: number;
|
|
112
|
+
cornerRadius: number;
|
|
113
|
+
fillOpacity: number;
|
|
114
|
+
opacity: number;
|
|
115
|
+
texture: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
line: {
|
|
119
|
+
style: {
|
|
120
|
+
lineWidth: number;
|
|
121
|
+
lineCap: string;
|
|
122
|
+
curveType: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
point: {
|
|
126
|
+
visible: boolean;
|
|
127
|
+
style: {
|
|
128
|
+
symbolType: string;
|
|
129
|
+
size: number;
|
|
130
|
+
fillOpacity: number;
|
|
131
|
+
lineWidth: number;
|
|
132
|
+
stroke: string;
|
|
133
|
+
strokeOpacity: number;
|
|
134
|
+
dx: number;
|
|
135
|
+
dy: number;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
export {};
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { CreateComponentType, CreateComponentGroupType, FilterEnum } from '../../../packages/index.d';
|
|
2
|
+
import { HistoryActionTypeEnum } from '../chartHistoryStore/chartHistoryStore.d';
|
|
3
|
+
import { RequestHttpEnum, RequestContentTypeEnum, RequestDataTypeEnum, RequestHttpIntervalEnum, RequestParams, RequestBodyEnum, RequestParamsObjType } from '../../../enums/httpEnum';
|
|
4
|
+
import { PreviewScaleEnum } from '../../../enums/styleEnum';
|
|
5
|
+
import { ChartColorsNameType, CustomColorsType, GlobalThemeJsonType } from '../../../settings/chartThemes/index';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
// 编辑画布属性
|
|
9
|
+
export enum EditCanvasTypeEnum {
|
|
10
|
+
EDIT_LAYOUT_DOM = 'editLayoutDom',
|
|
11
|
+
EDIT_CONTENT_DOM = 'editContentDom',
|
|
12
|
+
OFFSET = 'offset',
|
|
13
|
+
SCALE = 'scale',
|
|
14
|
+
USER_SCALE = 'userScale',
|
|
15
|
+
LOCK_SCALE = 'lockScale',
|
|
16
|
+
IS_CREATE = 'isCreate',
|
|
17
|
+
IS_DRAG = 'isDrag',
|
|
18
|
+
IS_SELECT = 'isSelect',
|
|
19
|
+
IS_CODE_EDIT="isCodeEdit"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// 编辑区域
|
|
23
|
+
export type EditCanvasType = {
|
|
24
|
+
// 编辑区域 DOM
|
|
25
|
+
[EditCanvasTypeEnum.EDIT_LAYOUT_DOM]: HTMLElement | null
|
|
26
|
+
[EditCanvasTypeEnum.EDIT_CONTENT_DOM]: HTMLElement | null
|
|
27
|
+
// 偏移大小
|
|
28
|
+
[EditCanvasTypeEnum.OFFSET]: number
|
|
29
|
+
// 缩放
|
|
30
|
+
[EditCanvasTypeEnum.SCALE]: number
|
|
31
|
+
// 缩放
|
|
32
|
+
[EditCanvasTypeEnum.USER_SCALE]: number
|
|
33
|
+
// 锁定缩放
|
|
34
|
+
[EditCanvasTypeEnum.LOCK_SCALE]: boolean
|
|
35
|
+
// 初始化创建
|
|
36
|
+
[EditCanvasTypeEnum.IS_CREATE]: boolean
|
|
37
|
+
// 拖拽中
|
|
38
|
+
[EditCanvasTypeEnum.IS_DRAG]: boolean
|
|
39
|
+
// 框选中
|
|
40
|
+
[EditCanvasTypeEnum.IS_SELECT]: boolean
|
|
41
|
+
// 代码编辑中
|
|
42
|
+
[EditCanvasTypeEnum.IS_CODE_EDIT]: boolean
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// 滤镜/背景色/宽高主题等
|
|
46
|
+
export enum EditCanvasConfigEnum {
|
|
47
|
+
PROJECT_NAME = 'projectName',
|
|
48
|
+
WIDTH = 'width',
|
|
49
|
+
HEIGHT = 'height',
|
|
50
|
+
CHART_THEME_COLOR = 'chartThemeColor',
|
|
51
|
+
CHART_CUSTOM_THEME_COLOR_INFO = 'chartCustomThemeColorInfo',
|
|
52
|
+
CHART_THEME_SETTING = 'chartThemeSetting',
|
|
53
|
+
VCHART_THEME_NAME = 'vChartThemeName',
|
|
54
|
+
BACKGROUND = 'background',
|
|
55
|
+
BACKGROUND_IMAGE = 'backgroundImage',
|
|
56
|
+
SELECT_COLOR = 'selectColor',
|
|
57
|
+
PREVIEW_SCALE_TYPE = 'previewScaleType'
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface EditCanvasConfigType {
|
|
61
|
+
// 滤镜-启用
|
|
62
|
+
[FilterEnum.FILTERS_SHOW]: boolean
|
|
63
|
+
// 滤镜-色相
|
|
64
|
+
[FilterEnum.HUE_ROTATE]: number
|
|
65
|
+
// 滤镜-饱和度
|
|
66
|
+
[FilterEnum.SATURATE]: number
|
|
67
|
+
// 滤镜-亮度
|
|
68
|
+
[FilterEnum.BRIGHTNESS]: number
|
|
69
|
+
// 滤镜-对比度
|
|
70
|
+
[FilterEnum.CONTRAST]: number
|
|
71
|
+
// 滤镜-不透明度
|
|
72
|
+
[FilterEnum.OPACITY]: number
|
|
73
|
+
// 变换(暂不使用)
|
|
74
|
+
[FilterEnum.ROTATE_Z]: number
|
|
75
|
+
[FilterEnum.ROTATE_X]: number
|
|
76
|
+
[FilterEnum.ROTATE_Y]: number
|
|
77
|
+
[FilterEnum.SKEW_X]: number
|
|
78
|
+
[FilterEnum.SKEW_Y]: number
|
|
79
|
+
[FilterEnum.BLEND_MODE]: string
|
|
80
|
+
// 大屏名称
|
|
81
|
+
[EditCanvasConfigEnum.PROJECT_NAME]?: string
|
|
82
|
+
// 大屏宽度
|
|
83
|
+
[EditCanvasConfigEnum.WIDTH]: number
|
|
84
|
+
// 大屏高度
|
|
85
|
+
[EditCanvasConfigEnum.HEIGHT]: number
|
|
86
|
+
// 背景色
|
|
87
|
+
[EditCanvasConfigEnum.BACKGROUND]?: string
|
|
88
|
+
// 背景图片
|
|
89
|
+
[EditCanvasConfigEnum.BACKGROUND_IMAGE]?: string | null
|
|
90
|
+
// 图表主题颜色
|
|
91
|
+
[EditCanvasConfigEnum.CHART_THEME_COLOR]: ChartColorsNameType
|
|
92
|
+
// 自定义图表主题颜色
|
|
93
|
+
[EditCanvasConfigEnum.CHART_CUSTOM_THEME_COLOR_INFO]?: CustomColorsType[]
|
|
94
|
+
// 图表全局配置
|
|
95
|
+
[EditCanvasConfigEnum.CHART_THEME_SETTING]: GlobalThemeJsonType
|
|
96
|
+
// 图表主题颜色
|
|
97
|
+
[EditCanvasConfigEnum.SELECT_COLOR]: boolean,
|
|
98
|
+
// vChart 主题
|
|
99
|
+
[EditCanvasConfigEnum.VCHART_THEME_NAME]: string
|
|
100
|
+
// 预览展示方式
|
|
101
|
+
[EditCanvasConfigEnum.PREVIEW_SCALE_TYPE]: PreviewScaleEnum
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// 坐标轴信息
|
|
105
|
+
// eslint-disable-next-line no-redeclare
|
|
106
|
+
export enum EditCanvasTypeEnum {
|
|
107
|
+
START_X = 'startX',
|
|
108
|
+
START_Y = 'startY',
|
|
109
|
+
X = 'x',
|
|
110
|
+
Y = 'y'
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// 鼠标位置
|
|
114
|
+
export type MousePositionType = {
|
|
115
|
+
// 开始 X
|
|
116
|
+
[EditCanvasTypeEnum.START_X]: number
|
|
117
|
+
// 开始 Y
|
|
118
|
+
[EditCanvasTypeEnum.START_Y]: number
|
|
119
|
+
// X
|
|
120
|
+
[EditCanvasTypeEnum.X]: number
|
|
121
|
+
// y
|
|
122
|
+
[EditCanvasTypeEnum.Y]: number
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// 操作目标
|
|
126
|
+
export type TargetChartType = {
|
|
127
|
+
hoverId?: string
|
|
128
|
+
selectId: string[]
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// 数据记录
|
|
132
|
+
export type RecordChartType = {
|
|
133
|
+
charts: CreateComponentType | CreateComponentGroupType | Array<CreateComponentType | CreateComponentGroupType>
|
|
134
|
+
type: HistoryActionTypeEnum.CUT | HistoryActionTypeEnum.COPY
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Store 枚举
|
|
138
|
+
export enum ChartEditStoreEnum {
|
|
139
|
+
EDIT_RANGE = 'editRange',
|
|
140
|
+
EDIT_CANVAS = 'editCanvas',
|
|
141
|
+
RIGHT_MENU_SHOW = 'rightMenuShow',
|
|
142
|
+
MOUSE_POSITION = 'mousePosition',
|
|
143
|
+
TARGET_CHART = 'targetChart',
|
|
144
|
+
RECORD_CHART = 'recordChart',
|
|
145
|
+
// 以下需要存储
|
|
146
|
+
EDIT_CANVAS_CONFIG = 'editCanvasConfig',
|
|
147
|
+
REQUEST_GLOBAL_CONFIG = 'requestGlobalConfig',
|
|
148
|
+
COMPONENT_LIST = 'componentList'
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// 请求公共类型
|
|
152
|
+
type RequestPublicConfigType = {
|
|
153
|
+
// 时间单位(时分秒)
|
|
154
|
+
requestIntervalUnit: RequestHttpIntervalEnum
|
|
155
|
+
// 请求内容
|
|
156
|
+
requestParams: RequestParams
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// 数据池项类型
|
|
160
|
+
export type RequestDataPondItemType = {
|
|
161
|
+
dataPondId: string,
|
|
162
|
+
dataPondName: string,
|
|
163
|
+
dataPondRequestConfig: RequestConfigType
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// 全局的图表请求配置
|
|
167
|
+
export interface RequestGlobalConfigType extends RequestPublicConfigType {
|
|
168
|
+
// 组件定制轮询时间
|
|
169
|
+
requestInterval: number
|
|
170
|
+
// 请求源地址
|
|
171
|
+
requestOriginUrl?: string
|
|
172
|
+
// 公共数据池
|
|
173
|
+
requestDataPond: RequestDataPondItemType[]
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// 单个图表请求配置
|
|
177
|
+
export interface RequestConfigType extends RequestPublicConfigType {
|
|
178
|
+
// 所选全局数据池的对应 id
|
|
179
|
+
requestDataPondId?: string
|
|
180
|
+
// 组件定制轮询时间
|
|
181
|
+
requestInterval?: number
|
|
182
|
+
// 获取数据的方式
|
|
183
|
+
requestDataType: RequestDataTypeEnum
|
|
184
|
+
// 请求方式 get/post/del/put/patch
|
|
185
|
+
requestHttpType: RequestHttpEnum
|
|
186
|
+
// 源后续的 url
|
|
187
|
+
requestUrl?: string
|
|
188
|
+
// 请求内容主体方式 普通/sql
|
|
189
|
+
requestContentType: RequestContentTypeEnum
|
|
190
|
+
// 请求体类型
|
|
191
|
+
requestParamsBodyType: RequestBodyEnum
|
|
192
|
+
// SQL 请求对象
|
|
193
|
+
requestSQLContent: {
|
|
194
|
+
sql: string
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Store 类型
|
|
199
|
+
export interface ChartEditStoreType {
|
|
200
|
+
[ChartEditStoreEnum.EDIT_CANVAS]: EditCanvasType
|
|
201
|
+
[ChartEditStoreEnum.EDIT_CANVAS_CONFIG]: EditCanvasConfigType
|
|
202
|
+
[ChartEditStoreEnum.RIGHT_MENU_SHOW]: boolean
|
|
203
|
+
[ChartEditStoreEnum.MOUSE_POSITION]: MousePositionType
|
|
204
|
+
[ChartEditStoreEnum.TARGET_CHART]: TargetChartType
|
|
205
|
+
[ChartEditStoreEnum.RECORD_CHART]?: RecordChartType
|
|
206
|
+
[ChartEditStoreEnum.REQUEST_GLOBAL_CONFIG]: RequestGlobalConfigType
|
|
207
|
+
[ChartEditStoreEnum.COMPONENT_LIST]: Array<CreateComponentType | CreateComponentGroupType>
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// 存储数据类型
|
|
211
|
+
export interface ChartEditStorage {
|
|
212
|
+
[ChartEditStoreEnum.EDIT_CANVAS_CONFIG]: EditCanvasConfigType
|
|
213
|
+
[ChartEditStoreEnum.REQUEST_GLOBAL_CONFIG]: RequestGlobalConfigType
|
|
214
|
+
[ChartEditStoreEnum.COMPONENT_LIST]: Array<CreateComponentType | CreateComponentGroupType>
|
|
215
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const historyActionTypeName: {
|
|
2
|
+
add: string;
|
|
3
|
+
delete: string;
|
|
4
|
+
update: string;
|
|
5
|
+
move: string;
|
|
6
|
+
paste: string;
|
|
7
|
+
copy: string;
|
|
8
|
+
cut: string;
|
|
9
|
+
top: string;
|
|
10
|
+
bottom: string;
|
|
11
|
+
up: string;
|
|
12
|
+
down: string;
|
|
13
|
+
group: string;
|
|
14
|
+
unGroup: string;
|
|
15
|
+
lock: string;
|
|
16
|
+
unLock: string;
|
|
17
|
+
hide: string;
|
|
18
|
+
show: string;
|
|
19
|
+
canvas: string;
|
|
20
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { CreateComponentType, CreateComponentGroupType } from '../../../packages/index.d';
|
|
2
|
+
import { EditCanvasType } from '../chartEditStore/chartEditStore.d';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
// 操作类型枚举
|
|
6
|
+
|
|
7
|
+
export enum HistoryActionTypeEnum {
|
|
8
|
+
// 新增
|
|
9
|
+
ADD = 'add',
|
|
10
|
+
// 删除
|
|
11
|
+
DELETE = 'delete',
|
|
12
|
+
// 更新(位置,属性)
|
|
13
|
+
UPDATE = 'update',
|
|
14
|
+
// 移动
|
|
15
|
+
MOVE = 'move',
|
|
16
|
+
// 复制
|
|
17
|
+
COPY = 'copy',
|
|
18
|
+
// 剪切
|
|
19
|
+
CUT = 'cut',
|
|
20
|
+
// 粘贴
|
|
21
|
+
PASTE = 'paste',
|
|
22
|
+
// 置顶
|
|
23
|
+
TOP = 'top',
|
|
24
|
+
// 置底
|
|
25
|
+
BOTTOM = 'bottom',
|
|
26
|
+
// 上移
|
|
27
|
+
UP = 'up',
|
|
28
|
+
// 下移
|
|
29
|
+
DOWN = 'down',
|
|
30
|
+
// 成组
|
|
31
|
+
GROUP = 'group',
|
|
32
|
+
// 解组
|
|
33
|
+
UN_GROUP = 'unGroup',
|
|
34
|
+
// 锁定
|
|
35
|
+
LOCK = 'lock',
|
|
36
|
+
// 解除锁定
|
|
37
|
+
UNLOCK = 'unLock',
|
|
38
|
+
// 隐藏
|
|
39
|
+
HIDE = 'hide',
|
|
40
|
+
// 显示
|
|
41
|
+
SHOW = 'show'
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// 对象类型
|
|
45
|
+
export enum HistoryTargetTypeEnum {
|
|
46
|
+
CANVAS = 'canvas',
|
|
47
|
+
CHART = 'chart'
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// 历史栈
|
|
51
|
+
export enum HistoryStackEnum {
|
|
52
|
+
BACK_STACK = 'backStack',
|
|
53
|
+
FORWARD_STACK = 'forwardStack'
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// 历史记录项
|
|
57
|
+
export enum HistoryStackItemEnum {
|
|
58
|
+
ID = 'id',
|
|
59
|
+
TARGET_TYPE = 'targetType',
|
|
60
|
+
ACTION_TYPE = 'actionType',
|
|
61
|
+
HISTORY_DATA = 'historyData'
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// 历史记录项类型
|
|
65
|
+
export interface HistoryItemType {
|
|
66
|
+
// 会有同时操作多个组件场景
|
|
67
|
+
[HistoryStackItemEnum.ID]: string
|
|
68
|
+
[HistoryStackItemEnum.TARGET_TYPE]: HistoryTargetTypeEnum
|
|
69
|
+
[HistoryStackItemEnum.ACTION_TYPE]: HistoryActionTypeEnum
|
|
70
|
+
[HistoryStackItemEnum.HISTORY_DATA]: CreateComponentType[] | CreateComponentGroupType[] | EditCanvasType[]
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// 历史 Store 类型
|
|
74
|
+
export interface ChartHistoryStoreType {
|
|
75
|
+
// 后退栈
|
|
76
|
+
[HistoryStackEnum.BACK_STACK]: Array<HistoryItemType>
|
|
77
|
+
// 前进栈
|
|
78
|
+
[HistoryStackEnum.FORWARD_STACK]: Array<HistoryItemType>
|
|
79
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export enum ChartModeEnum {
|
|
2
|
+
SINGLE = 'single',
|
|
3
|
+
DOUBLE = 'double'
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export enum LayerModeEnum {
|
|
7
|
+
THUMBNAIL = 'thumbnail',
|
|
8
|
+
TEXT = 'text'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export enum ChartLayoutStoreEnum {
|
|
12
|
+
LAYERS = 'layers',
|
|
13
|
+
CHARTS = 'charts',
|
|
14
|
+
DETAILS = 'details',
|
|
15
|
+
Chart_TYPE = 'chartType',
|
|
16
|
+
LAYER_TYPE = 'layerType',
|
|
17
|
+
PERCENTAGE = 'percentage',
|
|
18
|
+
RE_POSITION_CANVAS = 'rePositionCanvas'
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ChartLayoutType {
|
|
22
|
+
// 图层控制
|
|
23
|
+
[ChartLayoutStoreEnum.LAYERS]: boolean
|
|
24
|
+
// 图表组件
|
|
25
|
+
[ChartLayoutStoreEnum.CHARTS]: boolean
|
|
26
|
+
// 详情设置
|
|
27
|
+
[ChartLayoutStoreEnum.DETAILS]: boolean
|
|
28
|
+
// 组件展示方式
|
|
29
|
+
[ChartLayoutStoreEnum.Chart_TYPE]: ChartModeEnum
|
|
30
|
+
// 层级展示方式
|
|
31
|
+
[ChartLayoutStoreEnum.LAYER_TYPE]: LayerModeEnum
|
|
32
|
+
// 当前正在加载的数量
|
|
33
|
+
[ChartLayoutStoreEnum.PERCENTAGE]: number
|
|
34
|
+
// 是否重置当前画布位置
|
|
35
|
+
[ChartLayoutStoreEnum.RE_POSITION_CANVAS]: boolean
|
|
36
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ThemeEnum } from '../../../enums/styleEnum';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export type AppThemeColorType = {
|
|
5
|
+
CMYK: number[]
|
|
6
|
+
RGB: number[]
|
|
7
|
+
hex: string
|
|
8
|
+
name: string
|
|
9
|
+
pinyin: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface DesignStateType {
|
|
13
|
+
// 是否是深色主题
|
|
14
|
+
darkTheme: boolean
|
|
15
|
+
// 主题名称
|
|
16
|
+
themeName: ThemeEnum
|
|
17
|
+
//色号
|
|
18
|
+
appTheme: string
|
|
19
|
+
appThemeDetail: AppThemeColorType | null
|
|
20
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { ConfigType } from '../../../packages/index.d';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 菜单选项类型
|
|
5
|
+
*/
|
|
6
|
+
export interface MenuOptionsType {
|
|
7
|
+
key: string;
|
|
8
|
+
icon?: any;
|
|
9
|
+
label: any;
|
|
10
|
+
list: ConfigType[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 自定义组件注册配置
|
|
14
|
+
*/
|
|
15
|
+
export interface CustomComponentConfig {
|
|
16
|
+
/** 组件的唯一标识(chartKey) */
|
|
17
|
+
chartKey: string;
|
|
18
|
+
/** Vue 组件实例 */
|
|
19
|
+
component: any;
|
|
20
|
+
/** 配置面板组件(可选) */
|
|
21
|
+
configComponent?: any;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 全局配置状态类型
|
|
25
|
+
*/
|
|
26
|
+
export interface GlobalConfigState {
|
|
27
|
+
baseFontSize: number;
|
|
28
|
+
/** 菜单选项列表 */
|
|
29
|
+
menuOptions: MenuOptionsType[];
|
|
30
|
+
/** 自定义组件注册 */
|
|
31
|
+
components: CustomComponentConfig[];
|
|
32
|
+
/** 主题配置 */
|
|
33
|
+
theme: {
|
|
34
|
+
primaryColor: string;
|
|
35
|
+
darkMode: boolean;
|
|
36
|
+
};
|
|
37
|
+
/** 是否已初始化 */
|
|
38
|
+
initialized: boolean;
|
|
39
|
+
configModules: Record<string, {
|
|
40
|
+
default: string;
|
|
41
|
+
}>;
|
|
42
|
+
indexModules: Record<string, {
|
|
43
|
+
default: string;
|
|
44
|
+
}>;
|
|
45
|
+
imagesModules: Record<string, {
|
|
46
|
+
default: string;
|
|
47
|
+
}>;
|
|
48
|
+
chartsList: ConfigType[];
|
|
49
|
+
configTsModules: Record<string, {
|
|
50
|
+
default: any;
|
|
51
|
+
}>;
|
|
52
|
+
getConfigPath: (packageName: string, categoryName: string, keyName: string) => string;
|
|
53
|
+
uploadFile?: (file: File) => Promise<string>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* 全局配置 Store
|
|
57
|
+
*/
|
|
58
|
+
export declare const useGlobalConfigStore: import('pinia').StoreDefinition<"useGlobalConfigStore", GlobalConfigState, {
|
|
59
|
+
/**
|
|
60
|
+
* 获取菜单选项
|
|
61
|
+
*/
|
|
62
|
+
getMenuOptions(): MenuOptionsType[];
|
|
63
|
+
getConfigPathFn(): (packageName: string, categoryName: string, keyName: string) => string;
|
|
64
|
+
getUploadFileFn(): ((file: File) => Promise<string>) | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* 获取基础字体大小
|
|
67
|
+
*/
|
|
68
|
+
getBaseFontSize(): number;
|
|
69
|
+
/**
|
|
70
|
+
* 获取图表组件列表
|
|
71
|
+
*/
|
|
72
|
+
getChartsList(): ConfigType[];
|
|
73
|
+
/**
|
|
74
|
+
* 获取配置组件
|
|
75
|
+
*/
|
|
76
|
+
getConfigModules(): Record<string, {
|
|
77
|
+
default: string;
|
|
78
|
+
}>;
|
|
79
|
+
/**
|
|
80
|
+
* 获取展示组件
|
|
81
|
+
*/
|
|
82
|
+
getIndexModules(): Record<string, {
|
|
83
|
+
default: string;
|
|
84
|
+
}>;
|
|
85
|
+
/**
|
|
86
|
+
* 获取图片组件
|
|
87
|
+
*/
|
|
88
|
+
getImagesModules(): Record<string, {
|
|
89
|
+
default: string;
|
|
90
|
+
}>;
|
|
91
|
+
/**
|
|
92
|
+
* 获取 config.ts 模块
|
|
93
|
+
*/
|
|
94
|
+
getConfigTsModules(): Record<string, {
|
|
95
|
+
default: any;
|
|
96
|
+
}>;
|
|
97
|
+
/**
|
|
98
|
+
* 获取自定义组件列表
|
|
99
|
+
*/
|
|
100
|
+
getComponents(): CustomComponentConfig[];
|
|
101
|
+
/**
|
|
102
|
+
* 获取主题配置
|
|
103
|
+
*/
|
|
104
|
+
getTheme(): GlobalConfigState['theme'];
|
|
105
|
+
/**
|
|
106
|
+
* 是否暗色模式
|
|
107
|
+
*/
|
|
108
|
+
isDarkMode(): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* 获取主题色
|
|
111
|
+
*/
|
|
112
|
+
getPrimaryColor(): string;
|
|
113
|
+
/**
|
|
114
|
+
* 是否已初始化
|
|
115
|
+
*/
|
|
116
|
+
isInitialized(): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* 根据 chartKey 获取组件
|
|
119
|
+
*/
|
|
120
|
+
getComponentByKey(): (chartKey: string) => CustomComponentConfig | undefined;
|
|
121
|
+
}, {
|
|
122
|
+
/**
|
|
123
|
+
* 初始化全局配置
|
|
124
|
+
* @param config 外部配置
|
|
125
|
+
*/
|
|
126
|
+
initConfig(config?: Partial<GlobalConfigState>): void;
|
|
127
|
+
setConfigPathFn(fn: (packageName: string, categoryName: string, keyName: string) => string): void;
|
|
128
|
+
setUploadFileFn(fn: (file: File) => Promise<string>): void;
|
|
129
|
+
setBaseFontSize(fontSize: number): void;
|
|
130
|
+
/**
|
|
131
|
+
* 设置图表组件列表
|
|
132
|
+
*/
|
|
133
|
+
setChartsList(chartsList: ConfigType[]): void;
|
|
134
|
+
setConfigModules(configModules: Record<string, {
|
|
135
|
+
default: string;
|
|
136
|
+
}>): void;
|
|
137
|
+
setIndexModules(indexModules: Record<string, {
|
|
138
|
+
default: string;
|
|
139
|
+
}>): void;
|
|
140
|
+
setImagesModules(imagesModules: Record<string, {
|
|
141
|
+
default: string;
|
|
142
|
+
}>): void;
|
|
143
|
+
setConfigTsModules(configTsModules: Record<string, {
|
|
144
|
+
default: any;
|
|
145
|
+
}>): void;
|
|
146
|
+
/**
|
|
147
|
+
* 更新配置
|
|
148
|
+
* @param updates 要更新的配置项
|
|
149
|
+
*/
|
|
150
|
+
updateConfig(updates: Partial<GlobalConfigState>): void;
|
|
151
|
+
/**
|
|
152
|
+
* 设置菜单选项
|
|
153
|
+
*/
|
|
154
|
+
setMenuOptions(menuOptions: MenuOptionsType[]): void;
|
|
155
|
+
/**
|
|
156
|
+
* 添加菜单选项
|
|
157
|
+
*/
|
|
158
|
+
addMenuOption(menuOption: MenuOptionsType): void;
|
|
159
|
+
/**
|
|
160
|
+
* 注册自定义组件
|
|
161
|
+
*/
|
|
162
|
+
registerComponent(componentConfig: CustomComponentConfig): void;
|
|
163
|
+
/**
|
|
164
|
+
* 批量注册自定义组件
|
|
165
|
+
*/
|
|
166
|
+
registerComponents(componentConfigs: CustomComponentConfig[]): void;
|
|
167
|
+
/**
|
|
168
|
+
* 设置主题模式
|
|
169
|
+
*/
|
|
170
|
+
setDarkMode(darkMode: boolean): void;
|
|
171
|
+
/**
|
|
172
|
+
* 切换主题模式
|
|
173
|
+
*/
|
|
174
|
+
toggleDarkMode(): void;
|
|
175
|
+
/**
|
|
176
|
+
* 设置主题色
|
|
177
|
+
*/
|
|
178
|
+
setPrimaryColor(color: string): void;
|
|
179
|
+
/**
|
|
180
|
+
* 重置为默认配置
|
|
181
|
+
*/
|
|
182
|
+
resetConfig(): void;
|
|
183
|
+
}>;
|