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,1664 @@
|
|
|
1
|
+
import { onMounted as He, onUnmounted as Ve, toRaw as ot, defineComponent as J, useCssVars as _e, computed as U, openBlock as y, createElementBlock as P, normalizeClass as ne, renderSlot as Pe, Fragment as se, renderList as re, normalizeStyle as V, unref as r, createCommentVNode as ve, createElementVNode as I, createBlock as R, withCtx as h, resolveDynamicComponent as pe, reactive as Te, watch as ae, resolveComponent as E, toRefs as be, ref as X, createVNode as x, createTextVNode as le, toDisplayString as j, watchEffect as nt, nextTick as st, withDirectives as Le, vShow as De, isRef as at, provide as lt } from "vue";
|
|
2
|
+
import { ae as rt, ag as $e, ah as N, I as Me, H as ge, A as ee, M as Q, O as qe, ai as ct, aj as Ne, w as it, a3 as ut, ak as B, al as K, am as dt, af as pt, an as vt, ao as _t } from "./designStore-fe92c2ba.js";
|
|
3
|
+
import "naive-ui";
|
|
4
|
+
import { useRoute as gt } from "vue-router";
|
|
5
|
+
import { c as ft, k as je, l as Re, m as ye, n as Oe, o as Je, u as ht, p as Ke, F as Ge } from "./index.vue_vue_type_script_setup_true_lang-c6159a17.js";
|
|
6
|
+
import { u as Ye, d as mt } from "./index-82d00e13.js";
|
|
7
|
+
import { u as oe, p as W, l as Ct, f as ze, h as yt, d as Xe, c as Fe, q as M, r as Ce, a as St, i as ie, S as ce, T as Se, g as xt } from "./chartEditStore-a725b558.js";
|
|
8
|
+
import { a as wt } from "./useKeyboard.hook-da88451a.js";
|
|
9
|
+
import { l as xe } from "./lodash-c80b695e.js";
|
|
10
|
+
import { C as Tt } from "./index-51458edb.js";
|
|
11
|
+
import { u as Ze, C as Qe, c as bt } from "./index-097ae4b0.js";
|
|
12
|
+
import { u as Et } from "./useSyncUpdate.hook-5517a8ad.js";
|
|
13
|
+
import "pinia";
|
|
14
|
+
import "./router-106a6abc.js";
|
|
15
|
+
const kt = "scale-value", Lt = (t) => {
|
|
16
|
+
const l = oe();
|
|
17
|
+
let s = () => {
|
|
18
|
+
};
|
|
19
|
+
He(async () => {
|
|
20
|
+
l.setEditCanvas(
|
|
21
|
+
W.EDIT_LAYOUT_DOM,
|
|
22
|
+
document.getElementById("go-chart-edit-layout")
|
|
23
|
+
), l.setEditCanvas(
|
|
24
|
+
W.EDIT_CONTENT_DOM,
|
|
25
|
+
document.getElementById("go-chart-edit-content")
|
|
26
|
+
), await t(), s = l.listenerScale();
|
|
27
|
+
}), Ve(() => {
|
|
28
|
+
l.setEditCanvas(W.EDIT_LAYOUT_DOM, null), l.setEditCanvas(W.EDIT_CONTENT_DOM, null), s();
|
|
29
|
+
});
|
|
30
|
+
}, S = () => oe(), Dt = async (t) => {
|
|
31
|
+
t.preventDefault();
|
|
32
|
+
try {
|
|
33
|
+
Ct();
|
|
34
|
+
const l = t.dataTransfer.getData(rt.DRAG_KEY);
|
|
35
|
+
if (!l) {
|
|
36
|
+
ze();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
S().setEditCanvas(W.IS_CREATE, !1);
|
|
40
|
+
const s = $e(l);
|
|
41
|
+
if (s.disabled)
|
|
42
|
+
return;
|
|
43
|
+
let d = await ft(s);
|
|
44
|
+
s.redirectComponent && (s.dataset && (d.option.dataset = s.dataset), d.chartConfig.title = s.title, d.chartConfig.chartFrame = s.chartFrame), N(d, t.offsetX - d.attr.w / 2, t.offsetY - d.attr.h / 2), S().addComponentList(d, !1, !0), S().setTargetSelectChart(d.id), ze();
|
|
45
|
+
} catch (l) {
|
|
46
|
+
console.error("[go-view-worker] dragHandle error:", l), yt(), window.$message.warning("图表正在研发中, 敬请期待...");
|
|
47
|
+
}
|
|
48
|
+
}, We = (t) => {
|
|
49
|
+
t.preventDefault(), t.stopPropagation(), t.dataTransfer && (t.dataTransfer.dropEffect = "copy");
|
|
50
|
+
}, et = (t, l) => {
|
|
51
|
+
if (l) {
|
|
52
|
+
S().setTargetSelectChart(l.id);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
S().setTargetSelectChart(void 0);
|
|
56
|
+
}, Mt = (t, l) => {
|
|
57
|
+
if (t.which == 2 || window.$KeyboardActive?.space)
|
|
58
|
+
return;
|
|
59
|
+
et();
|
|
60
|
+
const s = t.offsetX, d = t.offsetY, o = t.screenX, f = t.screenY, i = S().getEditCanvas.scale;
|
|
61
|
+
S().setMousePosition(void 0, void 0, s, d);
|
|
62
|
+
const u = xe.throttle((a) => {
|
|
63
|
+
S().setTargetSelectChart(), S().setEditCanvas(W.IS_SELECT, !0);
|
|
64
|
+
const C = s + a.screenX - o, n = d + a.screenY - f;
|
|
65
|
+
S().setMousePosition(C, n);
|
|
66
|
+
const e = {
|
|
67
|
+
// 左上角
|
|
68
|
+
x1: 0,
|
|
69
|
+
y1: 0,
|
|
70
|
+
// 右下角
|
|
71
|
+
x2: 0,
|
|
72
|
+
y2: 0
|
|
73
|
+
};
|
|
74
|
+
C > s && n > d ? (e.x1 = s, e.y1 = d, e.x2 = Math.round(s + (a.screenX - o) / i), e.y2 = Math.round(d + (a.screenY - f) / i)) : C > s && n < d ? (e.x1 = s, e.y1 = Math.round(d - (f - a.screenY) / i), e.x2 = Math.round(s + (a.screenX - o) / i), e.y2 = d) : C < s && n > d ? (e.x1 = Math.round(s - (o - a.screenX) / i), e.y1 = d, e.x2 = s, e.y2 = Math.round(d + (a.screenY - f) / i)) : (e.x1 = Math.round(s - (o - a.screenX) / i), e.y1 = Math.round(d - (f - a.screenY) / i), e.x2 = s, e.y2 = d), S().getComponentList.forEach((g) => {
|
|
75
|
+
if (!S().getTargetChart.selectId.includes(g.id)) {
|
|
76
|
+
const { x: c, y: p, w: m, h: D } = g.attr, w = {
|
|
77
|
+
// 左上角
|
|
78
|
+
x1: c,
|
|
79
|
+
y1: p,
|
|
80
|
+
// 右下角
|
|
81
|
+
x2: c + m,
|
|
82
|
+
y2: p + D
|
|
83
|
+
};
|
|
84
|
+
w.x1 - e.x1 >= 0 && w.y1 - e.y1 >= 0 && w.x2 - e.x2 <= 0 && w.y2 - e.y2 <= 0 && !g.status.lock && !g.status.hide && S().setTargetSelectChart(g.id, !0);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}, 30), _ = () => {
|
|
88
|
+
u.cancel(), S().setEditCanvas(W.IS_SELECT, !1), S().setMousePosition(0, 0, 0, 0), document.removeEventListener("mousemove", u), document.removeEventListener("mouseup", _);
|
|
89
|
+
};
|
|
90
|
+
document.addEventListener("mousemove", u), document.addEventListener("mouseup", _);
|
|
91
|
+
}, tt = () => ({ mouseClickHandle: (o, f) => {
|
|
92
|
+
if (o.preventDefault(), o.stopPropagation(), !f.status.lock && window.$KeyboardActive?.ctrl)
|
|
93
|
+
if (S().targetChart.selectId.includes(f.id)) {
|
|
94
|
+
const i = S().targetChart.selectId.filter((u) => u !== f.id);
|
|
95
|
+
S().setTargetSelectChart(i);
|
|
96
|
+
} else
|
|
97
|
+
S().setTargetSelectChart(f.id, !0);
|
|
98
|
+
}, mousedownHandle: (o, f) => {
|
|
99
|
+
if (o.preventDefault(), o.stopPropagation(), f.status.lock || (Ye().onClickOutSide(), o.buttons === Me.LEFT && window.$KeyboardActive?.ctrl))
|
|
100
|
+
return;
|
|
101
|
+
const i = S().getTargetChart.selectId;
|
|
102
|
+
if (o.buttons === Me.RIGHT && i.length > 1 && i.includes(f.id) || (S().setTargetSelectChart(f.id), o.buttons === Me.RIGHT))
|
|
103
|
+
return;
|
|
104
|
+
const u = S().getEditCanvas.scale, _ = S().getEditCanvasConfig.width, a = S().getEditCanvasConfig.height, C = /* @__PURE__ */ new Map();
|
|
105
|
+
S().getTargetChart.selectId.forEach((m) => {
|
|
106
|
+
const D = S().fetchTargetIndex(m);
|
|
107
|
+
if (D !== -1) {
|
|
108
|
+
const { x: w, y: k, w: T, h: A } = ot(S().getComponentList[D]).attr;
|
|
109
|
+
C.set(m, { x: w, y: k, w: T, h: A });
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
const n = o.screenX, e = o.screenY;
|
|
113
|
+
let g = [];
|
|
114
|
+
S().getTargetChart.selectId.forEach((m) => {
|
|
115
|
+
if (!C.has(m))
|
|
116
|
+
return;
|
|
117
|
+
const D = S().fetchTargetIndex(m);
|
|
118
|
+
g.push(xe.cloneDeep(S().getComponentList[D]));
|
|
119
|
+
}), S().setMousePosition(void 0, void 0, n, e);
|
|
120
|
+
const c = xe.throttle((m) => {
|
|
121
|
+
S().setEditCanvas(W.IS_DRAG, !0), S().setMousePosition(m.screenX, m.screenY);
|
|
122
|
+
let D = (m.screenX - n) / u, w = (m.screenY - e) / u;
|
|
123
|
+
S().getTargetChart.selectId.forEach((k) => {
|
|
124
|
+
if (!C.has(k))
|
|
125
|
+
return;
|
|
126
|
+
const T = S().fetchTargetIndex(k), { x: A, y: H, w: z, h: G } = C.get(k), v = S().getComponentList[T];
|
|
127
|
+
let L = Math.round(A + D), Y = Math.round(H + w);
|
|
128
|
+
const $ = 50;
|
|
129
|
+
L = L < -z + $ ? -z + $ : L, Y = Y < -G + $ ? -G + $ : Y, L = L > _ - $ ? _ - $ : L, Y = Y > a - $ ? a - $ : Y, v && (v.attr = Object.assign(v.attr, {
|
|
130
|
+
x: L,
|
|
131
|
+
y: Y
|
|
132
|
+
}));
|
|
133
|
+
});
|
|
134
|
+
}, 20), p = () => {
|
|
135
|
+
try {
|
|
136
|
+
if (S().setMousePosition(0, 0, 0, 0), S().setEditCanvas(W.IS_DRAG, !1), g.length) {
|
|
137
|
+
S().getTargetChart.selectId.forEach((D) => {
|
|
138
|
+
if (!C.has(D))
|
|
139
|
+
return;
|
|
140
|
+
const w = S().fetchTargetIndex(D), k = S().getComponentList[w];
|
|
141
|
+
g.forEach((T) => {
|
|
142
|
+
T.id === D && (T.attr = Object.assign(T.attr, {
|
|
143
|
+
offsetX: k.attr.x - T.attr.x,
|
|
144
|
+
offsetY: k.attr.y - T.attr.y
|
|
145
|
+
}));
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
const m = g.filter(
|
|
149
|
+
(D) => D.attr.offsetX !== 0 && D.attr.offsetY !== 0
|
|
150
|
+
);
|
|
151
|
+
m.length && S().moveComponentList(m);
|
|
152
|
+
}
|
|
153
|
+
document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", p);
|
|
154
|
+
} catch (m) {
|
|
155
|
+
console.log(m);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
document.addEventListener("mousemove", c), document.addEventListener("mouseup", p);
|
|
159
|
+
}, mouseenterHandle: (o, f) => {
|
|
160
|
+
o.preventDefault(), o.stopPropagation(), S().getEditCanvas.isSelect || S().setTargetHoverChart(f.id);
|
|
161
|
+
}, mouseleaveHandle: (o, f) => {
|
|
162
|
+
o.preventDefault(), o.stopPropagation(), S().setEditCanvas(W.IS_DRAG, !1), S().setTargetHoverChart(void 0);
|
|
163
|
+
} }), It = (t, l, s) => {
|
|
164
|
+
t.stopPropagation(), t.preventDefault(), S().setEditCanvas(W.IS_DRAG, !0);
|
|
165
|
+
const d = S().getEditCanvas.scale, o = s.x, f = s.y, i = s.w, u = s.h, _ = t.screenX, a = t.screenY;
|
|
166
|
+
S().setMousePosition(_, a);
|
|
167
|
+
const C = xe.throttle((e) => {
|
|
168
|
+
S().setMousePosition(e.screenX, e.screenY);
|
|
169
|
+
let g = Math.round((e.screenX - _) / d), c = Math.round((e.screenY - a) / d);
|
|
170
|
+
const p = /t/.test(l), m = /b/.test(l), D = /l/.test(l), w = /r/.test(l), k = u + (p ? -c : m ? c : 0), T = i + (D ? -g : w ? g : 0);
|
|
171
|
+
s.h = k > 0 ? k : 0, s.w = T > 0 ? T : 0, s.x = o + (D ? g : 0), s.y = f + (p ? c : 0);
|
|
172
|
+
}, 50), n = () => {
|
|
173
|
+
S().setEditCanvas(W.IS_DRAG, !1), S().setMousePosition(0, 0, 0, 0), document.removeEventListener("mousemove", C), document.removeEventListener("mouseup", n);
|
|
174
|
+
};
|
|
175
|
+
document.addEventListener("mousemove", C), document.addEventListener("mouseup", n);
|
|
176
|
+
}, we = (t, l) => t ? {
|
|
177
|
+
zIndex: l + 1,
|
|
178
|
+
left: `${t.x}px`,
|
|
179
|
+
top: `${t.y}px`
|
|
180
|
+
} : {}, ue = (t, l) => t ? {
|
|
181
|
+
width: `${l ? l * t.w : t.w}px`,
|
|
182
|
+
height: `${l ? l * t.h : t.h}px`
|
|
183
|
+
} : {}, Ut = (t, l, s, d) => {
|
|
184
|
+
const { w: o, h: f } = s, i = /t/.test(t), u = /b/.test(t), _ = /l/.test(t), a = /r/.test(t);
|
|
185
|
+
let C = 0, n = 0;
|
|
186
|
+
return t.length === 2 ? (C = _ ? 0 : o, n = i ? 0 : f) : ((i || u) && (C = o / 2, n = i ? 0 : f), (_ || a) && (C = _ ? 0 : o, n = Math.floor(f / 2))), {
|
|
187
|
+
left: `${C}px`,
|
|
188
|
+
top: `${n}px`,
|
|
189
|
+
cursor: d[l] + "-resize"
|
|
190
|
+
};
|
|
191
|
+
}, $t = ["onMousedown"], Rt = /* @__PURE__ */ J({
|
|
192
|
+
__name: "index",
|
|
193
|
+
props: {
|
|
194
|
+
item: {
|
|
195
|
+
type: Object,
|
|
196
|
+
required: !0
|
|
197
|
+
},
|
|
198
|
+
hiddenPoint: {
|
|
199
|
+
type: Boolean,
|
|
200
|
+
required: !1
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
setup(t) {
|
|
204
|
+
_e((n) => ({
|
|
205
|
+
"2707b0c4": i.value
|
|
206
|
+
}));
|
|
207
|
+
const l = t, s = ge(), d = oe(), o = ["t", "r", "b", "l", "lt", "rt", "lb", "rb"], f = ["n", "e", "s", "w", "nw", "ne", "sw", "se"], i = U(() => s.getAppTheme), u = U(() => d.getEditCanvas[W.IS_DRAG] || l.item.status.lock ? !1 : l.item.id === d.getTargetChart.hoverId), _ = U(() => {
|
|
208
|
+
const n = l.item.id;
|
|
209
|
+
return l.item.status.lock ? !1 : d.getTargetChart.selectId.find((e) => e === n);
|
|
210
|
+
}), a = U(() => l.item.status.lock), C = U(() => l.item.status.hide);
|
|
211
|
+
return (n, e) => (y(), P("div", {
|
|
212
|
+
class: ne(["go-shape-box", { lock: a.value, hide: C.value }])
|
|
213
|
+
}, [
|
|
214
|
+
Pe(n.$slots, "default", {}, void 0, !0),
|
|
215
|
+
t.hiddenPoint ? ve("", !0) : (y(!0), P(se, { key: 0 }, re(_.value ? o : [], (g, c) => (y(), P("div", {
|
|
216
|
+
class: ne(`shape-point ${g}`),
|
|
217
|
+
key: c,
|
|
218
|
+
style: V(r(Ut)(g, c, t.item.attr, f)),
|
|
219
|
+
onMousedown: (p) => r(It)(p, g, t.item.attr)
|
|
220
|
+
}, null, 46, $t))), 128)),
|
|
221
|
+
I("div", {
|
|
222
|
+
class: "shape-modal",
|
|
223
|
+
style: V(r(ue)(t.item.attr))
|
|
224
|
+
}, [
|
|
225
|
+
I("div", {
|
|
226
|
+
class: ne(["shape-modal-select", { active: _.value }])
|
|
227
|
+
}, null, 2),
|
|
228
|
+
I("div", {
|
|
229
|
+
class: ne(["shape-modal-change", { selectActive: _.value, hoverActive: u.value }])
|
|
230
|
+
}, null, 2)
|
|
231
|
+
], 4)
|
|
232
|
+
], 2));
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
const Ae = /* @__PURE__ */ ee(Rt, [["__scopeId", "data-v-301ec8d2"]]), Ot = { class: "go-edit-group-box" }, At = /* @__PURE__ */ J({
|
|
236
|
+
__name: "index",
|
|
237
|
+
props: {
|
|
238
|
+
groupData: {
|
|
239
|
+
type: Object,
|
|
240
|
+
required: !0
|
|
241
|
+
},
|
|
242
|
+
groupIndex: {
|
|
243
|
+
type: Number,
|
|
244
|
+
required: !0
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
setup(t) {
|
|
248
|
+
const l = oe(), { handleContextMenu: s } = Ye(), { mouseenterHandle: d, mouseleaveHandle: o, mousedownHandle: f, mouseClickHandle: i } = tt(), u = (C, n, e) => {
|
|
249
|
+
const g = (c) => n.filter((p) => c.includes(p.key));
|
|
250
|
+
if (l.getTargetChart.selectId.length > 1)
|
|
251
|
+
return g([Q.GROUP, Q.DELETE]);
|
|
252
|
+
{
|
|
253
|
+
const c = [];
|
|
254
|
+
e.status.lock ? c.push(Q.LOCK) : c.push(Q.UNLOCK), e.status.hide ? c.push(Q.HIDE) : c.push(Q.SHOW);
|
|
255
|
+
const p = [Q.UN_GROUP];
|
|
256
|
+
return [
|
|
257
|
+
...g(p),
|
|
258
|
+
mt(),
|
|
259
|
+
...C.filter((m) => !c.includes(m.key))
|
|
260
|
+
];
|
|
261
|
+
}
|
|
262
|
+
}, _ = U(() => je(l.getEditCanvasConfig.chartCustomThemeColorInfo)[l.getEditCanvasConfig.chartThemeColor]), a = U(() => l.getEditCanvasConfig.chartThemeSetting);
|
|
263
|
+
return (C, n) => (y(), P("div", Ot, [
|
|
264
|
+
(y(), R(r(Ae), {
|
|
265
|
+
key: t.groupData.id,
|
|
266
|
+
"data-id": t.groupData.id,
|
|
267
|
+
index: t.groupIndex,
|
|
268
|
+
item: t.groupData,
|
|
269
|
+
hiddenPoint: !0,
|
|
270
|
+
class: ne(r(Re)(t.groupData.styles.animations)),
|
|
271
|
+
style: V({
|
|
272
|
+
...r(we)(t.groupData.attr, t.groupIndex),
|
|
273
|
+
...r(ue)(t.groupData.attr),
|
|
274
|
+
...r(ye)(t.groupData.styles),
|
|
275
|
+
...r(Oe)(t.groupData.styles),
|
|
276
|
+
...r(Je)(t.groupData.styles)
|
|
277
|
+
}),
|
|
278
|
+
onClick: n[0] || (n[0] = (e) => r(i)(e, t.groupData)),
|
|
279
|
+
onMousedown: n[1] || (n[1] = (e) => r(f)(e, t.groupData)),
|
|
280
|
+
onMouseenter: n[2] || (n[2] = (e) => r(d)(e, t.groupData)),
|
|
281
|
+
onMouseleave: n[3] || (n[3] = (e) => r(o)(e, t.groupData)),
|
|
282
|
+
onContextmenu: n[4] || (n[4] = (e) => r(s)(e, t.groupData, u))
|
|
283
|
+
}, {
|
|
284
|
+
default: h(() => [
|
|
285
|
+
(y(!0), P(se, null, re(t.groupData.groupList, (e) => (y(), R(r(Ae), {
|
|
286
|
+
key: e.id,
|
|
287
|
+
"data-id": e.id,
|
|
288
|
+
index: t.groupIndex,
|
|
289
|
+
item: e,
|
|
290
|
+
hiddenPoint: !0,
|
|
291
|
+
style: V({
|
|
292
|
+
...r(we)(e.attr, t.groupIndex)
|
|
293
|
+
})
|
|
294
|
+
}, {
|
|
295
|
+
default: h(() => [
|
|
296
|
+
(y(), R(pe(e.chartConfig.chartKey), {
|
|
297
|
+
class: ne(["edit-content-chart", r(Re)(e.styles.animations)]),
|
|
298
|
+
chartConfig: e,
|
|
299
|
+
themeSetting: a.value,
|
|
300
|
+
themeColor: _.value,
|
|
301
|
+
style: V({
|
|
302
|
+
...r(ue)(e.attr),
|
|
303
|
+
...r(ye)(e.styles),
|
|
304
|
+
...r(Oe)(e.styles)
|
|
305
|
+
})
|
|
306
|
+
}, null, 8, ["class", "chartConfig", "themeSetting", "themeColor", "style"]))
|
|
307
|
+
]),
|
|
308
|
+
_: 2
|
|
309
|
+
}, 1032, ["data-id", "index", "item", "style"]))), 128))
|
|
310
|
+
]),
|
|
311
|
+
_: 1
|
|
312
|
+
}, 8, ["data-id", "index", "item", "class", "style"]))
|
|
313
|
+
]));
|
|
314
|
+
}
|
|
315
|
+
}), Ht = { class: "go-edit-align-line" }, Pt = /* @__PURE__ */ J({
|
|
316
|
+
__name: "index",
|
|
317
|
+
setup(t) {
|
|
318
|
+
_e((c) => ({
|
|
319
|
+
"05d3f33b": i.value
|
|
320
|
+
}));
|
|
321
|
+
const l = ge(), s = oe(), d = Xe(), o = Te({
|
|
322
|
+
// 行横向row(上中下),列竖线col(左中右)
|
|
323
|
+
lineArr: ["rowt", "rowc", "rowb", "coll", "colc", "colr"],
|
|
324
|
+
// 展示线
|
|
325
|
+
select: /* @__PURE__ */ new Map(),
|
|
326
|
+
// 已经吸附
|
|
327
|
+
sorptioned: {
|
|
328
|
+
x: !1,
|
|
329
|
+
y: !1
|
|
330
|
+
}
|
|
331
|
+
}), f = (c) => c ? {
|
|
332
|
+
left: `${c.x ? c.x : 0}px`,
|
|
333
|
+
top: `${c.y ? c.y : 0}px`
|
|
334
|
+
} : {}, i = U(() => l.getAppTheme), u = U(() => d.getChartAlignRange), _ = U(() => s.getEditCanvas[W.IS_DRAG]), a = (c, p) => Math.abs(c - p) <= u.value, C = U(() => s.getTargetChart.selectId), n = U(() => s.getComponentList[s.fetchTargetIndex()]), e = U(() => n.value?.attr || {}), g = U(() => ({
|
|
335
|
+
id: "0",
|
|
336
|
+
attr: {
|
|
337
|
+
w: Fe(s.getEditCanvasConfig.width),
|
|
338
|
+
h: Fe(s.getEditCanvasConfig.height),
|
|
339
|
+
x: 0,
|
|
340
|
+
y: 0,
|
|
341
|
+
offsetX: 0,
|
|
342
|
+
offsetY: 0,
|
|
343
|
+
zIndex: 0
|
|
344
|
+
}
|
|
345
|
+
}));
|
|
346
|
+
return ae(
|
|
347
|
+
() => s.getMousePosition,
|
|
348
|
+
qe(() => {
|
|
349
|
+
try {
|
|
350
|
+
if (!_.value || C.value.length !== 1)
|
|
351
|
+
return;
|
|
352
|
+
const c = e.value.w, p = e.value.h, m = e.value.x, D = m + c / 2, w = m + c, k = [m, D, w], T = e.value.y, A = T + p / 2, H = T + p, z = [T, A, H];
|
|
353
|
+
o.select.clear(), o.sorptioned.y = !1;
|
|
354
|
+
const G = s.getComponentList.map((v) => ({
|
|
355
|
+
id: v.id,
|
|
356
|
+
attr: v.attr
|
|
357
|
+
}));
|
|
358
|
+
G.push(g.value), o.lineArr.forEach((v) => {
|
|
359
|
+
G.forEach((L) => {
|
|
360
|
+
if (C.value[0] === L.id)
|
|
361
|
+
return;
|
|
362
|
+
const Y = L.attr.w, $ = L.attr.h, b = L.attr.x, O = b + Y / 2, F = b + Y, fe = [b, O, F], q = L.attr.y, Z = q + $ / 2, te = q + $, Be = [q, Z, te];
|
|
363
|
+
v.includes("rowt") && (a(T, q) && (o.select.set(v, { y: q }), N(n.value, m, q)), a(T, Z) && (o.select.set(v, { y: Z }), N(n.value, m, Z)), a(T, te) && (o.select.set(v, { y: te }), N(n.value, m, te))), v.includes("rowc") && (a(A, q) && (o.select.set(v, { y: q }), N(n.value, m, q - p / 2)), a(A, Z) && (o.select.set(v, { y: Z }), N(n.value, m, Z - p / 2)), a(A, te) && (o.select.set(v, { y: te }), N(n.value, m, te - p / 2))), v.includes("rowb") && (a(H, q) && (o.select.set(v, { y: q }), N(n.value, m, q - p)), a(H, Z) && (o.select.set(v, { y: Z }), N(n.value, m, Z - p)), a(H, te) && (o.select.set(v, { y: te }), N(n.value, m, te - p))), v.includes("coll") && (a(m, b) && (o.select.set(v, { x: b }), N(n.value, b, T)), a(m, O) && (o.select.set(v, { x: O }), N(n.value, O, T)), a(m, F) && (o.select.set(v, { x: F }), N(n.value, F, T))), v.includes("colc") && (a(D, b) && (o.select.set(v, { x: b }), N(n.value, b - c / 2, T)), a(D, O) && (o.select.set(v, { x: O }), N(n.value, O - c / 2, T)), a(D, F) && (o.select.set(v, { x: F }), N(n.value, F - c / 2, T))), v.includes("colr") && (a(w, b) && (o.select.set(v, { x: b }), N(n.value, b - c, T)), a(w, O) && (o.select.set(v, { x: O }), N(n.value, O - c, T)), a(w, F) && (o.select.set(v, { x: F }), N(n.value, F - c, T)));
|
|
364
|
+
});
|
|
365
|
+
});
|
|
366
|
+
} catch (c) {
|
|
367
|
+
console.log(c);
|
|
368
|
+
}
|
|
369
|
+
}, 200),
|
|
370
|
+
{
|
|
371
|
+
deep: !0
|
|
372
|
+
}
|
|
373
|
+
), ae(
|
|
374
|
+
() => _.value,
|
|
375
|
+
(c) => {
|
|
376
|
+
c || (o.select.clear(), o.sorptioned.y = !1);
|
|
377
|
+
}
|
|
378
|
+
), (c, p) => (y(), P("div", Ht, [
|
|
379
|
+
(y(!0), P(se, null, re(o.lineArr, (m) => (y(), P("div", {
|
|
380
|
+
class: ne(["line", [m.includes("row") ? "row" : "col", o.select.has(m) && "visible"]]),
|
|
381
|
+
key: m,
|
|
382
|
+
style: V(f(o.select.get(m)))
|
|
383
|
+
}, null, 6))), 128))
|
|
384
|
+
]));
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
const Yt = /* @__PURE__ */ ee(Pt, [["__scopeId", "data-v-41025e73"]]), Xt = /* @__PURE__ */ J({
|
|
388
|
+
__name: "index",
|
|
389
|
+
setup(t) {
|
|
390
|
+
return (l, s) => {
|
|
391
|
+
const d = E("n-watermark");
|
|
392
|
+
return y(), R(d, {
|
|
393
|
+
id: "go-edit-watermark",
|
|
394
|
+
content: r(ct),
|
|
395
|
+
cross: "",
|
|
396
|
+
selectable: "",
|
|
397
|
+
"font-size": 16,
|
|
398
|
+
"line-height": 16,
|
|
399
|
+
width: 500,
|
|
400
|
+
height: 150,
|
|
401
|
+
"x-offset": 12,
|
|
402
|
+
"y-offset": 80,
|
|
403
|
+
rotate: -15
|
|
404
|
+
}, null, 8, ["content"]);
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
const Bt = /* @__PURE__ */ ee(Xt, [["__scopeId", "data-v-e5767c3f"]]), Nt = /* @__PURE__ */ J({
|
|
409
|
+
__name: "index",
|
|
410
|
+
setup(t) {
|
|
411
|
+
_e((u) => ({
|
|
412
|
+
d910e7cc: f.value
|
|
413
|
+
}));
|
|
414
|
+
const l = ge(), s = oe(), { isSelect: d, scale: o } = be(s.getEditCanvas), f = U(() => l.getAppTheme), i = X();
|
|
415
|
+
return ae(
|
|
416
|
+
() => s.getMousePosition,
|
|
417
|
+
(u) => {
|
|
418
|
+
if (!d.value)
|
|
419
|
+
return;
|
|
420
|
+
const { startX: _, startY: a, x: C, y: n } = u, e = {
|
|
421
|
+
zIndex: Ne,
|
|
422
|
+
// left
|
|
423
|
+
x: 0,
|
|
424
|
+
// top
|
|
425
|
+
y: 0,
|
|
426
|
+
// 宽
|
|
427
|
+
w: 0,
|
|
428
|
+
// 高
|
|
429
|
+
h: 0,
|
|
430
|
+
// 偏移
|
|
431
|
+
offsetX: 0,
|
|
432
|
+
offsetY: 0
|
|
433
|
+
};
|
|
434
|
+
C > _ && n > a ? (e.x = _, e.y = a, e.w = Math.round((C - _) / o.value), e.h = Math.round((n - a) / o.value)) : C > _ && n < a ? (e.x = _, e.w = Math.round((C - _) / o.value), e.h = Math.round((a - n) / o.value), e.y = a - e.h) : C < _ && n > a ? (e.y = a, e.w = Math.round((_ - C) / o.value), e.h = Math.round((n - a) / o.value), e.x = _ - e.w) : (e.w = Math.round((_ - C) / o.value), e.h = Math.round((a - n) / o.value), e.x = _ - e.w, e.y = a - e.h), i.value = {
|
|
435
|
+
...we(e, Ne),
|
|
436
|
+
...ue(e)
|
|
437
|
+
};
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
deep: !0
|
|
441
|
+
}
|
|
442
|
+
), (u, _) => r(d) ? (y(), P("div", {
|
|
443
|
+
key: 0,
|
|
444
|
+
class: "go-edit-select",
|
|
445
|
+
style: V(i.value)
|
|
446
|
+
}, _[0] || (_[0] = [
|
|
447
|
+
I("div", { class: "select-background" }, null, -1),
|
|
448
|
+
I("div", { class: "select-border" }, null, -1)
|
|
449
|
+
]), 4)) : ve("", !0);
|
|
450
|
+
}
|
|
451
|
+
});
|
|
452
|
+
const Kt = /* @__PURE__ */ ee(Nt, [["__scopeId", "data-v-02b12a9c"]]), Gt = /* @__PURE__ */ J({
|
|
453
|
+
__name: "index",
|
|
454
|
+
setup(t) {
|
|
455
|
+
const l = oe(), { getEditCanvasConfig: s, getEditCanvas: d } = be(l), o = U(() => ({
|
|
456
|
+
w: s.value.width,
|
|
457
|
+
h: s.value.height
|
|
458
|
+
})), f = U(() => {
|
|
459
|
+
const u = {
|
|
460
|
+
transform: `scale(${d.value.scale})`
|
|
461
|
+
};
|
|
462
|
+
return { ...ue(o.value), ...u };
|
|
463
|
+
}), i = U(() => {
|
|
464
|
+
const u = d.value.isCreate && { "z-index": 99999 };
|
|
465
|
+
return { ...ue(o.value), ...u };
|
|
466
|
+
});
|
|
467
|
+
return (u, _) => (y(), P("div", {
|
|
468
|
+
class: "go-edit-range go-transition",
|
|
469
|
+
style: V(f.value),
|
|
470
|
+
onMousedown: _[0] || (_[0] = (a) => r(Mt)(a, void 0))
|
|
471
|
+
}, [
|
|
472
|
+
Pe(u.$slots, "default", {}, void 0, !0),
|
|
473
|
+
x(r(Bt)),
|
|
474
|
+
x(r(Yt)),
|
|
475
|
+
x(r(Kt)),
|
|
476
|
+
I("div", {
|
|
477
|
+
class: "go-edit-range-model",
|
|
478
|
+
style: V(i.value)
|
|
479
|
+
}, null, 4)
|
|
480
|
+
], 36));
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
const zt = /* @__PURE__ */ ee(Gt, [["__scopeId", "data-v-7803f120"]]), Ft = { class: "go-sketch-rule" }, Ie = 20, Wt = /* @__PURE__ */ J({
|
|
484
|
+
__name: "index",
|
|
485
|
+
setup(t) {
|
|
486
|
+
_e((b) => ({
|
|
487
|
+
dc1ac650: H.value,
|
|
488
|
+
"2889ee0a": T.value,
|
|
489
|
+
f1504c06: e.value
|
|
490
|
+
}));
|
|
491
|
+
const l = oe(), s = Ze(), d = ge(), o = ht();
|
|
492
|
+
let f = [0, 0], i = [0, 0];
|
|
493
|
+
const u = X(), _ = X(!0), a = X(), C = X(), n = X(!1), e = X("auto"), { width: g, height: c } = be(l.getEditCanvasConfig), p = X(0), m = X(0), D = Te({ h: [], v: [] }), w = U(() => l.getEditCanvas.scale), k = U(() => `${window.innerWidth * 2}px`), T = U(() => `${c.value * 2}px`), A = U(() => o.isDarkMode ?? d.getDarkTheme ? {
|
|
494
|
+
bgColor: "#18181c",
|
|
495
|
+
longfgColor: "#4d4d4d",
|
|
496
|
+
shortfgColor: "#4d4d4d",
|
|
497
|
+
fontColor: "#4d4d4d",
|
|
498
|
+
shadowColor: "#18181c",
|
|
499
|
+
borderColor: "#18181c",
|
|
500
|
+
cornerActiveColor: "#18181c"
|
|
501
|
+
} : {
|
|
502
|
+
// 浅色主题配置
|
|
503
|
+
bgColor: "#f5f5f5",
|
|
504
|
+
longfgColor: "#bbbbbb",
|
|
505
|
+
shortfgColor: "#bbbbbb",
|
|
506
|
+
fontColor: "#999999",
|
|
507
|
+
shadowColor: "#e8e8e8",
|
|
508
|
+
borderColor: "#e8e8e8",
|
|
509
|
+
cornerActiveColor: "#e8e8e8"
|
|
510
|
+
}), H = U(() => d.getAppTheme), z = (b) => {
|
|
511
|
+
if (b.ctrlKey || b.metaKey) {
|
|
512
|
+
b.preventDefault();
|
|
513
|
+
let O = w.value;
|
|
514
|
+
if (b.wheelDelta >= 0 && w.value < 2) {
|
|
515
|
+
O = w.value + 0.05, l.setScale(O);
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
b.wheelDelta < 0 && w.value > 0.1 && (O = w.value - 0.05, l.setScale(O));
|
|
519
|
+
}
|
|
520
|
+
}, G = () => {
|
|
521
|
+
if (!u.value)
|
|
522
|
+
return;
|
|
523
|
+
const b = u.value.getBoundingClientRect(), O = a.value.getBoundingClientRect();
|
|
524
|
+
p.value = (b.left + Ie - O.left) / w.value, m.value = (b.top + Ie - O.top) / w.value;
|
|
525
|
+
}, v = (b) => {
|
|
526
|
+
if (b.preventDefault(), b.stopPropagation(), b.which == 2)
|
|
527
|
+
n.value = !0;
|
|
528
|
+
else if (!window.$KeyboardActive?.space)
|
|
529
|
+
return;
|
|
530
|
+
document.activeElement?.blur();
|
|
531
|
+
const O = b.pageX, F = b.pageY, fe = Ke(window, "mousemove", (Z) => {
|
|
532
|
+
const te = Z.pageX - O, Be = Z.pageY - F, [Ee, he] = f, [ke, me] = i;
|
|
533
|
+
f = [he, te], i = [me, Be], u.value.scrollLeft -= he > Ee ? Math.abs(he - Ee) : -Math.abs(he - Ee), u.value.scrollTop -= me > ke ? Math.abs(me - ke) : -Math.abs(me - ke);
|
|
534
|
+
}), q = Ke(window, "mouseup", () => {
|
|
535
|
+
fe(), q(), f = [0, 0], i = [0, 0], n.value = !1;
|
|
536
|
+
});
|
|
537
|
+
}, L = () => {
|
|
538
|
+
const b = document.getElementById("go-chart-edit-layout");
|
|
539
|
+
return b ? {
|
|
540
|
+
height: b.clientHeight - 20,
|
|
541
|
+
width: b.clientWidth - 20
|
|
542
|
+
} : {
|
|
543
|
+
width: g.value,
|
|
544
|
+
height: c.value
|
|
545
|
+
};
|
|
546
|
+
}, Y = qe(() => {
|
|
547
|
+
_.value = !1, setTimeout(() => {
|
|
548
|
+
_.value = !0;
|
|
549
|
+
}, 10);
|
|
550
|
+
}, 20), $ = () => {
|
|
551
|
+
const { width: b, height: O } = C.value.getBoundingClientRect(), { width: F, height: fe } = L();
|
|
552
|
+
u.value.scrollLeft = b / 2 - F / 2, u.value.scrollTop = O / 2 - fe / 2;
|
|
553
|
+
};
|
|
554
|
+
return ae(
|
|
555
|
+
() => d.getDarkTheme,
|
|
556
|
+
() => {
|
|
557
|
+
Y();
|
|
558
|
+
}
|
|
559
|
+
), ae(
|
|
560
|
+
() => w.value,
|
|
561
|
+
(b, O) => {
|
|
562
|
+
O !== b && s.getRePositionCanvas && s.setItemUnHandle(Qe.RE_POSITION_CANVAS, !1), G(), setTimeout(() => {
|
|
563
|
+
$(), Y();
|
|
564
|
+
}, 400);
|
|
565
|
+
}
|
|
566
|
+
), ae(
|
|
567
|
+
() => n.value,
|
|
568
|
+
(b) => {
|
|
569
|
+
e.value = b ? "grab" : "auto";
|
|
570
|
+
}
|
|
571
|
+
), He(() => {
|
|
572
|
+
u.value && (u.value.addEventListener("wheel", z, { passive: !1 }), $());
|
|
573
|
+
}), Ve(() => {
|
|
574
|
+
u.value && u.value.removeEventListener("wheel", z);
|
|
575
|
+
}), window.onKeySpacePressHold = (b) => {
|
|
576
|
+
n.value = b;
|
|
577
|
+
}, (b, O) => {
|
|
578
|
+
const F = E("sketch-rule");
|
|
579
|
+
return y(), P("div", Ft, [
|
|
580
|
+
_.value ? (y(), R(F, {
|
|
581
|
+
key: 0,
|
|
582
|
+
thick: Ie,
|
|
583
|
+
scale: w.value,
|
|
584
|
+
width: L().width,
|
|
585
|
+
height: L().height,
|
|
586
|
+
startX: p.value,
|
|
587
|
+
startY: m.value,
|
|
588
|
+
lines: D,
|
|
589
|
+
palette: A.value
|
|
590
|
+
}, null, 8, ["scale", "width", "height", "startX", "startY", "lines", "palette"])) : ve("", !0),
|
|
591
|
+
I("div", {
|
|
592
|
+
ref_key: "$app",
|
|
593
|
+
ref: u,
|
|
594
|
+
class: "edit-screens",
|
|
595
|
+
onScroll: G
|
|
596
|
+
}, [
|
|
597
|
+
I("div", {
|
|
598
|
+
ref_key: "$container",
|
|
599
|
+
ref: C,
|
|
600
|
+
class: "edit-screen-container",
|
|
601
|
+
style: V({ width: k.value })
|
|
602
|
+
}, [
|
|
603
|
+
I("div", {
|
|
604
|
+
ref_key: "refSketchRuleBox",
|
|
605
|
+
ref: a,
|
|
606
|
+
class: "canvas",
|
|
607
|
+
onMousedown: v,
|
|
608
|
+
style: V({ marginLeft: "-" + (L().width / 2 - 25) + "px" })
|
|
609
|
+
}, [
|
|
610
|
+
I("div", {
|
|
611
|
+
style: V({ pointerEvents: n.value ? "none" : "auto" })
|
|
612
|
+
}, [
|
|
613
|
+
Pe(b.$slots, "default", {}, void 0, !0)
|
|
614
|
+
], 4)
|
|
615
|
+
], 36)
|
|
616
|
+
], 4)
|
|
617
|
+
], 544)
|
|
618
|
+
]);
|
|
619
|
+
};
|
|
620
|
+
}
|
|
621
|
+
});
|
|
622
|
+
const Vt = /* @__PURE__ */ ee(Wt, [["__scopeId", "data-v-e3838755"]]), Ue = {
|
|
623
|
+
[M.ADD]: "新增",
|
|
624
|
+
[M.DELETE]: "删除",
|
|
625
|
+
[M.UPDATE]: "更新",
|
|
626
|
+
[M.MOVE]: "移动",
|
|
627
|
+
[M.PASTE]: "粘贴",
|
|
628
|
+
[M.COPY]: "复制",
|
|
629
|
+
[M.CUT]: "剪切",
|
|
630
|
+
[M.TOP]: "置顶",
|
|
631
|
+
[M.BOTTOM]: "置底",
|
|
632
|
+
[M.UP]: "上移",
|
|
633
|
+
[M.DOWN]: "下移",
|
|
634
|
+
[M.GROUP]: "成组",
|
|
635
|
+
[M.UN_GROUP]: "解组",
|
|
636
|
+
[M.LOCK]: "锁定",
|
|
637
|
+
[M.UNLOCK]: "解锁",
|
|
638
|
+
[M.HIDE]: "隐藏",
|
|
639
|
+
[M.SHOW]: "显示",
|
|
640
|
+
[Ce.CANVAS]: "画布初始化"
|
|
641
|
+
};
|
|
642
|
+
var qt = Array.prototype, jt = qt.reverse;
|
|
643
|
+
function Jt(t) {
|
|
644
|
+
return t == null ? t : jt.call(t);
|
|
645
|
+
}
|
|
646
|
+
var Zt = Jt;
|
|
647
|
+
const Qt = /* @__PURE__ */ it(Zt), eo = { class: "go-flex-items-center" }, to = { class: "history-list-box" }, oo = ["title"], no = /* @__PURE__ */ J({
|
|
648
|
+
__name: "index",
|
|
649
|
+
setup(t) {
|
|
650
|
+
const {
|
|
651
|
+
DesktopOutlineIcon: l,
|
|
652
|
+
PencilIcon: s,
|
|
653
|
+
TrashIcon: d,
|
|
654
|
+
CopyIcon: o,
|
|
655
|
+
LayersIcon: f,
|
|
656
|
+
DuplicateIcon: i,
|
|
657
|
+
HelpOutlineIcon: u,
|
|
658
|
+
LockClosedOutlineIcon: _,
|
|
659
|
+
LockOpenOutlineIcon: a,
|
|
660
|
+
EyeOffOutlineIcon: C,
|
|
661
|
+
EyeOutlineIcon: n
|
|
662
|
+
} = ie.ionicons5, { StackedMoveIcon: e, Carbon3DCursorIcon: g, Carbon3DSoftwareIcon: c } = ie.carbon, p = St(), m = (k) => {
|
|
663
|
+
if (k.targetType === Ce.CANVAS)
|
|
664
|
+
return l;
|
|
665
|
+
switch (k.actionType) {
|
|
666
|
+
case M.UPDATE:
|
|
667
|
+
return s;
|
|
668
|
+
case M.DELETE:
|
|
669
|
+
return d;
|
|
670
|
+
case M.PASTE:
|
|
671
|
+
return o;
|
|
672
|
+
case M.TOP:
|
|
673
|
+
return f;
|
|
674
|
+
case M.BOTTOM:
|
|
675
|
+
return f;
|
|
676
|
+
case M.UP:
|
|
677
|
+
return f;
|
|
678
|
+
case M.DOWN:
|
|
679
|
+
return f;
|
|
680
|
+
case M.MOVE:
|
|
681
|
+
return e;
|
|
682
|
+
case M.ADD:
|
|
683
|
+
return i;
|
|
684
|
+
case M.GROUP:
|
|
685
|
+
return g;
|
|
686
|
+
case M.UN_GROUP:
|
|
687
|
+
return c;
|
|
688
|
+
case M.LOCK:
|
|
689
|
+
return _;
|
|
690
|
+
case M.UNLOCK:
|
|
691
|
+
return a;
|
|
692
|
+
case M.HIDE:
|
|
693
|
+
return C;
|
|
694
|
+
case M.SHOW:
|
|
695
|
+
return n;
|
|
696
|
+
default:
|
|
697
|
+
return s;
|
|
698
|
+
}
|
|
699
|
+
}, D = (k) => {
|
|
700
|
+
if (k.targetType === Ce.CANVAS)
|
|
701
|
+
return Ue[Ce.CANVAS];
|
|
702
|
+
if (k.actionType === M.GROUP || k.actionType === M.UN_GROUP)
|
|
703
|
+
return `${Ue[k.actionType]}`;
|
|
704
|
+
if (k.historyData.length)
|
|
705
|
+
return `${Ue[k.actionType]} - ${k.historyData[0].chartConfig.title}`;
|
|
706
|
+
}, w = U(() => {
|
|
707
|
+
const T = p.getBackStack.map((A) => ({
|
|
708
|
+
label: D(A),
|
|
709
|
+
icon: m(A)
|
|
710
|
+
}));
|
|
711
|
+
return Qt(T.filter((A) => A.label));
|
|
712
|
+
});
|
|
713
|
+
return (k, T) => {
|
|
714
|
+
const A = E("n-button"), H = E("n-icon"), z = E("n-text"), G = E("n-scrollbar"), v = E("n-popover"), L = E("n-tooltip");
|
|
715
|
+
return y(), P("div", eo, [
|
|
716
|
+
x(v, {
|
|
717
|
+
class: "edit-history-popover",
|
|
718
|
+
"show-arrow": !1,
|
|
719
|
+
size: "small",
|
|
720
|
+
trigger: "click",
|
|
721
|
+
placement: "top-start"
|
|
722
|
+
}, {
|
|
723
|
+
trigger: h(() => [
|
|
724
|
+
x(A, {
|
|
725
|
+
class: "mr-10",
|
|
726
|
+
secondary: "",
|
|
727
|
+
size: "small",
|
|
728
|
+
disabled: w.value.length === 0
|
|
729
|
+
}, {
|
|
730
|
+
default: h(() => T[0] || (T[0] = [
|
|
731
|
+
I("span", { class: "btn-text" }, "历史记录", -1)
|
|
732
|
+
])),
|
|
733
|
+
_: 1,
|
|
734
|
+
__: [0]
|
|
735
|
+
}, 8, ["disabled"])
|
|
736
|
+
]),
|
|
737
|
+
default: h(() => [
|
|
738
|
+
I("div", to, [
|
|
739
|
+
x(G, { style: { "max-height": "500px" } }, {
|
|
740
|
+
default: h(() => [
|
|
741
|
+
(y(!0), P(se, null, re(w.value, (Y, $) => (y(), P("div", {
|
|
742
|
+
class: "list-item go-flex-items-center go-ellipsis-1",
|
|
743
|
+
key: $,
|
|
744
|
+
title: Y.label
|
|
745
|
+
}, [
|
|
746
|
+
x(H, {
|
|
747
|
+
class: "item-icon",
|
|
748
|
+
size: "16",
|
|
749
|
+
depth: 2,
|
|
750
|
+
component: Y.icon
|
|
751
|
+
}, null, 8, ["component"]),
|
|
752
|
+
x(z, { depth: "2" }, {
|
|
753
|
+
default: h(() => [
|
|
754
|
+
le(j(Y.label), 1)
|
|
755
|
+
]),
|
|
756
|
+
_: 2
|
|
757
|
+
}, 1024)
|
|
758
|
+
], 8, oo))), 128))
|
|
759
|
+
]),
|
|
760
|
+
_: 1
|
|
761
|
+
}),
|
|
762
|
+
T[1] || (T[1] = I("div", { class: "popover-modal" }, null, -1))
|
|
763
|
+
])
|
|
764
|
+
]),
|
|
765
|
+
_: 1
|
|
766
|
+
}),
|
|
767
|
+
x(L, { trigger: "hover" }, {
|
|
768
|
+
trigger: h(() => [
|
|
769
|
+
x(H, {
|
|
770
|
+
size: "21",
|
|
771
|
+
depth: 3
|
|
772
|
+
}, {
|
|
773
|
+
default: h(() => [
|
|
774
|
+
x(r(u))
|
|
775
|
+
]),
|
|
776
|
+
_: 1
|
|
777
|
+
})
|
|
778
|
+
]),
|
|
779
|
+
default: h(() => [
|
|
780
|
+
I("span", null, "最多只保留" + j(r(ut)) + "条记录", 1)
|
|
781
|
+
]),
|
|
782
|
+
_: 1
|
|
783
|
+
})
|
|
784
|
+
]);
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
});
|
|
788
|
+
const so = /* @__PURE__ */ ee(no, [["__scopeId", "data-v-068d7327"]]), ao = { key: 0 }, lo = { key: 1 }, ro = /* @__PURE__ */ J({
|
|
789
|
+
__name: "ShortcutKeyModal",
|
|
790
|
+
props: {
|
|
791
|
+
modelShow: Boolean
|
|
792
|
+
},
|
|
793
|
+
emits: ["update:modelShow"],
|
|
794
|
+
setup(t, { emit: l }) {
|
|
795
|
+
const { CloseIcon: s } = ie.ionicons5, d = X(!1), o = l, f = t;
|
|
796
|
+
ae(() => f.modelShow, (_) => {
|
|
797
|
+
d.value = _;
|
|
798
|
+
});
|
|
799
|
+
const i = [
|
|
800
|
+
{
|
|
801
|
+
label: "拖拽画布",
|
|
802
|
+
win: `${B.SPACE.toUpperCase()} + 🖱️ `,
|
|
803
|
+
mac: `${K.SPACE.toUpperCase()} + 🖱️ `,
|
|
804
|
+
macSource: !0
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
label: "向 上/右/下/左 移动",
|
|
808
|
+
win: `${B.CTRL.toUpperCase()} + ↑ 或 → 或 ↓ 或 ←`,
|
|
809
|
+
mac: `${K.CTRL.toUpperCase()} + ↑ `
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
label: "锁定",
|
|
813
|
+
win: `${B.CTRL.toUpperCase()} + L `,
|
|
814
|
+
mac: `${K.CTRL.toUpperCase()} + L `
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
label: "解锁",
|
|
818
|
+
win: `${B.CTRL.toUpperCase()} + ${B.SHIFT.toUpperCase()}+ L `,
|
|
819
|
+
mac: `${K.CTRL.toUpperCase()} + ${K.SHIFT.toUpperCase()} + L `
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
label: "展示",
|
|
823
|
+
win: `${B.CTRL.toUpperCase()} + H `,
|
|
824
|
+
mac: `${K.CTRL.toUpperCase()} + H `
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
label: "隐藏",
|
|
828
|
+
win: `${B.CTRL.toUpperCase()} + ${B.SHIFT.toUpperCase()} + H `,
|
|
829
|
+
mac: `${K.CTRL.toUpperCase()} + ${K.SHIFT.toUpperCase()} + H `
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
label: "删除",
|
|
833
|
+
win: "Delete".toUpperCase(),
|
|
834
|
+
mac: `${K.CTRL.toUpperCase()} + Backspace `
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
label: "复制",
|
|
838
|
+
win: `${B.CTRL.toUpperCase()} + C `,
|
|
839
|
+
mac: `${K.CTRL.toUpperCase()} + C `
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
label: "剪切",
|
|
843
|
+
win: `${B.CTRL.toUpperCase()} + X `,
|
|
844
|
+
mac: `${K.CTRL.toUpperCase()} + X `
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
label: "粘贴",
|
|
848
|
+
win: `${B.CTRL.toUpperCase()} + V `,
|
|
849
|
+
mac: `${K.CTRL.toUpperCase()} + V `
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
label: "后退",
|
|
853
|
+
win: `${B.CTRL.toUpperCase()} + Z `,
|
|
854
|
+
mac: `${K.CTRL.toUpperCase()} + Z `
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
label: "前进",
|
|
858
|
+
win: `${B.CTRL.toUpperCase()} + ${B.SHIFT.toUpperCase()} + Z `,
|
|
859
|
+
mac: `${K.CTRL.toUpperCase()} + ${K.SHIFT.toUpperCase()} + Z `
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
label: "多选",
|
|
863
|
+
win: `${B.CTRL.toUpperCase()} + 🖱️ `,
|
|
864
|
+
mac: `${K.CTRL_SOURCE_KEY.toUpperCase()} + 🖱️ `
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
label: "创建分组",
|
|
868
|
+
win: `${B.CTRL.toUpperCase()} + G / 🖱️ `,
|
|
869
|
+
mac: `${K.CTRL_SOURCE_KEY.toUpperCase()} + G / 🖱️`
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
label: "解除分组",
|
|
873
|
+
win: `${B.CTRL.toUpperCase()} + ${B.SHIFT.toUpperCase()} + G `,
|
|
874
|
+
mac: `${K.CTRL_SOURCE_KEY.toUpperCase()} + ${B.SHIFT.toUpperCase()} + G `
|
|
875
|
+
}
|
|
876
|
+
], u = () => {
|
|
877
|
+
o("update:modelShow", !1);
|
|
878
|
+
};
|
|
879
|
+
return (_, a) => {
|
|
880
|
+
const C = E("n-icon"), n = E("n-space"), e = E("n-gradient-text"), g = E("n-table"), c = E("n-modal");
|
|
881
|
+
return y(), R(c, {
|
|
882
|
+
show: d.value,
|
|
883
|
+
"onUpdate:show": a[0] || (a[0] = (p) => d.value = p),
|
|
884
|
+
"mask-closable": !0,
|
|
885
|
+
onAfterLeave: u
|
|
886
|
+
}, {
|
|
887
|
+
default: h(() => [
|
|
888
|
+
x(g, {
|
|
889
|
+
class: "model-content",
|
|
890
|
+
bordered: !1,
|
|
891
|
+
"single-line": !1
|
|
892
|
+
}, {
|
|
893
|
+
default: h(() => [
|
|
894
|
+
I("thead", null, [
|
|
895
|
+
I("tr", null, [
|
|
896
|
+
a[2] || (a[2] = I("th", null, "功能", -1)),
|
|
897
|
+
a[3] || (a[3] = I("th", null, "Win 快捷键", -1)),
|
|
898
|
+
I("th", null, [
|
|
899
|
+
x(n, { justify: "space-between" }, {
|
|
900
|
+
default: h(() => [
|
|
901
|
+
a[1] || (a[1] = I("span", null, " Mac 快捷键 ", -1)),
|
|
902
|
+
x(C, {
|
|
903
|
+
size: "20",
|
|
904
|
+
class: "go-cursor-pointer",
|
|
905
|
+
onClick: u
|
|
906
|
+
}, {
|
|
907
|
+
default: h(() => [
|
|
908
|
+
x(r(s))
|
|
909
|
+
]),
|
|
910
|
+
_: 1
|
|
911
|
+
})
|
|
912
|
+
]),
|
|
913
|
+
_: 1,
|
|
914
|
+
__: [1]
|
|
915
|
+
})
|
|
916
|
+
])
|
|
917
|
+
])
|
|
918
|
+
]),
|
|
919
|
+
I("tbody", null, [
|
|
920
|
+
(y(), P(se, null, re(i, (p, m) => I("tr", { key: m }, [
|
|
921
|
+
I("td", null, j(p.label), 1),
|
|
922
|
+
I("td", null, j(p.win), 1),
|
|
923
|
+
p.macSource ? (y(), P("td", ao, j(p.mac), 1)) : (y(), P("td", lo, [
|
|
924
|
+
x(e, { size: 22 }, {
|
|
925
|
+
default: h(() => [
|
|
926
|
+
le(j(p.mac.substr(0, 1)), 1)
|
|
927
|
+
]),
|
|
928
|
+
_: 2
|
|
929
|
+
}, 1024),
|
|
930
|
+
le(" + " + j(p.mac.substr(3)), 1)
|
|
931
|
+
]))
|
|
932
|
+
])), 64))
|
|
933
|
+
])
|
|
934
|
+
]),
|
|
935
|
+
_: 1
|
|
936
|
+
})
|
|
937
|
+
]),
|
|
938
|
+
_: 1
|
|
939
|
+
}, 8, ["show"]);
|
|
940
|
+
};
|
|
941
|
+
}
|
|
942
|
+
});
|
|
943
|
+
const co = /* @__PURE__ */ ee(ro, [["__scopeId", "data-v-4a8b179f"]]), io = { class: "go-edit-shortcut" }, uo = /* @__PURE__ */ J({
|
|
944
|
+
__name: "index",
|
|
945
|
+
setup(t) {
|
|
946
|
+
const { DicomOverlayIcon: l } = ie.carbon, s = X(!1);
|
|
947
|
+
return (d, o) => {
|
|
948
|
+
const f = E("n-icon"), i = E("n-button"), u = E("n-tooltip");
|
|
949
|
+
return y(), P("div", io, [
|
|
950
|
+
x(co, {
|
|
951
|
+
modelShow: s.value,
|
|
952
|
+
"onUpdate:modelShow": o[0] || (o[0] = (_) => s.value = _)
|
|
953
|
+
}, null, 8, ["modelShow"]),
|
|
954
|
+
x(u, { trigger: "hover" }, {
|
|
955
|
+
trigger: h(() => [
|
|
956
|
+
x(i, {
|
|
957
|
+
class: "scale-btn",
|
|
958
|
+
secondary: "",
|
|
959
|
+
size: "small",
|
|
960
|
+
onClick: o[1] || (o[1] = (_) => s.value = !0)
|
|
961
|
+
}, {
|
|
962
|
+
default: h(() => [
|
|
963
|
+
x(f, {
|
|
964
|
+
size: "21",
|
|
965
|
+
depth: 3
|
|
966
|
+
}, {
|
|
967
|
+
default: h(() => [
|
|
968
|
+
x(r(l))
|
|
969
|
+
]),
|
|
970
|
+
_: 1
|
|
971
|
+
})
|
|
972
|
+
]),
|
|
973
|
+
_: 1
|
|
974
|
+
})
|
|
975
|
+
]),
|
|
976
|
+
default: h(() => [
|
|
977
|
+
o[2] || (o[2] = I("span", null, "快捷键", -1))
|
|
978
|
+
]),
|
|
979
|
+
_: 1,
|
|
980
|
+
__: [2]
|
|
981
|
+
})
|
|
982
|
+
]);
|
|
983
|
+
};
|
|
984
|
+
}
|
|
985
|
+
});
|
|
986
|
+
const po = /* @__PURE__ */ ee(uo, [["__scopeId", "data-v-6fbf5bbb"]]), vo = { class: "go-edit-bottom" }, _o = /* @__PURE__ */ J({
|
|
987
|
+
__name: "index",
|
|
988
|
+
setup(t) {
|
|
989
|
+
_e((w) => ({
|
|
990
|
+
"3dbe566e": o.value
|
|
991
|
+
}));
|
|
992
|
+
const { LockClosedOutlineIcon: l, LockOpenOutlineIcon: s } = ie.ionicons5, d = ge(), o = X(d.getAppTheme), f = Ze(), i = oe(), { lockScale: u, scale: _ } = be(i.getEditCanvas), a = X(null);
|
|
993
|
+
let C = [
|
|
994
|
+
{
|
|
995
|
+
label: "200%",
|
|
996
|
+
value: 200
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
label: "150%",
|
|
1000
|
+
value: 150
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
label: "100%",
|
|
1004
|
+
value: 100
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
label: "50%",
|
|
1008
|
+
value: 50
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
label: "自适应",
|
|
1012
|
+
value: 0
|
|
1013
|
+
}
|
|
1014
|
+
];
|
|
1015
|
+
const n = X(""), e = (w) => {
|
|
1016
|
+
if (a.value?.blur(), w === 0) {
|
|
1017
|
+
f.setItemUnHandle(Qe.RE_POSITION_CANVAS, !0), i.computedScale();
|
|
1018
|
+
return;
|
|
1019
|
+
}
|
|
1020
|
+
i.setScale(w / 100);
|
|
1021
|
+
}, g = () => {
|
|
1022
|
+
i.setEditCanvas(W.LOCK_SCALE, !u.value);
|
|
1023
|
+
}, c = X(100), p = (w) => `${w}%`, m = (w) => {
|
|
1024
|
+
i.setScale(w / 100);
|
|
1025
|
+
}, D = Te({
|
|
1026
|
+
100: ""
|
|
1027
|
+
});
|
|
1028
|
+
return nt(() => {
|
|
1029
|
+
const w = (_.value * 100).toFixed(0);
|
|
1030
|
+
n.value = `${w}%`, c.value = parseInt(w);
|
|
1031
|
+
}), (w, k) => {
|
|
1032
|
+
const T = E("n-text"), A = E("n-space"), H = E("n-select"), z = E("n-icon"), G = E("n-button"), v = E("n-tooltip"), L = E("n-slider");
|
|
1033
|
+
return y(), P("div", vo, [
|
|
1034
|
+
x(A, null, {
|
|
1035
|
+
default: h(() => [
|
|
1036
|
+
x(r(so)),
|
|
1037
|
+
x(T, {
|
|
1038
|
+
id: "keyboard-dress-show",
|
|
1039
|
+
depth: "3"
|
|
1040
|
+
})
|
|
1041
|
+
]),
|
|
1042
|
+
_: 1
|
|
1043
|
+
}),
|
|
1044
|
+
x(A, { class: "bottom-ri" }, {
|
|
1045
|
+
default: h(() => [
|
|
1046
|
+
x(po),
|
|
1047
|
+
x(H, {
|
|
1048
|
+
ref_key: "selectInstRef",
|
|
1049
|
+
ref: a,
|
|
1050
|
+
class: "scale-btn",
|
|
1051
|
+
value: n.value,
|
|
1052
|
+
"onUpdate:value": [
|
|
1053
|
+
k[0] || (k[0] = (Y) => n.value = Y),
|
|
1054
|
+
e
|
|
1055
|
+
],
|
|
1056
|
+
size: "mini",
|
|
1057
|
+
disabled: r(u),
|
|
1058
|
+
options: r(C)
|
|
1059
|
+
}, null, 8, ["value", "disabled", "options"]),
|
|
1060
|
+
x(v, { trigger: "hover" }, {
|
|
1061
|
+
trigger: h(() => [
|
|
1062
|
+
x(G, {
|
|
1063
|
+
onClick: g,
|
|
1064
|
+
text: ""
|
|
1065
|
+
}, {
|
|
1066
|
+
default: h(() => [
|
|
1067
|
+
x(z, {
|
|
1068
|
+
class: ne(["lock-icon", { color: r(u) }]),
|
|
1069
|
+
size: "18",
|
|
1070
|
+
depth: 2
|
|
1071
|
+
}, {
|
|
1072
|
+
default: h(() => [
|
|
1073
|
+
r(u) ? (y(), R(r(l), { key: 0 })) : (y(), R(r(s), { key: 1 }))
|
|
1074
|
+
]),
|
|
1075
|
+
_: 1
|
|
1076
|
+
}, 8, ["class"])
|
|
1077
|
+
]),
|
|
1078
|
+
_: 1
|
|
1079
|
+
})
|
|
1080
|
+
]),
|
|
1081
|
+
default: h(() => [
|
|
1082
|
+
I("span", null, j(r(u) ? "解锁" : "锁定") + "当前比例", 1)
|
|
1083
|
+
]),
|
|
1084
|
+
_: 1
|
|
1085
|
+
}),
|
|
1086
|
+
x(L, {
|
|
1087
|
+
class: "scale-slider",
|
|
1088
|
+
value: c.value,
|
|
1089
|
+
"onUpdate:value": [
|
|
1090
|
+
k[1] || (k[1] = (Y) => c.value = Y),
|
|
1091
|
+
m
|
|
1092
|
+
],
|
|
1093
|
+
"default-value": 50,
|
|
1094
|
+
min: 10,
|
|
1095
|
+
max: 200,
|
|
1096
|
+
step: 5,
|
|
1097
|
+
"format-tooltip": p,
|
|
1098
|
+
disabled: r(u),
|
|
1099
|
+
marks: D
|
|
1100
|
+
}, null, 8, ["value", "disabled", "marks"])
|
|
1101
|
+
]),
|
|
1102
|
+
_: 1
|
|
1103
|
+
})
|
|
1104
|
+
]);
|
|
1105
|
+
};
|
|
1106
|
+
}
|
|
1107
|
+
});
|
|
1108
|
+
const go = /* @__PURE__ */ ee(_o, [["__scopeId", "data-v-a9042582"]]), fo = /* @__PURE__ */ J({
|
|
1109
|
+
__name: "index",
|
|
1110
|
+
props: {
|
|
1111
|
+
modelShow: Boolean
|
|
1112
|
+
},
|
|
1113
|
+
emits: ["update:modelShow"],
|
|
1114
|
+
setup(t, { emit: l }) {
|
|
1115
|
+
const s = t, d = l, { HelpOutlineIcon: o, CloseIcon: f } = ie.ionicons5, i = Xe(), u = X(!1), _ = Te([
|
|
1116
|
+
{
|
|
1117
|
+
key: ce.ASIDE_ALL_COLLAPSED,
|
|
1118
|
+
value: i.getAsideAllCollapsed,
|
|
1119
|
+
type: "switch",
|
|
1120
|
+
name: "菜单折叠",
|
|
1121
|
+
desc: "首页菜单折叠时隐藏至界面外"
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
key: ce.HIDE_PACKAGE_ONE_CATEGORY,
|
|
1125
|
+
value: i.getHidePackageOneCategory,
|
|
1126
|
+
type: "switch",
|
|
1127
|
+
name: "隐藏分类",
|
|
1128
|
+
desc: "工作空间表单分类只有单项时隐藏"
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
key: ce.CHANGE_LANG_RELOAD,
|
|
1132
|
+
value: i.getChangeLangReload,
|
|
1133
|
+
type: "switch",
|
|
1134
|
+
name: "切换语言",
|
|
1135
|
+
desc: "切换语言重新加载页面",
|
|
1136
|
+
tip: "若遇到部分区域语言切换失败,则建议开启"
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
key: "divider1",
|
|
1140
|
+
type: "divider",
|
|
1141
|
+
name: "",
|
|
1142
|
+
desc: "",
|
|
1143
|
+
value: ""
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
key: ce.CHART_TOOLS_STATUS_HIDE,
|
|
1147
|
+
value: i.getChartToolsStatusHide,
|
|
1148
|
+
type: "switch",
|
|
1149
|
+
name: "隐藏工具栏",
|
|
1150
|
+
desc: "鼠标移入时,会展示切换到展开模式"
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
key: ce.CHART_TOOLS_STATUS,
|
|
1154
|
+
value: i.getChartToolsStatus,
|
|
1155
|
+
type: "select",
|
|
1156
|
+
name: "工具栏展示",
|
|
1157
|
+
desc: "工作空间工具栏展示方式",
|
|
1158
|
+
options: [
|
|
1159
|
+
{
|
|
1160
|
+
label: "侧边栏",
|
|
1161
|
+
value: Se.ASIDE
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
label: "底部 Dock",
|
|
1165
|
+
value: Se.DOCK
|
|
1166
|
+
}
|
|
1167
|
+
]
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
key: "divider0",
|
|
1171
|
+
type: "divider",
|
|
1172
|
+
name: "",
|
|
1173
|
+
desc: "",
|
|
1174
|
+
value: ""
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
key: ce.CHART_MOVE_DISTANCE,
|
|
1178
|
+
value: i.getChartMoveDistance,
|
|
1179
|
+
type: "number",
|
|
1180
|
+
name: "移动距离",
|
|
1181
|
+
min: 1,
|
|
1182
|
+
step: 1,
|
|
1183
|
+
suffix: "px",
|
|
1184
|
+
desc: "工作空间方向键控制移动距离"
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
key: ce.CHART_ALIGN_RANGE,
|
|
1188
|
+
value: i.getChartAlignRange,
|
|
1189
|
+
type: "number",
|
|
1190
|
+
name: "吸附距离",
|
|
1191
|
+
min: 10,
|
|
1192
|
+
step: 2,
|
|
1193
|
+
suffix: "px",
|
|
1194
|
+
desc: "工作空间移动图表时的吸附距离"
|
|
1195
|
+
}
|
|
1196
|
+
]);
|
|
1197
|
+
ae(() => s.modelShow, (n) => {
|
|
1198
|
+
u.value = n;
|
|
1199
|
+
});
|
|
1200
|
+
const a = () => {
|
|
1201
|
+
d("update:modelShow", !1);
|
|
1202
|
+
}, C = (n, e) => {
|
|
1203
|
+
i.setItem(e.key, e.value);
|
|
1204
|
+
};
|
|
1205
|
+
return (n, e) => {
|
|
1206
|
+
const g = E("n-h3"), c = E("n-icon"), p = E("n-space"), m = E("n-divider"), D = E("n-text"), w = E("n-switch"), k = E("n-input-number"), T = E("n-select"), A = E("n-tooltip"), H = E("n-list-item"), z = E("n-list"), G = E("n-modal");
|
|
1207
|
+
return y(), R(G, {
|
|
1208
|
+
show: u.value,
|
|
1209
|
+
"onUpdate:show": e[0] || (e[0] = (v) => u.value = v),
|
|
1210
|
+
onAfterLeave: a
|
|
1211
|
+
}, {
|
|
1212
|
+
default: h(() => [
|
|
1213
|
+
x(z, {
|
|
1214
|
+
bordered: "",
|
|
1215
|
+
class: "go-system-setting"
|
|
1216
|
+
}, {
|
|
1217
|
+
header: h(() => [
|
|
1218
|
+
x(p, { justify: "space-between" }, {
|
|
1219
|
+
default: h(() => [
|
|
1220
|
+
x(g, { class: "go-mb-0" }, {
|
|
1221
|
+
default: h(() => e[1] || (e[1] = [
|
|
1222
|
+
le("系统设置")
|
|
1223
|
+
])),
|
|
1224
|
+
_: 1,
|
|
1225
|
+
__: [1]
|
|
1226
|
+
}),
|
|
1227
|
+
x(c, {
|
|
1228
|
+
size: "20",
|
|
1229
|
+
class: "go-cursor-pointer",
|
|
1230
|
+
onClick: a
|
|
1231
|
+
}, {
|
|
1232
|
+
default: h(() => [
|
|
1233
|
+
x(r(f))
|
|
1234
|
+
]),
|
|
1235
|
+
_: 1
|
|
1236
|
+
})
|
|
1237
|
+
]),
|
|
1238
|
+
_: 1
|
|
1239
|
+
})
|
|
1240
|
+
]),
|
|
1241
|
+
default: h(() => [
|
|
1242
|
+
(y(!0), P(se, null, re(_, (v) => (y(), R(H, {
|
|
1243
|
+
key: v.key
|
|
1244
|
+
}, {
|
|
1245
|
+
default: h(() => [
|
|
1246
|
+
v.type === "divider" ? (y(), R(m, {
|
|
1247
|
+
key: 0,
|
|
1248
|
+
style: { margin: "0" }
|
|
1249
|
+
})) : (y(), R(p, {
|
|
1250
|
+
key: 1,
|
|
1251
|
+
size: 40
|
|
1252
|
+
}, {
|
|
1253
|
+
default: h(() => [
|
|
1254
|
+
x(p, null, {
|
|
1255
|
+
default: h(() => [
|
|
1256
|
+
x(D, { class: "item-left" }, {
|
|
1257
|
+
default: h(() => [
|
|
1258
|
+
le(j(v.name), 1)
|
|
1259
|
+
]),
|
|
1260
|
+
_: 2
|
|
1261
|
+
}, 1024),
|
|
1262
|
+
v.type === "switch" ? (y(), R(w, {
|
|
1263
|
+
key: 0,
|
|
1264
|
+
value: v.value,
|
|
1265
|
+
"onUpdate:value": [(L) => v.value = L, (L) => C(L, v)],
|
|
1266
|
+
size: "small"
|
|
1267
|
+
}, null, 8, ["value", "onUpdate:value"])) : v.type === "number" ? (y(), R(k, {
|
|
1268
|
+
key: 1,
|
|
1269
|
+
value: v.value,
|
|
1270
|
+
"onUpdate:value": [(L) => v.value = L, (L) => C(L, v)],
|
|
1271
|
+
class: "input-num-width",
|
|
1272
|
+
size: "small",
|
|
1273
|
+
step: v.step || null,
|
|
1274
|
+
suffix: v.suffix || null,
|
|
1275
|
+
min: v.min || 0
|
|
1276
|
+
}, null, 8, ["value", "onUpdate:value", "step", "suffix", "min"])) : v.type === "select" ? (y(), R(T, {
|
|
1277
|
+
key: 2,
|
|
1278
|
+
class: "select-min-width",
|
|
1279
|
+
value: v.value,
|
|
1280
|
+
"onUpdate:value": [(L) => v.value = L, (L) => C(L, v)],
|
|
1281
|
+
size: "small",
|
|
1282
|
+
options: v.options
|
|
1283
|
+
}, null, 8, ["value", "onUpdate:value", "options"])) : ve("", !0)
|
|
1284
|
+
]),
|
|
1285
|
+
_: 2
|
|
1286
|
+
}, 1024),
|
|
1287
|
+
x(p, null, {
|
|
1288
|
+
default: h(() => [
|
|
1289
|
+
x(D, { class: "item-right" }, {
|
|
1290
|
+
default: h(() => [
|
|
1291
|
+
le(j(v.desc), 1)
|
|
1292
|
+
]),
|
|
1293
|
+
_: 2
|
|
1294
|
+
}, 1024),
|
|
1295
|
+
v.tip ? (y(), R(A, {
|
|
1296
|
+
key: 0,
|
|
1297
|
+
trigger: "hover"
|
|
1298
|
+
}, {
|
|
1299
|
+
trigger: h(() => [
|
|
1300
|
+
x(c, { size: "21" }, {
|
|
1301
|
+
default: h(() => [
|
|
1302
|
+
x(r(o))
|
|
1303
|
+
]),
|
|
1304
|
+
_: 1
|
|
1305
|
+
})
|
|
1306
|
+
]),
|
|
1307
|
+
default: h(() => [
|
|
1308
|
+
I("span", null, j(v.tip), 1)
|
|
1309
|
+
]),
|
|
1310
|
+
_: 2
|
|
1311
|
+
}, 1024)) : ve("", !0)
|
|
1312
|
+
]),
|
|
1313
|
+
_: 2
|
|
1314
|
+
}, 1024)
|
|
1315
|
+
]),
|
|
1316
|
+
_: 2
|
|
1317
|
+
}, 1024))
|
|
1318
|
+
]),
|
|
1319
|
+
_: 2
|
|
1320
|
+
}, 1024))), 128))
|
|
1321
|
+
]),
|
|
1322
|
+
_: 1
|
|
1323
|
+
})
|
|
1324
|
+
]),
|
|
1325
|
+
_: 1
|
|
1326
|
+
}, 8, ["show"]);
|
|
1327
|
+
};
|
|
1328
|
+
}
|
|
1329
|
+
});
|
|
1330
|
+
const ho = /* @__PURE__ */ ee(fo, [["__scopeId", "data-v-584e8b6a"]]), mo = () => {
|
|
1331
|
+
const t = oe();
|
|
1332
|
+
t.setTargetSelectChart(void 0), dt(
|
|
1333
|
+
pt(t.getStorageInfo() || []),
|
|
1334
|
+
void 0,
|
|
1335
|
+
"json"
|
|
1336
|
+
);
|
|
1337
|
+
const l = document.querySelector(".go-edit-range"), s = document.getElementById("go-edit-watermark");
|
|
1338
|
+
if (!l || !s) {
|
|
1339
|
+
window.$message.error("导出失败!");
|
|
1340
|
+
return;
|
|
1341
|
+
}
|
|
1342
|
+
const d = t.getEditCanvas.scale;
|
|
1343
|
+
t.setScale(1, !0), s.style.display = "block", setTimeout(() => {
|
|
1344
|
+
vt(l, () => {
|
|
1345
|
+
s && (s.style.display = "none"), t.setScale(d, !0);
|
|
1346
|
+
});
|
|
1347
|
+
}, 600);
|
|
1348
|
+
}, Co = () => {
|
|
1349
|
+
const t = X(), { updateComponent: l } = bt();
|
|
1350
|
+
return {
|
|
1351
|
+
importUploadFileListRef: t,
|
|
1352
|
+
importBeforeUpload: ({ file: o }) => {
|
|
1353
|
+
t.value = [];
|
|
1354
|
+
const f = o.file.type;
|
|
1355
|
+
return f !== Ge.JSON && f !== Ge.TXT ? (window.$message.warning("仅支持上传 【JSON】 格式文件,请重新上传!"), !1) : !0;
|
|
1356
|
+
},
|
|
1357
|
+
importCustomRequest: (o) => {
|
|
1358
|
+
const { file: f } = o;
|
|
1359
|
+
st(() => {
|
|
1360
|
+
f.file ? _t(f.file).then((i) => {
|
|
1361
|
+
xt({
|
|
1362
|
+
message: "请选择导入方式:",
|
|
1363
|
+
positiveText: "新增(可撤回)",
|
|
1364
|
+
negativeText: "覆盖(不可撤回)",
|
|
1365
|
+
negativeButtonProps: { type: "info", ghost: !1 },
|
|
1366
|
+
// 新增
|
|
1367
|
+
onPositiveCallback: async () => {
|
|
1368
|
+
try {
|
|
1369
|
+
i = $e(i), await l(i, !1, !0), window.$message.success("导入成功!");
|
|
1370
|
+
} catch (u) {
|
|
1371
|
+
console.log(u), window.$message.error("组件导入失败,请检查文件完整性!");
|
|
1372
|
+
}
|
|
1373
|
+
},
|
|
1374
|
+
// 覆盖
|
|
1375
|
+
onNegativeCallback: async () => {
|
|
1376
|
+
try {
|
|
1377
|
+
i = $e(i), await l(i, !0, !0), window.$message.success("导入成功!");
|
|
1378
|
+
} catch (u) {
|
|
1379
|
+
console.log(u), window.$message.error("组件导入失败,请检查文件完整性!");
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
});
|
|
1383
|
+
}) : window.$message.error("导入失败,请检查数据或联系管理员!");
|
|
1384
|
+
});
|
|
1385
|
+
}
|
|
1386
|
+
};
|
|
1387
|
+
};
|
|
1388
|
+
var de = /* @__PURE__ */ ((t) => (t.BUTTON = "button", t.IMPORTUPLOAD = "importUpload", t))(de || {});
|
|
1389
|
+
const yo = { class: "btn-item" }, So = /* @__PURE__ */ J({
|
|
1390
|
+
__name: "index",
|
|
1391
|
+
setup(t) {
|
|
1392
|
+
const { DownloadIcon: l, ShareIcon: s, PawIcon: d, SettingsSharpIcon: o, CreateIcon: f } = ie.ionicons5, i = Xe();
|
|
1393
|
+
oe(), gt(), Et();
|
|
1394
|
+
let u = null;
|
|
1395
|
+
const _ = X(!1), a = X(!0), C = X(!0), { importUploadFileListRef: n, importCustomRequest: e, importBeforeUpload: g } = Co(), c = U(() => i.getChartToolsStatus === Se.ASIDE), p = U(() => i.getChartToolsStatusHide), m = U(() => a.value && p.value), D = U(() => {
|
|
1396
|
+
if (!c.value)
|
|
1397
|
+
return T;
|
|
1398
|
+
const A = [];
|
|
1399
|
+
return T.map((H) => {
|
|
1400
|
+
A.unshift(H);
|
|
1401
|
+
}), A;
|
|
1402
|
+
}), w = () => {
|
|
1403
|
+
u = setTimeout(() => {
|
|
1404
|
+
a.value && (a.value = !1, C.value = !0);
|
|
1405
|
+
}, 200), setTimeout(() => {
|
|
1406
|
+
C.value = !1;
|
|
1407
|
+
}, 400);
|
|
1408
|
+
}, k = () => {
|
|
1409
|
+
clearTimeout(u), a.value || (a.value = !0);
|
|
1410
|
+
}, T = [
|
|
1411
|
+
{
|
|
1412
|
+
key: "import",
|
|
1413
|
+
type: de.IMPORTUPLOAD,
|
|
1414
|
+
name: "导入",
|
|
1415
|
+
icon: s
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
key: "export",
|
|
1419
|
+
type: de.BUTTON,
|
|
1420
|
+
name: "导出",
|
|
1421
|
+
icon: l,
|
|
1422
|
+
handle: mo
|
|
1423
|
+
},
|
|
1424
|
+
// {
|
|
1425
|
+
// key: 'edit',
|
|
1426
|
+
// type: TypeEnum.BUTTON,
|
|
1427
|
+
// name: '编辑',
|
|
1428
|
+
// icon: CreateIcon,
|
|
1429
|
+
// handle: editHandle
|
|
1430
|
+
// },
|
|
1431
|
+
{
|
|
1432
|
+
key: "setting",
|
|
1433
|
+
type: de.BUTTON,
|
|
1434
|
+
name: "设置",
|
|
1435
|
+
icon: o,
|
|
1436
|
+
handle: () => {
|
|
1437
|
+
_.value = !0;
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
];
|
|
1441
|
+
return (A, H) => {
|
|
1442
|
+
const z = E("n-icon"), G = E("n-text"), v = E("n-button"), L = E("n-upload"), Y = E("n-tooltip");
|
|
1443
|
+
return y(), P(se, null, [
|
|
1444
|
+
I("div", {
|
|
1445
|
+
class: ne(["go-chart-edit-tools", [r(i).getChartToolsStatus, m.value ? "isMini" : "unMini"]]),
|
|
1446
|
+
onClick: H[1] || (H[1] = ($) => a.value && (a.value = !1)),
|
|
1447
|
+
onMouseenter: w,
|
|
1448
|
+
onMouseleave: k
|
|
1449
|
+
}, [
|
|
1450
|
+
Le(x(z, {
|
|
1451
|
+
class: "asideLogo",
|
|
1452
|
+
size: "22"
|
|
1453
|
+
}, {
|
|
1454
|
+
default: h(() => [
|
|
1455
|
+
x(r(d))
|
|
1456
|
+
]),
|
|
1457
|
+
_: 1
|
|
1458
|
+
}, 512), [
|
|
1459
|
+
[De, r(i).getChartToolsStatus === r(Se).ASIDE && m.value]
|
|
1460
|
+
]),
|
|
1461
|
+
(y(!0), P(se, null, re(D.value, ($, b) => (y(), R(Y, {
|
|
1462
|
+
key: $.key,
|
|
1463
|
+
disabled: !c.value || p.value && C.value,
|
|
1464
|
+
trigger: "hover",
|
|
1465
|
+
placement: "left"
|
|
1466
|
+
}, {
|
|
1467
|
+
trigger: h(() => [
|
|
1468
|
+
I("div", yo, [
|
|
1469
|
+
$.type === r(de).BUTTON ? (y(), R(v, {
|
|
1470
|
+
key: 0,
|
|
1471
|
+
circle: c.value,
|
|
1472
|
+
secondary: "",
|
|
1473
|
+
onClick: $.handle
|
|
1474
|
+
}, {
|
|
1475
|
+
icon: h(() => [
|
|
1476
|
+
c.value ? (y(), R(z, {
|
|
1477
|
+
key: 0,
|
|
1478
|
+
size: "22"
|
|
1479
|
+
}, {
|
|
1480
|
+
default: h(() => [
|
|
1481
|
+
(y(), R(pe($.icon)))
|
|
1482
|
+
]),
|
|
1483
|
+
_: 2
|
|
1484
|
+
}, 1024)) : (y(), R(pe($.icon), { key: 1 }))
|
|
1485
|
+
]),
|
|
1486
|
+
default: h(() => [
|
|
1487
|
+
Le(x(G, { depth: "3" }, {
|
|
1488
|
+
default: h(() => [
|
|
1489
|
+
le(j($.name), 1)
|
|
1490
|
+
]),
|
|
1491
|
+
_: 2
|
|
1492
|
+
}, 1536), [
|
|
1493
|
+
[De, !c.value]
|
|
1494
|
+
])
|
|
1495
|
+
]),
|
|
1496
|
+
_: 2
|
|
1497
|
+
}, 1032, ["circle", "onClick"])) : $.type === r(de).IMPORTUPLOAD ? (y(), R(L, {
|
|
1498
|
+
key: 1,
|
|
1499
|
+
"file-list": r(n),
|
|
1500
|
+
"onUpdate:fileList": H[0] || (H[0] = (O) => at(n) ? n.value = O : null),
|
|
1501
|
+
"show-file-list": !1,
|
|
1502
|
+
customRequest: r(e),
|
|
1503
|
+
onBeforeUpload: r(g)
|
|
1504
|
+
}, {
|
|
1505
|
+
default: h(() => [
|
|
1506
|
+
x(v, {
|
|
1507
|
+
circle: c.value,
|
|
1508
|
+
secondary: ""
|
|
1509
|
+
}, {
|
|
1510
|
+
icon: h(() => [
|
|
1511
|
+
c.value ? (y(), R(z, {
|
|
1512
|
+
key: 0,
|
|
1513
|
+
size: "22"
|
|
1514
|
+
}, {
|
|
1515
|
+
default: h(() => [
|
|
1516
|
+
(y(), R(pe($.icon)))
|
|
1517
|
+
]),
|
|
1518
|
+
_: 2
|
|
1519
|
+
}, 1024)) : (y(), R(pe($.icon), { key: 1 }))
|
|
1520
|
+
]),
|
|
1521
|
+
default: h(() => [
|
|
1522
|
+
Le(x(G, { depth: "3" }, {
|
|
1523
|
+
default: h(() => [
|
|
1524
|
+
le(j($.name), 1)
|
|
1525
|
+
]),
|
|
1526
|
+
_: 2
|
|
1527
|
+
}, 1536), [
|
|
1528
|
+
[De, !c.value]
|
|
1529
|
+
])
|
|
1530
|
+
]),
|
|
1531
|
+
_: 2
|
|
1532
|
+
}, 1032, ["circle"])
|
|
1533
|
+
]),
|
|
1534
|
+
_: 2
|
|
1535
|
+
}, 1032, ["file-list", "customRequest", "onBeforeUpload"])) : ve("", !0)
|
|
1536
|
+
])
|
|
1537
|
+
]),
|
|
1538
|
+
default: h(() => [
|
|
1539
|
+
I("span", null, j($.name), 1)
|
|
1540
|
+
]),
|
|
1541
|
+
_: 2
|
|
1542
|
+
}, 1032, ["disabled"]))), 128))
|
|
1543
|
+
], 34),
|
|
1544
|
+
x(r(ho), {
|
|
1545
|
+
modelShow: _.value,
|
|
1546
|
+
"onUpdate:modelShow": H[2] || (H[2] = ($) => _.value = $)
|
|
1547
|
+
}, null, 8, ["modelShow"])
|
|
1548
|
+
], 64);
|
|
1549
|
+
};
|
|
1550
|
+
}
|
|
1551
|
+
});
|
|
1552
|
+
const xo = /* @__PURE__ */ ee(So, [["__scopeId", "data-v-735bc734"]]), wo = /* @__PURE__ */ J({
|
|
1553
|
+
__name: "index",
|
|
1554
|
+
setup(t) {
|
|
1555
|
+
const l = oe(), { handleContextMenu: s } = Ye();
|
|
1556
|
+
lt(kt, null), Lt(async () => {
|
|
1557
|
+
});
|
|
1558
|
+
const { mouseenterHandle: d, mouseleaveHandle: o, mousedownHandle: f, mouseClickHandle: i } = tt(), u = (n, e, g) => {
|
|
1559
|
+
if (l.getTargetChart.selectId.length > 1)
|
|
1560
|
+
return e.filter((p) => [Q.GROUP, Q.DELETE].includes(p.key));
|
|
1561
|
+
const c = [];
|
|
1562
|
+
return g.status.lock ? c.push(Q.LOCK) : c.push(Q.UNLOCK), g.status.hide ? c.push(Q.HIDE) : c.push(Q.SHOW), n.filter((p) => !c.includes(p.key));
|
|
1563
|
+
}, _ = U(() => l.getEditCanvasConfig.chartThemeSetting), a = U(() => je(l.getEditCanvasConfig.chartCustomThemeColorInfo)[l.getEditCanvasConfig.chartThemeColor]);
|
|
1564
|
+
U(() => l.getEditCanvasConfig.filterShow);
|
|
1565
|
+
const C = U(() => {
|
|
1566
|
+
const n = l.getEditCanvasConfig.background, e = l.getEditCanvasConfig.backgroundImage;
|
|
1567
|
+
return {
|
|
1568
|
+
...l.getEditCanvasConfig.selectColor ? { background: n || void 0 } : { background: `url(${e}) no-repeat center center / cover !important` },
|
|
1569
|
+
width: "inherit",
|
|
1570
|
+
height: "inherit"
|
|
1571
|
+
};
|
|
1572
|
+
});
|
|
1573
|
+
return He(() => {
|
|
1574
|
+
wt();
|
|
1575
|
+
}), (n, e) => (y(), R(r(Tt), {
|
|
1576
|
+
id: "go-chart-edit-layout",
|
|
1577
|
+
flex: !0,
|
|
1578
|
+
showTop: !1,
|
|
1579
|
+
showBottom: !0,
|
|
1580
|
+
depth: 1,
|
|
1581
|
+
xScroll: !0,
|
|
1582
|
+
disabledScroll: !0,
|
|
1583
|
+
onMousedown: r(et),
|
|
1584
|
+
onDrop: r(Dt),
|
|
1585
|
+
onDragover: r(We),
|
|
1586
|
+
onDragenter: r(We)
|
|
1587
|
+
}, {
|
|
1588
|
+
aside: h(() => [
|
|
1589
|
+
x(r(xo))
|
|
1590
|
+
]),
|
|
1591
|
+
bottom: h(() => [
|
|
1592
|
+
x(r(go))
|
|
1593
|
+
]),
|
|
1594
|
+
default: h(() => [
|
|
1595
|
+
x(r(Vt), null, {
|
|
1596
|
+
default: h(() => [
|
|
1597
|
+
I("div", {
|
|
1598
|
+
id: "go-chart-edit-content",
|
|
1599
|
+
onContextmenu: e[0] || (e[0] = //@ts-ignore
|
|
1600
|
+
(...g) => r(s) && r(s)(...g))
|
|
1601
|
+
}, [
|
|
1602
|
+
x(r(zt), null, {
|
|
1603
|
+
default: h(() => [
|
|
1604
|
+
I("div", {
|
|
1605
|
+
style: V({
|
|
1606
|
+
...r(ye)(r(l).getEditCanvasConfig),
|
|
1607
|
+
...C.value
|
|
1608
|
+
})
|
|
1609
|
+
}, [
|
|
1610
|
+
(y(!0), P(se, null, re(r(l).getComponentList, (g, c) => (y(), P("div", {
|
|
1611
|
+
key: g.id
|
|
1612
|
+
}, [
|
|
1613
|
+
g.isGroup ? (y(), R(r(At), {
|
|
1614
|
+
key: 0,
|
|
1615
|
+
groupData: g,
|
|
1616
|
+
groupIndex: c
|
|
1617
|
+
}, null, 8, ["groupData", "groupIndex"])) : (y(), R(r(Ae), {
|
|
1618
|
+
key: 1,
|
|
1619
|
+
"data-id": g.id,
|
|
1620
|
+
index: c,
|
|
1621
|
+
style: V({
|
|
1622
|
+
...r(we)(g.attr, c),
|
|
1623
|
+
...r(Je)(g.styles)
|
|
1624
|
+
}),
|
|
1625
|
+
item: g,
|
|
1626
|
+
onClick: (p) => r(i)(p, g),
|
|
1627
|
+
onMousedown: (p) => r(f)(p, g),
|
|
1628
|
+
onMouseenter: (p) => r(d)(p, g),
|
|
1629
|
+
onMouseleave: (p) => r(o)(p, g),
|
|
1630
|
+
onContextmenu: (p) => r(s)(p, g, u)
|
|
1631
|
+
}, {
|
|
1632
|
+
default: h(() => [
|
|
1633
|
+
(y(), R(pe(g.chartConfig.chartKey), {
|
|
1634
|
+
class: ne(["edit-content-chart", r(Re)(g.styles.animations)]),
|
|
1635
|
+
chartConfig: g,
|
|
1636
|
+
themeSetting: _.value,
|
|
1637
|
+
themeColor: a.value,
|
|
1638
|
+
style: V({
|
|
1639
|
+
...r(ue)(g.attr),
|
|
1640
|
+
...r(ye)(g.styles),
|
|
1641
|
+
...r(Oe)(g.styles)
|
|
1642
|
+
})
|
|
1643
|
+
}, null, 8, ["class", "chartConfig", "themeSetting", "themeColor", "style"]))
|
|
1644
|
+
]),
|
|
1645
|
+
_: 2
|
|
1646
|
+
}, 1032, ["data-id", "index", "style", "item", "onClick", "onMousedown", "onMouseenter", "onMouseleave", "onContextmenu"]))
|
|
1647
|
+
]))), 128))
|
|
1648
|
+
], 4)
|
|
1649
|
+
]),
|
|
1650
|
+
_: 1
|
|
1651
|
+
})
|
|
1652
|
+
], 32)
|
|
1653
|
+
]),
|
|
1654
|
+
_: 1
|
|
1655
|
+
})
|
|
1656
|
+
]),
|
|
1657
|
+
_: 1
|
|
1658
|
+
}, 8, ["onMousedown", "onDrop", "onDragover", "onDragenter"]));
|
|
1659
|
+
}
|
|
1660
|
+
});
|
|
1661
|
+
const Po = /* @__PURE__ */ ee(wo, [["__scopeId", "data-v-bc6c5e54"]]);
|
|
1662
|
+
export {
|
|
1663
|
+
Po as default
|
|
1664
|
+
};
|