@363045841yyt/klinechart 0.8.5 → 0.8.6
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/README.md +6 -1
- package/dist/components/BaseModal.vue.d.ts +54 -0
- package/dist/components/BaseModal.vue.d.ts.map +1 -0
- package/dist/components/BatchStockDialog.vue.d.ts.map +1 -1
- package/dist/components/ChartSettingsDialog.vue.d.ts.map +1 -1
- package/dist/components/ColorPresetPanel.vue.d.ts +4 -1
- package/dist/components/ColorPresetPanel.vue.d.ts.map +1 -1
- package/dist/components/DrawingStyleToolbar.vue.d.ts.map +1 -1
- package/dist/components/ExportProgressDialog.vue.d.ts.map +1 -1
- package/dist/components/IndicatorParams.vue.d.ts.map +1 -1
- package/dist/components/IndicatorSelector.vue.d.ts.map +1 -1
- package/dist/components/KLineChart.vue.d.ts.map +1 -1
- package/dist/components/RangeSelectionExport.vue.d.ts +23 -0
- package/dist/components/RangeSelectionExport.vue.d.ts.map +1 -0
- package/dist/components/common/CanvasToolbar.vue.d.ts +14 -0
- package/dist/components/common/CanvasToolbar.vue.d.ts.map +1 -0
- package/dist/components/common/CanvasToolbarStack.vue.d.ts +14 -0
- package/dist/components/common/CanvasToolbarStack.vue.d.ts.map +1 -0
- package/dist/composables/chart/useRangeSelection.d.ts +1 -0
- package/dist/composables/chart/useRangeSelection.d.ts.map +1 -1
- package/dist/composables/useTeleportedPopup.d.ts.map +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.css +1 -1
- package/dist/index.js +1293 -1215
- package/dist/web-component.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/BaseModal.vue +292 -0
- package/src/components/BatchStockDialog.vue +15 -180
- package/src/components/ChartSettingsDialog.vue +248 -405
- package/src/components/ColorPresetPanel.vue +58 -106
- package/src/components/CompareSymbolSelector.vue +2 -2
- package/src/components/DrawingStyleToolbar.vue +33 -72
- package/src/components/ExportProgressDialog.vue +25 -133
- package/src/components/IndicatorParams.vue +194 -321
- package/src/components/IndicatorSelector.vue +188 -405
- package/src/components/KLineChart.vue +34 -138
- package/src/components/LeftToolbar.vue +1 -1
- package/src/components/RangeSelectionExport.vue +117 -0
- package/src/components/SymbolSelector.vue +2 -2
- package/src/components/common/CanvasToolbar.vue +70 -0
- package/src/components/common/CanvasToolbarStack.vue +32 -0
- package/src/composables/chart/useRangeSelection.ts +7 -0
- package/src/composables/useTeleportedPopup.ts +15 -2
package/dist/index.js
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, effectScope as d, h as f, inject as p, isRef as m, markRaw as h, nextTick as g, normalizeClass as _, normalizeStyle as v, onBeforeUnmount as y, onMounted as b, onScopeDispose as x, onUnmounted as S, openBlock as C, provide as w, ref as T, renderList as E,
|
|
2
|
-
import { COLOR_PRESET_ITEMS as
|
|
3
|
-
import { DrawingInteractionController as
|
|
4
|
-
import { SemanticChartController as
|
|
5
|
-
import { getRegisteredIndicatorDefinition as
|
|
6
|
-
import { DEFAULT_SETTINGS as W, SETTINGS_STORAGE_KEY as
|
|
1
|
+
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, effectScope as d, h as f, inject as p, isRef as m, markRaw as h, nextTick as g, normalizeClass as _, normalizeStyle as v, onBeforeUnmount as y, onMounted as b, onScopeDispose as x, onUnmounted as S, openBlock as C, provide as w, ref as T, renderList as E, renderSlot as D, resolveDynamicComponent as O, shallowRef as k, toDisplayString as A, unref as j, vModelCheckbox as M, vModelText as N, watch as P, withCtx as F, withDirectives as I, withKeys as L, withModifiers as R } from "vue";
|
|
2
|
+
import { COLOR_PRESET_ITEMS as z, VERSION as ee, createChartController as te, createIndicatorSelectorController as B, darkTheme as ne, formatTimestamp as V, lightTheme as re, normalizeColorPresetSettings as ie, resolveThemeColors as ae, themeToCssVars as oe } from "@363045841yyt/klinechart-core";
|
|
3
|
+
import { DrawingInteractionController as se, allIndicators as H, createChartController as ce, createIndicatorSelectorController as le, findIndicator as U, isBuiltinIndicatorsLoaded as ue, kGapFromKWidth as de, loadBuiltinIndicators as fe, zoomLevelToKWidth as pe } from "@363045841yyt/klinechart-core/controllers";
|
|
4
|
+
import { SemanticChartController as me } from "@363045841yyt/klinechart-core/semantic";
|
|
5
|
+
import { getRegisteredIndicatorDefinition as he } from "@363045841yyt/klinechart-core/indicators";
|
|
6
|
+
import { DEFAULT_SETTINGS as W, SETTINGS_STORAGE_KEY as ge } from "@363045841yyt/klinechart-core/config";
|
|
7
7
|
//#region src/components/ColorPresetPanel.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
8
|
+
var _e = { class: "color-preset-container" }, ve = {
|
|
9
9
|
class: "theme-tabs",
|
|
10
10
|
role: "tablist",
|
|
11
11
|
"aria-label": "颜色主题"
|
|
12
|
-
},
|
|
12
|
+
}, ye = ["onClick"], be = { class: "color-group-label" }, xe = { class: "color-grid" }, Se = { class: "color-item-text" }, G = ["value", "onInput"], K = /*@__PURE__*/ u({
|
|
13
13
|
__name: "ColorPresetPanel",
|
|
14
14
|
props: { colorPresetSettings: {} },
|
|
15
15
|
emits: ["update:colorPresetSettings"],
|
|
16
|
-
setup(t, {
|
|
17
|
-
let
|
|
16
|
+
setup(t, { expose: n, emit: i }) {
|
|
17
|
+
let a = t, c = i, l = [{
|
|
18
18
|
value: "light",
|
|
19
19
|
label: "浅色"
|
|
20
20
|
}, {
|
|
21
21
|
value: "dark",
|
|
22
22
|
label: "深色"
|
|
23
|
-
}],
|
|
23
|
+
}], u = {
|
|
24
24
|
canvas: "画布",
|
|
25
25
|
candle: "K线 / 成交量",
|
|
26
26
|
axis: "坐标轴",
|
|
27
27
|
interaction: "交互 / 标记"
|
|
28
|
-
},
|
|
28
|
+
}, d = r(() => Object.keys(u).map((e) => ({
|
|
29
29
|
group: e,
|
|
30
|
-
label:
|
|
31
|
-
items:
|
|
32
|
-
})).filter((e) => e.items.length > 0)),
|
|
33
|
-
function
|
|
34
|
-
return (e === "dark" ?
|
|
30
|
+
label: u[e],
|
|
31
|
+
items: z.filter((t) => t.group === e)
|
|
32
|
+
})).filter((e) => e.items.length > 0)), f = T("light");
|
|
33
|
+
function p(e, t) {
|
|
34
|
+
return (e === "dark" ? ne : re).colors[t];
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
return
|
|
36
|
+
function m(e) {
|
|
37
|
+
return ie(a.colorPresetSettings)[f.value]?.[e] ?? p(f.value, e);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
let n =
|
|
41
|
-
|
|
39
|
+
function h(e, t) {
|
|
40
|
+
let n = ie(a.colorPresetSettings);
|
|
41
|
+
c("update:colorPresetSettings", {
|
|
42
42
|
...n,
|
|
43
|
-
[
|
|
44
|
-
...n[
|
|
43
|
+
[f.value]: {
|
|
44
|
+
...n[f.value],
|
|
45
45
|
[e]: t
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
let e = { ...
|
|
51
|
-
delete e[
|
|
49
|
+
function g() {
|
|
50
|
+
let e = { ...ie(a.colorPresetSettings) };
|
|
51
|
+
delete e[f.value], c("update:colorPresetSettings", e);
|
|
52
52
|
}
|
|
53
|
-
return (t, n) => (C(), o("div",
|
|
53
|
+
return n({ resetCurrentThemeColors: g }), (t, n) => (C(), o("div", _e, [s("div", ve, [(C(), o(e, null, E(l, (e) => s("button", {
|
|
54
54
|
key: e.value,
|
|
55
55
|
type: "button",
|
|
56
|
-
class: _(["theme-tab", { active:
|
|
57
|
-
onClick: (t) =>
|
|
58
|
-
},
|
|
59
|
-
type: "button",
|
|
60
|
-
class: "color-reset-btn",
|
|
61
|
-
onClick: h
|
|
62
|
-
}, " 重置颜色 ")]), (C(!0), o(e, null, E(u.value, (t) => (C(), o(e, { key: t.group }, [s("div", ye, k(t.label), 1), s("div", be, [(C(!0), o(e, null, E(t.items, (e) => (C(), o("label", {
|
|
56
|
+
class: _(["theme-tab", { active: f.value === e.value }]),
|
|
57
|
+
onClick: (t) => f.value = e.value
|
|
58
|
+
}, A(e.label), 11, ye)), 64))]), (C(!0), o(e, null, E(d.value, (t) => (C(), o(e, { key: t.group }, [s("div", be, A(t.label), 1), s("div", xe, [(C(!0), o(e, null, E(t.items, (e) => (C(), o("label", {
|
|
63
59
|
key: e.key,
|
|
64
60
|
class: "color-item"
|
|
65
|
-
}, [s("span",
|
|
61
|
+
}, [s("span", Se, A(e.label), 1), s("input", {
|
|
66
62
|
type: "color",
|
|
67
63
|
class: "color-input",
|
|
68
|
-
value:
|
|
69
|
-
onInput: (t) =>
|
|
70
|
-
}, null, 40,
|
|
64
|
+
value: m(e.key),
|
|
65
|
+
onInput: (t) => h(e.key, t.target.value)
|
|
66
|
+
}, null, 40, G)]))), 128))])], 64))), 128))]));
|
|
71
67
|
}
|
|
72
|
-
}),
|
|
68
|
+
}), q = (e, t) => {
|
|
73
69
|
let n = e.__vccOpts || e;
|
|
74
70
|
for (let [e, r] of t) n[e] = r;
|
|
75
71
|
return n;
|
|
76
|
-
},
|
|
72
|
+
}, Ce = /*#__PURE__*/ q(K, [["__scopeId", "data-v-14ed826d"]]);
|
|
77
73
|
//#endregion
|
|
78
74
|
//#region src/composables/useTeleportedPopup.ts
|
|
79
|
-
function
|
|
75
|
+
function we(e, t, n = 4) {
|
|
80
76
|
let r = T({});
|
|
81
77
|
function i() {
|
|
82
|
-
let
|
|
83
|
-
if (!
|
|
84
|
-
let
|
|
78
|
+
let i = e.value;
|
|
79
|
+
if (!i) return;
|
|
80
|
+
let a = i.getBoundingClientRect(), o = t.value, s = a.left;
|
|
81
|
+
if (o) {
|
|
82
|
+
let e = o.offsetWidth, t = window.innerWidth;
|
|
83
|
+
s + e > t - 8 && (s = Math.max(8, t - e - 8));
|
|
84
|
+
}
|
|
85
85
|
r.value = {
|
|
86
86
|
position: "fixed",
|
|
87
|
-
top: `${
|
|
88
|
-
left: `${
|
|
87
|
+
top: `${a.bottom + n}px`,
|
|
88
|
+
left: `${s}px`
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
function a() {
|
|
92
|
-
i(), document.addEventListener("scroll", i, {
|
|
92
|
+
i(), g(() => i()), document.addEventListener("scroll", i, {
|
|
93
93
|
capture: !0,
|
|
94
94
|
passive: !0
|
|
95
95
|
}), window.addEventListener("resize", i, { passive: !0 });
|
|
@@ -106,24 +106,24 @@ function q(e, t, n = 4) {
|
|
|
106
106
|
}
|
|
107
107
|
//#endregion
|
|
108
108
|
//#region src/composables/useFullscreenTeleportTarget.ts
|
|
109
|
-
var
|
|
110
|
-
function
|
|
111
|
-
w(
|
|
109
|
+
var Te = Symbol("fullscreen-teleport-target");
|
|
110
|
+
function Ee(e) {
|
|
111
|
+
w(Te, e);
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
let e = p(
|
|
113
|
+
function De() {
|
|
114
|
+
let e = p(Te, null);
|
|
115
115
|
return r(() => e?.value ?? "body");
|
|
116
116
|
}
|
|
117
117
|
//#endregion
|
|
118
118
|
//#region src/components/Dropdown.vue?vue&type=script&setup=true&lang.ts
|
|
119
|
-
var
|
|
119
|
+
var Oe = [
|
|
120
120
|
"title",
|
|
121
121
|
"aria-expanded",
|
|
122
122
|
"onKeydown"
|
|
123
|
-
],
|
|
123
|
+
], ke = {
|
|
124
124
|
key: 0,
|
|
125
125
|
class: "dropdown__label"
|
|
126
|
-
},
|
|
126
|
+
}, Ae = { class: "dropdown__value" }, je = ["aria-selected", "onClick"], Me = 0, Ne = null, Pe = 0, J = /*#__PURE__*/ q(/* @__PURE__ */ u({
|
|
127
127
|
__name: "Dropdown",
|
|
128
128
|
props: {
|
|
129
129
|
modelValue: {},
|
|
@@ -135,7 +135,7 @@ var Te = [
|
|
|
135
135
|
},
|
|
136
136
|
emits: ["update:modelValue"],
|
|
137
137
|
setup(n, { emit: c }) {
|
|
138
|
-
let l = n, u = c, d = T(null), f = T(null), p = T(null), m = T(!1), h = T(0), g = ++
|
|
138
|
+
let l = n, u = c, d = T(null), f = T(null), p = T(null), m = T(!1), h = T(0), g = ++Pe, b = De(), { popupStyle: x, startPositionSync: S, stopPositionSync: w } = we(f, p, 4), D = r(() => l.minWidth ? { minWidth: l.minWidth } : {}), O = r(() => {
|
|
139
139
|
if (!m.value) return;
|
|
140
140
|
let e = h.value || (l.minWidth ? parseInt(l.minWidth) : 0);
|
|
141
141
|
return {
|
|
@@ -143,20 +143,20 @@ var Te = [
|
|
|
143
143
|
zIndex: 1010,
|
|
144
144
|
...x.value
|
|
145
145
|
};
|
|
146
|
-
}),
|
|
146
|
+
}), k = r(() => {
|
|
147
147
|
let e = l.modelValue?.trim();
|
|
148
148
|
return e && l.options.some((t) => t.value === e) ? e : l.options[0]?.value ?? "";
|
|
149
|
-
}), M = r(() => l.options.find((e) => e.value ===
|
|
149
|
+
}), M = r(() => l.options.find((e) => e.value === k.value) ?? l.options[0]);
|
|
150
150
|
function N() {
|
|
151
|
-
|
|
151
|
+
Me !== g && Ne && Ne(), !m.value && (Me = g, Ne = P, h.value = f.value?.offsetWidth ?? 0, m.value = !0, S(), document.addEventListener("pointerdown", z));
|
|
152
152
|
}
|
|
153
153
|
function P() {
|
|
154
|
-
m.value && (m.value = !1,
|
|
154
|
+
m.value && (m.value = !1, Me === g && (Me = 0, Ne = null), w(), document.removeEventListener("pointerdown", z));
|
|
155
155
|
}
|
|
156
156
|
function F() {
|
|
157
157
|
m.value ? P() : N();
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function I(e) {
|
|
160
160
|
u("update:modelValue", e), P();
|
|
161
161
|
}
|
|
162
162
|
function z(e) {
|
|
@@ -178,19 +178,19 @@ var Te = [
|
|
|
178
178
|
"aria-expanded": m.value,
|
|
179
179
|
onClick: F,
|
|
180
180
|
onKeydown: [
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
181
|
+
L(R(P, ["stop"]), ["escape"]),
|
|
182
|
+
L(R(N, ["prevent"]), ["down"]),
|
|
183
|
+
L(R(F, ["prevent"]), ["enter"]),
|
|
184
|
+
L(R(F, ["prevent"]), ["space"])
|
|
185
185
|
]
|
|
186
186
|
}, [
|
|
187
|
-
n.label ? (C(), o("span",
|
|
188
|
-
s("span",
|
|
187
|
+
n.label ? (C(), o("span", ke, A(n.label), 1)) : a("", !0),
|
|
188
|
+
s("span", Ae, A(M.value.label), 1),
|
|
189
189
|
c[0] ||= s("span", {
|
|
190
190
|
class: "dropdown__chevron",
|
|
191
191
|
"aria-hidden": "true"
|
|
192
192
|
}, null, -1)
|
|
193
|
-
], 44,
|
|
193
|
+
], 44, Oe), (C(), i(t, { to: j(b) }, [m.value ? (C(), o("div", {
|
|
194
194
|
key: 0,
|
|
195
195
|
ref_key: "menuRef",
|
|
196
196
|
ref: p,
|
|
@@ -201,16 +201,25 @@ var Te = [
|
|
|
201
201
|
}, [(C(!0), o(e, null, E(n.options, (e) => (C(), o("button", {
|
|
202
202
|
key: e.value,
|
|
203
203
|
type: "button",
|
|
204
|
-
class: _(["dropdown__option", { "is-selected": e.value ===
|
|
204
|
+
class: _(["dropdown__option", { "is-selected": e.value === k.value }]),
|
|
205
205
|
role: "option",
|
|
206
|
-
"aria-selected": e.value ===
|
|
207
|
-
onClick: (t) =>
|
|
208
|
-
},
|
|
206
|
+
"aria-selected": e.value === k.value,
|
|
207
|
+
onClick: (t) => I(e.value)
|
|
208
|
+
}, A(e.label), 11, je))), 128))], 4)) : a("", !0)], 8, ["to"]))], 2));
|
|
209
209
|
}
|
|
210
|
-
}), [["__scopeId", "data-v-bab778b8"]]),
|
|
211
|
-
|
|
210
|
+
}), [["__scopeId", "data-v-bab778b8"]]), Fe = {};
|
|
211
|
+
function Ie(e, t) {
|
|
212
|
+
return C(), o("div", {
|
|
213
|
+
class: "canvas-toolbar",
|
|
214
|
+
onPointerdown: t[0] ||= R(() => {}, ["stop"]),
|
|
215
|
+
onPointermove: t[1] ||= R(() => {}, ["stop"]),
|
|
216
|
+
onPointerup: t[2] ||= R(() => {}, ["stop"])
|
|
217
|
+
}, [D(e.$slots, "default", {}, void 0, !0)], 32);
|
|
218
|
+
}
|
|
219
|
+
var Le = /*#__PURE__*/ q(Fe, [["render", Ie], ["__scopeId", "data-v-4f016899"]]), Re = {
|
|
220
|
+
class: "color-item",
|
|
212
221
|
title: "颜色"
|
|
213
|
-
},
|
|
222
|
+
}, ze = ["value"], Be = /*#__PURE__*/ q(/* @__PURE__ */ u({
|
|
214
223
|
__name: "DrawingStyleToolbar",
|
|
215
224
|
props: { drawing: {} },
|
|
216
225
|
emits: ["updateStyle", "delete"],
|
|
@@ -245,86 +254,166 @@ var Te = [
|
|
|
245
254
|
label: "点线",
|
|
246
255
|
value: "dotted"
|
|
247
256
|
}
|
|
248
|
-
],
|
|
249
|
-
function
|
|
250
|
-
e.key === "Delete" && (e.preventDefault(),
|
|
257
|
+
], a = t;
|
|
258
|
+
function o(e) {
|
|
259
|
+
e.key === "Delete" && (e.preventDefault(), a("delete"));
|
|
251
260
|
}
|
|
252
|
-
b(() => document.addEventListener("keydown",
|
|
261
|
+
b(() => document.addEventListener("keydown", o)), S(() => document.removeEventListener("keydown", o));
|
|
253
262
|
function c(e) {
|
|
254
|
-
|
|
263
|
+
a("updateStyle", { stroke: e });
|
|
255
264
|
}
|
|
256
265
|
function u(e) {
|
|
257
|
-
|
|
266
|
+
a("updateStyle", { strokeWidth: e });
|
|
258
267
|
}
|
|
259
268
|
function d(e) {
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
-
return (t,
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
269
|
+
a("updateStyle", { strokeStyle: e });
|
|
270
|
+
}
|
|
271
|
+
return (t, a) => (C(), i(Le, null, {
|
|
272
|
+
default: F(() => [
|
|
273
|
+
s("div", Re, [s("span", {
|
|
274
|
+
class: "color-swatch",
|
|
275
|
+
style: v({ background: e.drawing.style.stroke ?? "#2962ff" })
|
|
276
|
+
}, null, 4), s("input", {
|
|
277
|
+
type: "color",
|
|
278
|
+
class: "color-input",
|
|
279
|
+
value: e.drawing.style.stroke ?? "#2962ff",
|
|
280
|
+
onInput: a[0] ||= (e) => c(e.target.value)
|
|
281
|
+
}, null, 40, ze)]),
|
|
282
|
+
l(J, {
|
|
283
|
+
"model-value": String(e.drawing.style.strokeWidth ?? 1),
|
|
284
|
+
options: n,
|
|
285
|
+
size: "sm",
|
|
286
|
+
title: "线宽",
|
|
287
|
+
"onUpdate:modelValue": a[1] ||= (e) => u(Number(e))
|
|
288
|
+
}, null, 8, ["model-value"]),
|
|
289
|
+
l(J, {
|
|
290
|
+
"model-value": e.drawing.style.strokeStyle ?? "solid",
|
|
291
|
+
options: r,
|
|
292
|
+
size: "sm",
|
|
293
|
+
title: "线型",
|
|
294
|
+
"onUpdate:modelValue": a[2] ||= (e) => d(e)
|
|
295
|
+
}, null, 8, ["model-value"]),
|
|
296
|
+
s("button", {
|
|
297
|
+
type: "button",
|
|
298
|
+
class: "toolbar-btn toolbar-btn--delete",
|
|
299
|
+
title: "删除",
|
|
300
|
+
onClick: a[3] ||= (e) => t.$emit("delete")
|
|
301
|
+
}, [...a[4] ||= [s("svg", {
|
|
302
|
+
class: "delete-icon",
|
|
303
|
+
viewBox: "0 0 24 24",
|
|
304
|
+
fill: "none",
|
|
305
|
+
stroke: "currentColor",
|
|
306
|
+
"stroke-width": "2",
|
|
307
|
+
"stroke-linecap": "round",
|
|
308
|
+
"stroke-linejoin": "round",
|
|
309
|
+
"aria-hidden": "true"
|
|
310
|
+
}, [
|
|
311
|
+
s("path", { d: "M3 6h18" }),
|
|
312
|
+
s("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
|
|
313
|
+
s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
|
|
314
|
+
], -1)]])
|
|
315
|
+
]),
|
|
316
|
+
_: 1
|
|
317
|
+
}));
|
|
318
|
+
}
|
|
319
|
+
}), [["__scopeId", "data-v-619a545d"]]), Ve = {
|
|
320
|
+
key: 0,
|
|
321
|
+
class: "base-header"
|
|
322
|
+
}, He = { class: "base-header-left" }, Ue = { class: "base-title" }, We = {
|
|
323
|
+
key: 0,
|
|
324
|
+
class: "base-subtitle"
|
|
325
|
+
}, Ge = {
|
|
326
|
+
key: 0,
|
|
327
|
+
class: "base-header-right"
|
|
328
|
+
}, Ke = {
|
|
329
|
+
key: 1,
|
|
330
|
+
class: "base-subheader"
|
|
331
|
+
}, Y = /*#__PURE__*/ q(/* @__PURE__ */ u({
|
|
332
|
+
__name: "BaseModal",
|
|
333
|
+
props: {
|
|
334
|
+
show: { type: Boolean },
|
|
335
|
+
title: { default: "" },
|
|
336
|
+
subtitle: { default: "" },
|
|
337
|
+
zIndex: { default: 1e3 },
|
|
338
|
+
width: { default: "min(92vw, 400px)" },
|
|
339
|
+
maxWidth: { default: "" },
|
|
340
|
+
maxHeight: { default: "min(600px, calc(100vh - 48px))" },
|
|
341
|
+
overlayPadding: { default: "24px" },
|
|
342
|
+
bodyPadding: { default: "16px 20px" },
|
|
343
|
+
footerAlign: { default: "flex-end" },
|
|
344
|
+
closeOnOverlay: {
|
|
345
|
+
type: Boolean,
|
|
346
|
+
default: !0
|
|
347
|
+
},
|
|
348
|
+
showClose: {
|
|
349
|
+
type: Boolean,
|
|
350
|
+
default: !0
|
|
351
|
+
},
|
|
352
|
+
transitionVariant: { default: "default" }
|
|
353
|
+
},
|
|
354
|
+
emits: ["close"],
|
|
355
|
+
setup(e, { emit: c }) {
|
|
356
|
+
let u = e, d = c, f = De(), p = r(() => u.transitionVariant === "compact" ? "modal-compact" : "modal"), m = r(() => ({
|
|
357
|
+
width: u.width,
|
|
358
|
+
maxWidth: u.maxWidth || void 0,
|
|
359
|
+
maxHeight: u.maxHeight
|
|
360
|
+
}));
|
|
361
|
+
return (r, c) => (C(), i(t, { to: j(f) }, [l(n, { name: "overlay" }, {
|
|
362
|
+
default: F(() => [e.show ? (C(), o("div", {
|
|
363
|
+
key: 0,
|
|
364
|
+
class: "base-overlay",
|
|
365
|
+
style: v({
|
|
366
|
+
zIndex: e.zIndex,
|
|
367
|
+
padding: e.overlayPadding
|
|
368
|
+
}),
|
|
369
|
+
onClick: c[2] ||= (t) => e.closeOnOverlay ? d("close") : void 0
|
|
370
|
+
}, [l(n, { name: p.value }, {
|
|
371
|
+
default: F(() => [s("div", {
|
|
372
|
+
class: "base-modal",
|
|
373
|
+
style: v(m.value),
|
|
374
|
+
onClick: c[1] ||= R(() => {}, ["stop"])
|
|
375
|
+
}, [
|
|
376
|
+
r.$slots.header || e.title ? (C(), o("div", Ve, [D(r.$slots, "header", {}, () => [s("div", He, [s("span", Ue, A(e.title), 1), e.subtitle ? (C(), o("span", We, A(e.subtitle), 1)) : a("", !0)])], !0), e.showClose ? (C(), o("div", Ge, [D(r.$slots, "header-extra", {}, void 0, !0), s("button", {
|
|
377
|
+
class: "base-close-btn",
|
|
378
|
+
onClick: c[0] ||= (e) => d("close")
|
|
379
|
+
}, [...c[3] ||= [s("svg", {
|
|
380
|
+
viewBox: "0 0 24 24",
|
|
381
|
+
fill: "none",
|
|
382
|
+
stroke: "currentColor",
|
|
383
|
+
"stroke-width": "2"
|
|
384
|
+
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])) : a("", !0)])) : a("", !0),
|
|
385
|
+
r.$slots.subheader ? (C(), o("div", Ke, [D(r.$slots, "subheader", {}, void 0, !0)])) : a("", !0),
|
|
386
|
+
s("div", {
|
|
387
|
+
class: "base-body",
|
|
388
|
+
style: v({ padding: e.bodyPadding })
|
|
389
|
+
}, [D(r.$slots, "default", {}, void 0, !0)], 4),
|
|
390
|
+
r.$slots.footer ? (C(), o("div", {
|
|
391
|
+
key: 2,
|
|
392
|
+
class: "base-footer",
|
|
393
|
+
style: v({ justifyContent: e.footerAlign })
|
|
394
|
+
}, [D(r.$slots, "footer", {}, void 0, !0)], 4)) : a("", !0)
|
|
395
|
+
], 4)]),
|
|
396
|
+
_: 3
|
|
397
|
+
}, 8, ["name"])], 4)) : a("", !0)]),
|
|
398
|
+
_: 3
|
|
399
|
+
})], 8, ["to"]));
|
|
311
400
|
}
|
|
312
|
-
}), [["__scopeId", "data-v-
|
|
401
|
+
}), [["__scopeId", "data-v-38747c12"]]), qe = {
|
|
313
402
|
key: 0,
|
|
314
403
|
class: "indicator-description"
|
|
315
|
-
},
|
|
404
|
+
}, Je = { class: "params-body" }, Ye = { class: "param-header" }, Xe = { class: "param-label" }, Ze = { class: "param-label-text" }, Qe = {
|
|
316
405
|
key: 0,
|
|
317
406
|
class: "param-range"
|
|
318
|
-
},
|
|
407
|
+
}, $e = { class: "input-wrapper" }, et = ["disabled", "onClick"], tt = [
|
|
319
408
|
"value",
|
|
320
409
|
"min",
|
|
321
410
|
"max",
|
|
322
411
|
"step",
|
|
323
412
|
"onInput"
|
|
324
|
-
],
|
|
413
|
+
], nt = ["disabled", "onClick"], rt = {
|
|
325
414
|
key: 0,
|
|
326
415
|
class: "param-description"
|
|
327
|
-
},
|
|
416
|
+
}, it = { class: "footer-right" }, at = /*#__PURE__*/ q(/* @__PURE__ */ u({
|
|
328
417
|
__name: "IndicatorParams",
|
|
329
418
|
props: {
|
|
330
419
|
visible: { type: Boolean },
|
|
@@ -335,142 +424,128 @@ var Te = [
|
|
|
335
424
|
values: {}
|
|
336
425
|
},
|
|
337
426
|
emits: ["close", "confirm"],
|
|
338
|
-
setup(
|
|
339
|
-
let
|
|
340
|
-
|
|
341
|
-
|
|
427
|
+
setup(t, { emit: r }) {
|
|
428
|
+
let u = t, d = r, f = T({ ...u.values }), p = T(!0);
|
|
429
|
+
P(() => u.values, (e) => {
|
|
430
|
+
f.value = { ...e };
|
|
342
431
|
}, {
|
|
343
432
|
deep: !0,
|
|
344
433
|
immediate: !0
|
|
345
|
-
}),
|
|
346
|
-
e && (
|
|
434
|
+
}), P(() => u.visible, (e) => {
|
|
435
|
+
e && (f.value = { ...u.values });
|
|
347
436
|
});
|
|
348
|
-
function
|
|
437
|
+
function m(e, t) {
|
|
349
438
|
let n = t.target, r = parseFloat(n.value);
|
|
350
|
-
isNaN(r) || (
|
|
439
|
+
isNaN(r) || (f.value[e] = r);
|
|
351
440
|
}
|
|
352
|
-
function
|
|
353
|
-
let n = e.step || 1, r = (
|
|
354
|
-
e.min !== void 0 && (r = Math.max(e.min, r)), e.max !== void 0 && (r = Math.min(e.max, r)),
|
|
441
|
+
function h(e, t) {
|
|
442
|
+
let n = e.step || 1, r = (f.value[e.key] || 0) + t * n;
|
|
443
|
+
e.min !== void 0 && (r = Math.max(e.min, r)), e.max !== void 0 && (r = Math.min(e.max, r)), f.value[e.key] = parseFloat(r.toFixed(10));
|
|
355
444
|
}
|
|
356
|
-
function
|
|
445
|
+
function g() {
|
|
357
446
|
let e = {};
|
|
358
|
-
|
|
359
|
-
e[t.key] = t.default ??
|
|
360
|
-
}),
|
|
361
|
-
}
|
|
362
|
-
function
|
|
363
|
-
|
|
364
|
-
}
|
|
365
|
-
return (
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
type: "number",
|
|
407
|
-
class: "param-input",
|
|
408
|
-
value: p.value[e.key],
|
|
409
|
-
min: e.min,
|
|
410
|
-
max: e.max,
|
|
411
|
-
step: e.step || 1,
|
|
412
|
-
onInput: (t) => g(e.key, t)
|
|
413
|
-
}, null, 40, qe)) : a("", !0),
|
|
414
|
-
s("button", {
|
|
415
|
-
class: "stepper-btn",
|
|
416
|
-
disabled: e.max !== void 0 && (p.value[e.key] ?? 0) >= e.max,
|
|
417
|
-
onClick: (t) => v(e, 1)
|
|
418
|
-
}, " + ", 8, Je)
|
|
419
|
-
])]), l(n, { name: "slide" }, {
|
|
420
|
-
default: P(() => [m.value && e.description ? (C(), o("div", Ye, k(e.description), 1)) : a("", !0)]),
|
|
421
|
-
_: 2
|
|
422
|
-
}, 1024)], 2))), 128))]),
|
|
423
|
-
s("div", Xe, [s("button", {
|
|
424
|
-
class: "params-btn reset",
|
|
425
|
-
onClick: y
|
|
426
|
-
}, [...d[8] ||= [s("svg", {
|
|
427
|
-
viewBox: "0 0 24 24",
|
|
428
|
-
fill: "none",
|
|
429
|
-
stroke: "currentColor",
|
|
430
|
-
"stroke-width": "2"
|
|
431
|
-
}, [s("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), s("path", { d: "M3 3v5h5" })], -1), c(" 重置 ", -1)]]), s("div", Ze, [s("button", {
|
|
432
|
-
class: "params-btn cancel",
|
|
433
|
-
onClick: d[2] ||= (e) => u.$emit("close")
|
|
434
|
-
}, "取消"), s("button", {
|
|
435
|
-
class: "params-btn confirm",
|
|
436
|
-
onClick: b
|
|
437
|
-
}, [...d[9] ||= [s("svg", {
|
|
438
|
-
viewBox: "0 0 24 24",
|
|
439
|
-
fill: "none",
|
|
440
|
-
stroke: "currentColor",
|
|
441
|
-
"stroke-width": "2.5"
|
|
442
|
-
}, [s("path", { d: "M20 6L9 17l-5-5" })], -1), c(" 确定 ", -1)]])])])
|
|
443
|
-
])]),
|
|
447
|
+
u.params.forEach((t) => {
|
|
448
|
+
e[t.key] = t.default ?? u.values[t.key] ?? 0;
|
|
449
|
+
}), f.value = e;
|
|
450
|
+
}
|
|
451
|
+
function v() {
|
|
452
|
+
d("confirm", { ...f.value });
|
|
453
|
+
}
|
|
454
|
+
return (r, u) => (C(), i(Y, {
|
|
455
|
+
show: t.visible,
|
|
456
|
+
title: t.indicatorName,
|
|
457
|
+
subtitle: "参数设置",
|
|
458
|
+
width: "90vw",
|
|
459
|
+
"max-width": "420px",
|
|
460
|
+
"transition-variant": "compact",
|
|
461
|
+
"overlay-padding": "0",
|
|
462
|
+
"footer-align": "space-between",
|
|
463
|
+
onClose: u[2] ||= (e) => r.$emit("close")
|
|
464
|
+
}, {
|
|
465
|
+
"header-extra": F(() => [s("button", {
|
|
466
|
+
class: _(["toggle-desc-btn", { active: p.value }]),
|
|
467
|
+
onClick: u[0] ||= (e) => p.value = !p.value,
|
|
468
|
+
title: "显示/隐藏说明"
|
|
469
|
+
}, [...u[3] ||= [s("svg", { viewBox: "0 0 1024 1024" }, [s("path", {
|
|
470
|
+
d: "M512 97.52381c228.912762 0 414.47619 185.563429 414.47619 414.47619s-185.563429 414.47619-414.47619 414.47619S97.52381 740.912762 97.52381 512 283.087238 97.52381 512 97.52381z m0 73.142857C323.486476 170.666667 170.666667 323.486476 170.666667 512s152.81981 341.333333 341.333333 341.333333 341.333333-152.81981 341.333333-341.333333S700.513524 170.666667 512 170.666667z m36.571429 268.190476v292.571428h-73.142858V438.857143h73.142858z m0-121.904762v73.142857h-73.142858v-73.142857h73.142858z",
|
|
471
|
+
fill: "currentColor"
|
|
472
|
+
})], -1)]], 2)]),
|
|
473
|
+
footer: F(() => [s("button", {
|
|
474
|
+
class: "params-btn reset",
|
|
475
|
+
onClick: g
|
|
476
|
+
}, [...u[4] ||= [s("svg", {
|
|
477
|
+
viewBox: "0 0 24 24",
|
|
478
|
+
fill: "none",
|
|
479
|
+
stroke: "currentColor",
|
|
480
|
+
"stroke-width": "2"
|
|
481
|
+
}, [s("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), s("path", { d: "M3 3v5h5" })], -1), c(" 重置 ", -1)]]), s("div", it, [s("button", {
|
|
482
|
+
class: "params-btn cancel",
|
|
483
|
+
onClick: u[1] ||= (e) => r.$emit("close")
|
|
484
|
+
}, "取消"), s("button", {
|
|
485
|
+
class: "params-btn confirm",
|
|
486
|
+
onClick: v
|
|
487
|
+
}, [...u[5] ||= [s("svg", {
|
|
488
|
+
viewBox: "0 0 24 24",
|
|
489
|
+
fill: "none",
|
|
490
|
+
stroke: "currentColor",
|
|
491
|
+
"stroke-width": "2.5"
|
|
492
|
+
}, [s("path", { d: "M20 6L9 17l-5-5" })], -1), c(" 确定 ", -1)]])])]),
|
|
493
|
+
default: F(() => [l(n, { name: "slide" }, {
|
|
494
|
+
default: F(() => [p.value && t.indicatorDescription ? (C(), o("div", qe, [s("p", null, A(t.indicatorDescription), 1)])) : a("", !0)]),
|
|
444
495
|
_: 1
|
|
445
|
-
})
|
|
496
|
+
}), s("div", Je, [(C(!0), o(e, null, E(t.params, (e) => (C(), o("div", {
|
|
497
|
+
key: e.key,
|
|
498
|
+
class: _(["param-item", { "has-desc": p.value && e.description }])
|
|
499
|
+
}, [s("div", Ye, [s("label", Xe, [s("span", Ze, A(e.label), 1), e.min !== void 0 || e.max !== void 0 ? (C(), o("span", Qe, A(e.min ?? "-∞") + " ~ " + A(e.max ?? "+∞"), 1)) : a("", !0)]), s("div", $e, [
|
|
500
|
+
s("button", {
|
|
501
|
+
class: "stepper-btn",
|
|
502
|
+
disabled: e.min !== void 0 && (f.value[e.key] ?? 0) <= e.min,
|
|
503
|
+
onClick: (t) => h(e, -1)
|
|
504
|
+
}, " − ", 8, et),
|
|
505
|
+
e.type === "number" ? (C(), o("input", {
|
|
506
|
+
key: 0,
|
|
507
|
+
type: "number",
|
|
508
|
+
class: "param-input",
|
|
509
|
+
value: f.value[e.key],
|
|
510
|
+
min: e.min,
|
|
511
|
+
max: e.max,
|
|
512
|
+
step: e.step || 1,
|
|
513
|
+
onInput: (t) => m(e.key, t)
|
|
514
|
+
}, null, 40, tt)) : a("", !0),
|
|
515
|
+
s("button", {
|
|
516
|
+
class: "stepper-btn",
|
|
517
|
+
disabled: e.max !== void 0 && (f.value[e.key] ?? 0) >= e.max,
|
|
518
|
+
onClick: (t) => h(e, 1)
|
|
519
|
+
}, " + ", 8, nt)
|
|
520
|
+
])]), l(n, { name: "slide" }, {
|
|
521
|
+
default: F(() => [p.value && e.description ? (C(), o("div", rt, A(e.description), 1)) : a("", !0)]),
|
|
522
|
+
_: 2
|
|
523
|
+
}, 1024)], 2))), 128))])]),
|
|
446
524
|
_: 1
|
|
447
|
-
}
|
|
525
|
+
}, 8, ["show", "title"]));
|
|
448
526
|
}
|
|
449
|
-
}), [["__scopeId", "data-v-
|
|
527
|
+
}), [["__scopeId", "data-v-5689c2c8"]]), ot = { class: "indicator-selector" }, st = { class: "header-title" }, ct = { class: "title-sub" }, lt = {
|
|
450
528
|
key: 0,
|
|
451
529
|
viewBox: "0 0 24 24",
|
|
452
530
|
width: "16",
|
|
453
531
|
height: "16",
|
|
454
532
|
fill: "currentColor"
|
|
455
|
-
},
|
|
533
|
+
}, ut = {
|
|
456
534
|
key: 1,
|
|
457
535
|
viewBox: "0 0 24 24",
|
|
458
536
|
width: "16",
|
|
459
537
|
height: "16",
|
|
460
538
|
fill: "currentColor"
|
|
461
|
-
},
|
|
539
|
+
}, dt = { class: "search-box" }, ft = ["value"], pt = {
|
|
462
540
|
key: 0,
|
|
463
541
|
class: "indicator-section"
|
|
464
|
-
},
|
|
542
|
+
}, mt = { class: "section-header" }, ht = { class: "section-count" }, gt = ["onClick"], _t = { class: "card-label" }, vt = { class: "card-tooltip" }, yt = { class: "card-header" }, bt = { class: "card-label" }, xt = { class: "card-header-actions" }, St = ["onClick"], Ct = { class: "card-name" }, wt = {
|
|
465
543
|
key: 1,
|
|
466
|
-
class: "section-divider"
|
|
467
|
-
}, St = {
|
|
468
|
-
key: 2,
|
|
469
544
|
class: "no-results"
|
|
470
|
-
},
|
|
471
|
-
key:
|
|
545
|
+
}, Tt = {
|
|
546
|
+
key: 2,
|
|
472
547
|
class: "indicator-section"
|
|
473
|
-
},
|
|
548
|
+
}, Et = { class: "section-header" }, Dt = { class: "section-count" }, Ot = ["onClick"], kt = { class: "card-label" }, At = { class: "card-tooltip" }, jt = { class: "card-header" }, X = { class: "card-label" }, Mt = { class: "card-header-actions" }, Nt = ["onClick"], Pt = { class: "card-name" }, Ft = { class: "footer-info" }, It = { class: "info-text" }, Lt = /*#__PURE__*/ q(/* @__PURE__ */ u({
|
|
474
549
|
__name: "IndicatorSelector",
|
|
475
550
|
props: {
|
|
476
551
|
activeIndicators: {},
|
|
@@ -481,9 +556,9 @@ var Te = [
|
|
|
481
556
|
"updateParams",
|
|
482
557
|
"reorderSubIndicators"
|
|
483
558
|
],
|
|
484
|
-
setup(
|
|
485
|
-
let
|
|
486
|
-
function
|
|
559
|
+
setup(t, { expose: n, emit: c }) {
|
|
560
|
+
let u = t, d = c;
|
|
561
|
+
function f(e) {
|
|
487
562
|
return e.map((e) => ({
|
|
488
563
|
id: e.id,
|
|
489
564
|
label: e.label,
|
|
@@ -501,151 +576,139 @@ var Te = [
|
|
|
501
576
|
}))
|
|
502
577
|
}));
|
|
503
578
|
}
|
|
504
|
-
let
|
|
579
|
+
let p = le(), m = $(p.menuOpen), h = $(p.searchQuery), g = $(p.filteredMain), v = $(p.filteredSub), y = r(() => g.value.length > 0 || v.value.length > 0), x = $(p.catalog), w = r(() => x.value.length);
|
|
505
580
|
b(async () => {
|
|
506
|
-
|
|
581
|
+
ue() || await fe(), p.catalog.set(f(H()));
|
|
507
582
|
});
|
|
508
|
-
let
|
|
509
|
-
function
|
|
510
|
-
return
|
|
583
|
+
let D = T(!1), O = T(null), k = T(!1), M = r(() => O.value ? U(O.value) : null), N = r(() => u.activeIndicators?.length ?? 0);
|
|
584
|
+
function P(e) {
|
|
585
|
+
return u.activeIndicators?.includes(e) ?? !1;
|
|
511
586
|
}
|
|
512
|
-
function
|
|
513
|
-
|
|
587
|
+
function I(e) {
|
|
588
|
+
P(e) || U(e) && d("toggle", e, !0);
|
|
514
589
|
}
|
|
515
|
-
function
|
|
516
|
-
|
|
590
|
+
function L(e) {
|
|
591
|
+
d("toggle", e, !1);
|
|
517
592
|
}
|
|
518
|
-
function
|
|
519
|
-
|
|
593
|
+
function z(e) {
|
|
594
|
+
O.value = e, D.value = !0;
|
|
520
595
|
}
|
|
521
|
-
function
|
|
596
|
+
function ee(e) {
|
|
522
597
|
let t = U(e);
|
|
523
598
|
if (!t?.params) return {};
|
|
524
599
|
let n = {};
|
|
525
600
|
for (let e of t.params) n[e.key] = e.default ?? e.min ?? 1;
|
|
526
|
-
let r =
|
|
601
|
+
let r = u.indicatorParams?.[e] || {}, i = { ...n };
|
|
527
602
|
for (let [e, t] of Object.entries(r)) typeof t == "number" && (i[e] = t);
|
|
528
603
|
return i;
|
|
529
604
|
}
|
|
530
|
-
function
|
|
531
|
-
|
|
605
|
+
function te(e) {
|
|
606
|
+
O.value && d("updateParams", O.value, e), D.value = !1;
|
|
532
607
|
}
|
|
533
|
-
function
|
|
534
|
-
e.key === "Escape" &&
|
|
608
|
+
function B(e) {
|
|
609
|
+
e.key === "Escape" && p.menuOpen.peek() && p.closeMenu();
|
|
535
610
|
}
|
|
536
611
|
return b(() => {
|
|
537
|
-
document.addEventListener("keydown",
|
|
612
|
+
document.addEventListener("keydown", B);
|
|
538
613
|
}), S(() => {
|
|
539
|
-
document.removeEventListener("keydown",
|
|
540
|
-
}),
|
|
541
|
-
openMenu: () =>
|
|
542
|
-
closeMenu: () =>
|
|
543
|
-
toggleMenu: () =>
|
|
544
|
-
}), (
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
614
|
+
document.removeEventListener("keydown", B);
|
|
615
|
+
}), n({
|
|
616
|
+
openMenu: () => p.openMenu(),
|
|
617
|
+
closeMenu: () => p.closeMenu(),
|
|
618
|
+
toggleMenu: () => p.toggleMenu()
|
|
619
|
+
}), (t, n) => (C(), o("div", ot, [l(Y, {
|
|
620
|
+
show: j(m),
|
|
621
|
+
title: "添加指标",
|
|
622
|
+
subtitle: "",
|
|
623
|
+
width: "90vw",
|
|
624
|
+
"max-width": "860px",
|
|
625
|
+
"max-height": "85vh",
|
|
626
|
+
"transition-variant": "compact",
|
|
627
|
+
"footer-align": "space-between",
|
|
628
|
+
onClose: n[3] ||= (e) => j(p).closeMenu()
|
|
629
|
+
}, {
|
|
630
|
+
header: F(() => [s("div", st, [n[5] ||= s("span", { class: "title-text" }, "添加指标", -1), s("span", ct, A(w.value) + " 个可用指标", 1)])]),
|
|
631
|
+
"header-extra": F(() => [s("button", {
|
|
632
|
+
class: _(["view-toggle-btn", { active: k.value }]),
|
|
633
|
+
onClick: n[0] ||= (e) => k.value = !k.value,
|
|
634
|
+
title: "简洁模式"
|
|
635
|
+
}, [k.value ? (C(), o("svg", ut, [...n[7] ||= [s("path", { d: "M3 3h18v18H3V3zm16 16V5H5v14h14zM7 7h4v4H7V7zm0 6h4v4H7v-4zm6-6h4v4h-4V7zm0 6h4v4h-4v-4z" }, null, -1)]])) : (C(), o("svg", lt, [...n[6] ||= [s("path", { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, null, -1)]]))], 2)]),
|
|
636
|
+
subheader: F(() => [s("div", dt, [n[8] ||= s("svg", {
|
|
637
|
+
class: "search-icon",
|
|
638
|
+
viewBox: "0 0 24 24",
|
|
639
|
+
width: "16",
|
|
640
|
+
height: "16",
|
|
641
|
+
fill: "currentColor"
|
|
642
|
+
}, [s("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })], -1), s("input", {
|
|
643
|
+
value: j(h),
|
|
644
|
+
onInput: n[1] ||= (e) => j(p).setSearchQuery(e.target.value),
|
|
645
|
+
type: "text",
|
|
646
|
+
class: "search-input",
|
|
647
|
+
placeholder: "搜索指标名称..."
|
|
648
|
+
}, null, 40, ft)])]),
|
|
649
|
+
footer: F(() => [s("div", Ft, [s("span", It, "已激活 " + A(N.value) + " 个指标", 1)]), s("button", {
|
|
650
|
+
class: "btn btn-confirm",
|
|
651
|
+
onClick: n[2] ||= (e) => j(p).closeMenu()
|
|
652
|
+
}, "确认")]),
|
|
653
|
+
default: F(() => [
|
|
654
|
+
j(g).length > 0 ? (C(), o("div", pt, [s("div", mt, [n[9] ||= s("span", { class: "section-title" }, "主图指标", -1), s("span", ht, A(j(g).length), 1)]), s("div", { class: _(["indicator-grid", { compact: k.value }]) }, [(C(!0), o(e, null, E(j(g), (t) => (C(), o("button", {
|
|
655
|
+
key: t.id,
|
|
656
|
+
class: _(["indicator-card", {
|
|
657
|
+
active: P(t.id),
|
|
658
|
+
compact: k.value
|
|
659
|
+
}]),
|
|
660
|
+
onClick: (e) => P(t.id) ? L(t.id) : I(t.id)
|
|
661
|
+
}, [k.value ? (C(), o(e, { key: 0 }, [s("span", _t, A(t.label), 1), s("span", vt, A(t.name), 1)], 64)) : (C(), o(e, { key: 1 }, [s("div", yt, [s("span", bt, A(t.label), 1), s("div", xt, [t.params?.length ? (C(), o("button", {
|
|
551
662
|
key: 0,
|
|
552
|
-
class: "
|
|
553
|
-
onClick:
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
}, [...c[10] ||= [s("svg", {
|
|
564
|
-
viewBox: "0 0 24 24",
|
|
565
|
-
width: "14",
|
|
566
|
-
height: "14",
|
|
567
|
-
fill: "currentColor"
|
|
568
|
-
}, [s("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]])])]),
|
|
569
|
-
s("div", ot, [s("div", st, [c[11] ||= s("svg", {
|
|
570
|
-
class: "search-icon",
|
|
663
|
+
class: "card-settings-btn",
|
|
664
|
+
onClick: R((e) => z(t.id), ["stop"]),
|
|
665
|
+
title: "编辑参数"
|
|
666
|
+
}, [...n[10] ||= [s("svg", {
|
|
667
|
+
viewBox: "0 0 24 24",
|
|
668
|
+
width: "14",
|
|
669
|
+
height: "14",
|
|
670
|
+
fill: "currentColor"
|
|
671
|
+
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, St)) : a("", !0)])]), s("div", Ct, A(t.name), 1)], 64))], 10, gt))), 128))], 2)])) : a("", !0),
|
|
672
|
+
!y.value && j(h).trim() ? (C(), o("div", wt, [...n[11] ||= [
|
|
673
|
+
s("svg", {
|
|
571
674
|
viewBox: "0 0 24 24",
|
|
572
|
-
width: "
|
|
573
|
-
height: "
|
|
675
|
+
width: "40",
|
|
676
|
+
height: "40",
|
|
574
677
|
fill: "currentColor"
|
|
575
|
-
}, [s("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })], -1),
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
height: "14",
|
|
599
|
-
fill: "currentColor"
|
|
600
|
-
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, yt)) : a("", !0)])]), s("div", bt, k(t.name), 1)], 64))], 10, pt))), 128))], 2)])) : a("", !0),
|
|
601
|
-
A(y).length > 0 && A(x).length > 0 ? (C(), o("div", xt)) : a("", !0),
|
|
602
|
-
!w.value && A(v).trim() ? (C(), o("div", St, [...c[14] ||= [
|
|
603
|
-
s("svg", {
|
|
604
|
-
viewBox: "0 0 24 24",
|
|
605
|
-
width: "48",
|
|
606
|
-
height: "48",
|
|
607
|
-
fill: "currentColor"
|
|
608
|
-
}, [s("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })], -1),
|
|
609
|
-
s("p", null, "未找到匹配的指标", -1),
|
|
610
|
-
s("span", { class: "no-results-hint" }, "请尝试其他关键词", -1)
|
|
611
|
-
]])) : a("", !0),
|
|
612
|
-
A(x).length > 0 ? (C(), o("div", Ct, [s("div", wt, [c[15] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", Tt, k(A(x).length), 1)]), s("div", { class: _(["indicator-grid", { compact: N.value }]) }, [(C(!0), o(e, null, E(A(x), (t) => (C(), o("button", {
|
|
613
|
-
key: t.id,
|
|
614
|
-
class: _(["indicator-card", {
|
|
615
|
-
active: z(t.id),
|
|
616
|
-
compact: N.value
|
|
617
|
-
}]),
|
|
618
|
-
onClick: (e) => z(t.id) ? te(t.id) : ee(t.id)
|
|
619
|
-
}, [N.value ? (C(), o(e, { key: 0 }, [s("span", Dt, k(t.label), 1), s("span", Ot, k(t.name), 1)], 64)) : (C(), o(e, { key: 1 }, [s("div", kt, [s("span", At, k(t.label), 1), s("div", jt, [t.params?.length ? (C(), o("button", {
|
|
620
|
-
key: 0,
|
|
621
|
-
class: "card-settings-btn",
|
|
622
|
-
onClick: L((e) => B(t.id), ["stop"]),
|
|
623
|
-
title: "编辑参数"
|
|
624
|
-
}, [...c[16] ||= [s("svg", {
|
|
625
|
-
viewBox: "0 0 24 24",
|
|
626
|
-
width: "14",
|
|
627
|
-
height: "14",
|
|
628
|
-
fill: "currentColor"
|
|
629
|
-
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, X)) : a("", !0)])]), s("div", Mt, k(t.name), 1)], 64))], 10, Et))), 128))], 2)])) : a("", !0)
|
|
630
|
-
]),
|
|
631
|
-
s("div", Nt, [s("div", Pt, [s("span", Ft, "已激活 " + k(R.value) + " 个指标", 1)]), s("button", {
|
|
632
|
-
class: "btn btn-confirm",
|
|
633
|
-
onClick: c[3] ||= (e) => A(h).closeMenu()
|
|
634
|
-
}, "确认")])
|
|
635
|
-
])) : a("", !0)]),
|
|
636
|
-
_: 1
|
|
637
|
-
})])) : a("", !0)]),
|
|
678
|
+
}, [s("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })], -1),
|
|
679
|
+
s("p", null, "未找到匹配的指标", -1),
|
|
680
|
+
s("span", { class: "no-results-hint" }, "请尝试其他关键词", -1)
|
|
681
|
+
]])) : a("", !0),
|
|
682
|
+
j(v).length > 0 ? (C(), o("div", Tt, [s("div", Et, [n[12] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", Dt, A(j(v).length), 1)]), s("div", { class: _(["indicator-grid", { compact: k.value }]) }, [(C(!0), o(e, null, E(j(v), (t) => (C(), o("button", {
|
|
683
|
+
key: t.id,
|
|
684
|
+
class: _(["indicator-card", {
|
|
685
|
+
active: P(t.id),
|
|
686
|
+
compact: k.value
|
|
687
|
+
}]),
|
|
688
|
+
onClick: (e) => P(t.id) ? L(t.id) : I(t.id)
|
|
689
|
+
}, [k.value ? (C(), o(e, { key: 0 }, [s("span", kt, A(t.label), 1), s("span", At, A(t.name), 1)], 64)) : (C(), o(e, { key: 1 }, [s("div", jt, [s("span", X, A(t.label), 1), s("div", Mt, [t.params?.length ? (C(), o("button", {
|
|
690
|
+
key: 0,
|
|
691
|
+
class: "card-settings-btn",
|
|
692
|
+
onClick: R((e) => z(t.id), ["stop"]),
|
|
693
|
+
title: "编辑参数"
|
|
694
|
+
}, [...n[13] ||= [s("svg", {
|
|
695
|
+
viewBox: "0 0 24 24",
|
|
696
|
+
width: "14",
|
|
697
|
+
height: "14",
|
|
698
|
+
fill: "currentColor"
|
|
699
|
+
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, Nt)) : a("", !0)])]), s("div", Pt, A(t.name), 1)], 64))], 10, Ot))), 128))], 2)])) : a("", !0)
|
|
700
|
+
]),
|
|
638
701
|
_: 1
|
|
639
|
-
}
|
|
702
|
+
}, 8, ["show"]), M.value ? (C(), i(at, {
|
|
640
703
|
key: 0,
|
|
641
|
-
visible:
|
|
642
|
-
"indicator-id":
|
|
643
|
-
"indicator-name":
|
|
644
|
-
"indicator-description":
|
|
645
|
-
params:
|
|
646
|
-
values:
|
|
647
|
-
onClose:
|
|
648
|
-
onConfirm:
|
|
704
|
+
visible: D.value,
|
|
705
|
+
"indicator-id": M.value.id,
|
|
706
|
+
"indicator-name": M.value.name,
|
|
707
|
+
"indicator-description": M.value.description,
|
|
708
|
+
params: M.value.params || [],
|
|
709
|
+
values: ee(M.value.id),
|
|
710
|
+
onClose: n[4] ||= (e) => D.value = !1,
|
|
711
|
+
onConfirm: te
|
|
649
712
|
}, null, 8, [
|
|
650
713
|
"visible",
|
|
651
714
|
"indicator-id",
|
|
@@ -655,25 +718,25 @@ var Te = [
|
|
|
655
718
|
"values"
|
|
656
719
|
])) : a("", !0)]));
|
|
657
720
|
}
|
|
658
|
-
}), [["__scopeId", "data-v-
|
|
721
|
+
}), [["__scopeId", "data-v-b418736f"]]), Rt = { class: "kline-tooltip__title" }, zt = { key: 0 }, Bt = { class: "kline-tooltip__grid" }, Vt = { class: "row" }, Ht = { class: "row" }, Ut = { class: "row" }, Wt = { class: "row" }, Gt = {
|
|
659
722
|
key: 0,
|
|
660
723
|
class: "row"
|
|
661
|
-
},
|
|
724
|
+
}, Kt = {
|
|
662
725
|
key: 1,
|
|
663
726
|
class: "row"
|
|
664
|
-
},
|
|
727
|
+
}, qt = {
|
|
665
728
|
key: 2,
|
|
666
729
|
class: "row"
|
|
667
|
-
},
|
|
730
|
+
}, Jt = {
|
|
668
731
|
key: 3,
|
|
669
732
|
class: "row"
|
|
670
|
-
},
|
|
733
|
+
}, Yt = {
|
|
671
734
|
key: 4,
|
|
672
735
|
class: "row"
|
|
673
|
-
},
|
|
736
|
+
}, Xt = {
|
|
674
737
|
key: 5,
|
|
675
738
|
class: "row"
|
|
676
|
-
}, Z = "#6b7280",
|
|
739
|
+
}, Z = "#6b7280", Zt = /*#__PURE__*/ q(/* @__PURE__ */ u({
|
|
677
740
|
__name: "KLineTooltip",
|
|
678
741
|
props: {
|
|
679
742
|
k: {},
|
|
@@ -734,23 +797,23 @@ var Te = [
|
|
|
734
797
|
left: `${e.pos.x}px`,
|
|
735
798
|
top: `${e.pos.y}px`
|
|
736
799
|
})
|
|
737
|
-
}, [s("div",
|
|
738
|
-
s("div",
|
|
739
|
-
s("div",
|
|
740
|
-
s("div",
|
|
741
|
-
s("div",
|
|
742
|
-
typeof e.k.volume == "number" ? (C(), o("div",
|
|
743
|
-
typeof e.k.turnover == "number" ? (C(), o("div",
|
|
744
|
-
typeof e.k.amplitude == "number" ? (C(), o("div",
|
|
745
|
-
typeof e.k.changePercent == "number" ? (C(), o("div",
|
|
746
|
-
typeof e.k.changeAmount == "number" ? (C(), o("div",
|
|
747
|
-
typeof e.k.turnoverRate == "number" ? (C(), o("div",
|
|
800
|
+
}, [s("div", Rt, [e.k.stockCode ? (C(), o("span", zt, A(e.k.stockCode), 1)) : a("", !0), s("span", null, A(n.value), 1)]), s("div", Bt, [
|
|
801
|
+
s("div", Vt, [r[0] ||= s("span", null, "开", -1), s("span", { style: v({ color: p.value }) }, A(e.k.open.toFixed(2)), 5)]),
|
|
802
|
+
s("div", Ht, [r[1] ||= s("span", null, "高", -1), s("span", null, A(e.k.high.toFixed(2)), 1)]),
|
|
803
|
+
s("div", Ut, [r[2] ||= s("span", null, "低", -1), s("span", null, A(e.k.low.toFixed(2)), 1)]),
|
|
804
|
+
s("div", Wt, [r[3] ||= s("span", null, "收", -1), s("span", { style: v({ color: m.value }) }, A(e.k.close.toFixed(2)), 5)]),
|
|
805
|
+
typeof e.k.volume == "number" ? (C(), o("div", Gt, [r[4] ||= s("span", null, "成交量", -1), s("span", null, A(u(e.k.volume)), 1)])) : a("", !0),
|
|
806
|
+
typeof e.k.turnover == "number" ? (C(), o("div", Kt, [r[5] ||= s("span", null, "成交额", -1), s("span", null, A(u(e.k.turnover)), 1)])) : a("", !0),
|
|
807
|
+
typeof e.k.amplitude == "number" ? (C(), o("div", qt, [r[6] ||= s("span", null, "振幅", -1), s("span", null, A(e.k.amplitude) + "%", 1)])) : a("", !0),
|
|
808
|
+
typeof e.k.changePercent == "number" ? (C(), o("div", Jt, [r[7] ||= s("span", null, "涨跌幅", -1), s("span", { style: v({ color: h.value }) }, A(d(e.k.changePercent, "%")), 5)])) : a("", !0),
|
|
809
|
+
typeof e.k.changeAmount == "number" ? (C(), o("div", Yt, [r[8] ||= s("span", null, "涨跌额", -1), s("span", { style: v({ color: h.value }) }, A(d(e.k.changeAmount, "")), 5)])) : a("", !0),
|
|
810
|
+
typeof e.k.turnoverRate == "number" ? (C(), o("div", Xt, [r[9] ||= s("span", null, "换手率", -1), s("span", null, A(e.k.turnoverRate.toFixed(2)) + "%", 1)])) : a("", !0)
|
|
748
811
|
])], 6)) : a("", !0);
|
|
749
812
|
}
|
|
750
|
-
}), [["__scopeId", "data-v-80fa3a7d"]]),
|
|
813
|
+
}), [["__scopeId", "data-v-80fa3a7d"]]), Qt = { class: "marker-tooltip__title" }, $t = {
|
|
751
814
|
key: 0,
|
|
752
815
|
class: "marker-tooltip__content"
|
|
753
|
-
},
|
|
816
|
+
}, en = /*#__PURE__*/ q(/* @__PURE__ */ u({
|
|
754
817
|
__name: "MarkerTooltip",
|
|
755
818
|
props: {
|
|
756
819
|
marker: {},
|
|
@@ -799,30 +862,107 @@ var Te = [
|
|
|
799
862
|
left: `${t.pos.x + 12}px`,
|
|
800
863
|
top: `${t.pos.y + 12}px`
|
|
801
864
|
})
|
|
802
|
-
}, [s("div",
|
|
865
|
+
}, [s("div", Qt, A(f.value), 1), m.value ? (C(), o("div", $t, [(C(!0), o(e, null, E(p.value, (e, t) => (C(), o("div", {
|
|
803
866
|
key: t,
|
|
804
867
|
class: "row"
|
|
805
|
-
}, [s("span", null,
|
|
868
|
+
}, [s("span", null, A(t), 1), s("span", null, A(h(e)), 1)]))), 128))])) : a("", !0)], 6)) : a("", !0);
|
|
869
|
+
}
|
|
870
|
+
}), [["__scopeId", "data-v-f2a21012"]]), tn = ["value", "placeholder"], nn = ["value", "placeholder"], rn = { class: "range-count" }, an = /*#__PURE__*/ q(/* @__PURE__ */ u({
|
|
871
|
+
__name: "RangeSelectionExport",
|
|
872
|
+
props: {
|
|
873
|
+
startDate: {},
|
|
874
|
+
endDate: {},
|
|
875
|
+
startLabel: {},
|
|
876
|
+
endLabel: {},
|
|
877
|
+
count: {}
|
|
878
|
+
},
|
|
879
|
+
emits: [
|
|
880
|
+
"update:startDate",
|
|
881
|
+
"update:endDate",
|
|
882
|
+
"export",
|
|
883
|
+
"clear",
|
|
884
|
+
"batchSetting"
|
|
885
|
+
],
|
|
886
|
+
setup(e) {
|
|
887
|
+
return (t, n) => (C(), i(Le, null, {
|
|
888
|
+
default: F(() => [
|
|
889
|
+
s("input", {
|
|
890
|
+
class: "range-input",
|
|
891
|
+
value: e.startDate,
|
|
892
|
+
onInput: n[0] ||= (e) => t.$emit("update:startDate", e.target.value),
|
|
893
|
+
placeholder: e.startLabel
|
|
894
|
+
}, null, 40, tn),
|
|
895
|
+
n[6] ||= s("span", { class: "range-sep" }, "~", -1),
|
|
896
|
+
s("input", {
|
|
897
|
+
class: "range-input",
|
|
898
|
+
value: e.endDate,
|
|
899
|
+
onInput: n[1] ||= (e) => t.$emit("update:endDate", e.target.value),
|
|
900
|
+
placeholder: e.endLabel
|
|
901
|
+
}, null, 40, nn),
|
|
902
|
+
s("span", rn, "共 " + A(e.count) + " 条", 1),
|
|
903
|
+
s("button", {
|
|
904
|
+
type: "button",
|
|
905
|
+
class: "toolbar-btn",
|
|
906
|
+
title: "批量设置",
|
|
907
|
+
onClick: n[2] ||= (e) => t.$emit("batchSetting")
|
|
908
|
+
}, " 批量设置 "),
|
|
909
|
+
s("button", {
|
|
910
|
+
type: "button",
|
|
911
|
+
class: "toolbar-btn",
|
|
912
|
+
title: "导出",
|
|
913
|
+
onClick: n[3] ||= (e) => t.$emit("export")
|
|
914
|
+
}, "导出"),
|
|
915
|
+
s("button", {
|
|
916
|
+
type: "button",
|
|
917
|
+
class: "toolbar-btn toolbar-btn--delete",
|
|
918
|
+
title: "取消选区",
|
|
919
|
+
onClick: n[4] ||= (e) => t.$emit("clear")
|
|
920
|
+
}, [...n[5] ||= [s("svg", {
|
|
921
|
+
class: "delete-icon",
|
|
922
|
+
viewBox: "0 0 24 24",
|
|
923
|
+
fill: "none",
|
|
924
|
+
stroke: "currentColor",
|
|
925
|
+
"stroke-width": "2",
|
|
926
|
+
"stroke-linecap": "round",
|
|
927
|
+
"stroke-linejoin": "round",
|
|
928
|
+
"aria-hidden": "true"
|
|
929
|
+
}, [
|
|
930
|
+
s("path", { d: "M3 6h18" }),
|
|
931
|
+
s("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
|
|
932
|
+
s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
|
|
933
|
+
], -1)]])
|
|
934
|
+
]),
|
|
935
|
+
_: 1
|
|
936
|
+
}));
|
|
806
937
|
}
|
|
807
|
-
}), [["__scopeId", "data-v-
|
|
938
|
+
}), [["__scopeId", "data-v-6e5ee3f6"]]), on = {};
|
|
939
|
+
function sn(e, t) {
|
|
940
|
+
return C(), o("div", {
|
|
941
|
+
class: "canvas-toolbar-stack",
|
|
942
|
+
onPointerdown: t[0] ||= R(() => {}, ["stop"]),
|
|
943
|
+
onPointermove: t[1] ||= R(() => {}, ["stop"]),
|
|
944
|
+
onPointerup: t[2] ||= R(() => {}, ["stop"])
|
|
945
|
+
}, [D(e.$slots, "default", {}, void 0, !0)], 32);
|
|
946
|
+
}
|
|
947
|
+
var cn = /*#__PURE__*/ q(on, [["render", sn], ["__scopeId", "data-v-82232270"]]);
|
|
808
948
|
//#endregion
|
|
809
949
|
//#region src/composables/chart/useChartTheme.ts
|
|
810
|
-
function
|
|
950
|
+
function ln(e) {
|
|
811
951
|
let t = T("light"), n = T({}), i = r(() => {
|
|
812
|
-
let e = n.value.isAsiaMarket ?? !1, r =
|
|
952
|
+
let e = n.value.isAsiaMarket ?? !1, r = ae(t.value, e);
|
|
813
953
|
return {
|
|
814
954
|
upColor: r.candleUpBody,
|
|
815
955
|
downColor: r.candleDownBody
|
|
816
956
|
};
|
|
817
957
|
}), a = r(() => {
|
|
818
|
-
let e = t.value === "dark" ?
|
|
819
|
-
return r && Object.keys(r).length > 0 ?
|
|
958
|
+
let e = t.value === "dark" ? ne : re, r = n.value.colorPresetSettings?.[t.value];
|
|
959
|
+
return r && Object.keys(r).length > 0 ? oe({
|
|
820
960
|
...e,
|
|
821
961
|
colors: {
|
|
822
962
|
...e.colors,
|
|
823
963
|
...r
|
|
824
964
|
}
|
|
825
|
-
}) :
|
|
965
|
+
}) : oe(e);
|
|
826
966
|
}), o = null;
|
|
827
967
|
function s(t) {
|
|
828
968
|
e.value?.setTheme(t.matches ? "dark" : "light");
|
|
@@ -850,7 +990,7 @@ function en(e) {
|
|
|
850
990
|
}
|
|
851
991
|
//#endregion
|
|
852
992
|
//#region src/composables/chart/useIndicatorManager.ts
|
|
853
|
-
function
|
|
993
|
+
function un(e, t) {
|
|
854
994
|
let n = T([]), i = T([]), a = r(() => {
|
|
855
995
|
let e = [], t = /* @__PURE__ */ new Set();
|
|
856
996
|
for (let n of i.value) t.has(n.indicatorId) || (t.add(n.indicatorId), e.push(n.indicatorId));
|
|
@@ -877,12 +1017,12 @@ function tn(e, t) {
|
|
|
877
1017
|
}
|
|
878
1018
|
function l(e) {
|
|
879
1019
|
if (e === "VOLUME") return {};
|
|
880
|
-
let t =
|
|
1020
|
+
let t = he(e);
|
|
881
1021
|
return t?.runtime?.defaultConfig ? { ...t.runtime.defaultConfig } : {};
|
|
882
1022
|
}
|
|
883
1023
|
function u(e) {
|
|
884
1024
|
if (e === "VOLUME") return !0;
|
|
885
|
-
let t =
|
|
1025
|
+
let t = he(e);
|
|
886
1026
|
return !!t && t.category !== "main";
|
|
887
1027
|
}
|
|
888
1028
|
function d(t = "VOLUME", n) {
|
|
@@ -909,7 +1049,7 @@ function tn(e, t) {
|
|
|
909
1049
|
function g(t, r) {
|
|
910
1050
|
let a = e.value;
|
|
911
1051
|
if (!a) return;
|
|
912
|
-
let o =
|
|
1052
|
+
let o = he(t);
|
|
913
1053
|
if (o && (o.category === "main" || o.allowMainPane)) {
|
|
914
1054
|
let e = n.value.find((e) => e === t);
|
|
915
1055
|
r && !e ? a.addIndicator(t, "main", s.value[t]) : !r && e && a.removeIndicator(t.toUpperCase());
|
|
@@ -1014,8 +1154,8 @@ function tn(e, t) {
|
|
|
1014
1154
|
}
|
|
1015
1155
|
//#endregion
|
|
1016
1156
|
//#region src/composables/chart/useDrawingManager.ts
|
|
1017
|
-
function
|
|
1018
|
-
let t =
|
|
1157
|
+
function dn(e) {
|
|
1158
|
+
let t = k(null), n = T(null), i = T([]), a = r(() => {
|
|
1019
1159
|
let e = n.value;
|
|
1020
1160
|
return e ? i.value.find((t) => t.id === e) ?? null : null;
|
|
1021
1161
|
});
|
|
@@ -1031,7 +1171,7 @@ function nn(e) {
|
|
|
1031
1171
|
!e || !t.value || (t.value.removeDrawing(e.id), i.value = t.value.getDrawings());
|
|
1032
1172
|
}
|
|
1033
1173
|
function l(e) {
|
|
1034
|
-
t.value = new
|
|
1174
|
+
t.value = new se(e), t.value.setCallbacks({
|
|
1035
1175
|
onDrawingCreated: (e) => {
|
|
1036
1176
|
i.value = [...i.value, e], n.value = e.id;
|
|
1037
1177
|
},
|
|
@@ -1054,7 +1194,7 @@ function nn(e) {
|
|
|
1054
1194
|
}
|
|
1055
1195
|
//#endregion
|
|
1056
1196
|
//#region src/tools/calcRangeOverlayPixel.ts
|
|
1057
|
-
function
|
|
1197
|
+
function fn(e, t, n, r) {
|
|
1058
1198
|
let { kWidth: i, kGap: a } = t.getKWidthKGap(), o = t.getCurrentDpr(), s = Math.max(1, Math.round(i * o) + +(Math.round(i * o) % 2 == 0)), c = Math.round(a * o), l = s + c, u = c, d = n.scrollLeft - r.scrollLeft, f = d + (u + e.start * l) / o;
|
|
1059
1199
|
return {
|
|
1060
1200
|
left: f,
|
|
@@ -1064,7 +1204,7 @@ function rn(e, t, n, r) {
|
|
|
1064
1204
|
}
|
|
1065
1205
|
//#endregion
|
|
1066
1206
|
//#region src/tools/getKLineIndexByTimestamp.ts
|
|
1067
|
-
function
|
|
1207
|
+
function pn(e, t) {
|
|
1068
1208
|
let n = 0, r = e.length - 1;
|
|
1069
1209
|
for (; n <= r;) {
|
|
1070
1210
|
let i = n + r >>> 1, a = e[i].timestamp;
|
|
@@ -1079,36 +1219,36 @@ function an(e, t) {
|
|
|
1079
1219
|
high: r
|
|
1080
1220
|
};
|
|
1081
1221
|
}
|
|
1082
|
-
function
|
|
1222
|
+
function mn(e, t, n) {
|
|
1083
1223
|
if (e.length === 0) return null;
|
|
1084
|
-
let { low: r, high: i } =
|
|
1224
|
+
let { low: r, high: i } = pn(e, t);
|
|
1085
1225
|
return r === i ? r : n === "left" ? i >= 0 ? i : r < e.length ? r : null : r < e.length ? r : i;
|
|
1086
1226
|
}
|
|
1087
1227
|
//#endregion
|
|
1088
1228
|
//#region src/composables/chart/useRangeSelection.ts
|
|
1089
|
-
function
|
|
1229
|
+
function hn(e) {
|
|
1090
1230
|
return e ? e.date ? e.date : new Date(e.timestamp).toISOString().slice(0, 10) : "?";
|
|
1091
1231
|
}
|
|
1092
|
-
function
|
|
1232
|
+
function gn(e) {
|
|
1093
1233
|
let t = new Date(e);
|
|
1094
1234
|
return `${t.getFullYear()}${String(t.getMonth() + 1).padStart(2, "0")}${String(t.getDate()).padStart(2, "0")}`;
|
|
1095
1235
|
}
|
|
1096
|
-
function
|
|
1236
|
+
function _n(e) {
|
|
1097
1237
|
let t = e.trim().split(/[-/]/);
|
|
1098
1238
|
return t.length === 3 ? `${t[0].padStart(4, "0")}-${t[1].padStart(2, "0")}-${t[2].padStart(2, "0")}` : null;
|
|
1099
1239
|
}
|
|
1100
|
-
function
|
|
1240
|
+
function vn(e) {
|
|
1101
1241
|
if (e == null) return "";
|
|
1102
1242
|
let t = String(e);
|
|
1103
1243
|
return /[",\r\n]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
|
|
1104
1244
|
}
|
|
1105
|
-
function
|
|
1106
|
-
let t =
|
|
1245
|
+
function yn(e) {
|
|
1246
|
+
let t = _n(e);
|
|
1107
1247
|
if (!t) return null;
|
|
1108
1248
|
let n = new Date(t);
|
|
1109
1249
|
return isNaN(n.getTime()) ? null : n.getTime();
|
|
1110
1250
|
}
|
|
1111
|
-
function
|
|
1251
|
+
function bn(e) {
|
|
1112
1252
|
let { controller: t, activeToolId: n, containerRef: i, dataVersion: a, viewportVersion: o, dataFetcher: s, batchStockCodes: c } = e, l = T(0), u = T(""), d = T(""), f = T(null), p = T(null), m = T({
|
|
1113
1253
|
startTimestamp: null,
|
|
1114
1254
|
endTimestamp: null,
|
|
@@ -1117,61 +1257,64 @@ function fn(e) {
|
|
|
1117
1257
|
a.value;
|
|
1118
1258
|
let e = t.value?.getData() ?? [], { startTimestamp: n, endTimestamp: r } = m.value;
|
|
1119
1259
|
if (n === null || r === null || e.length === 0) return null;
|
|
1120
|
-
let i =
|
|
1260
|
+
let i = mn(e, n, "left"), o = mn(e, r, "right");
|
|
1121
1261
|
return i === null || o === null ? null : {
|
|
1122
1262
|
start: Math.min(i, o),
|
|
1123
1263
|
end: Math.max(i, o)
|
|
1124
1264
|
};
|
|
1125
1265
|
}), v = r(() => {
|
|
1126
1266
|
let e = _.value, n = t.value?.getData() ?? [];
|
|
1127
|
-
return !e || n.length === 0 ? "" :
|
|
1267
|
+
return !e || n.length === 0 ? "" : hn(n[e.start]);
|
|
1128
1268
|
}), y = r(() => {
|
|
1129
1269
|
let e = _.value, n = t.value?.getData() ?? [];
|
|
1130
|
-
return !e || n.length === 0 ? "" :
|
|
1270
|
+
return !e || n.length === 0 ? "" : hn(n[e.end]);
|
|
1131
1271
|
}), b = r(() => {
|
|
1272
|
+
let e = _.value;
|
|
1273
|
+
return e ? e.end - e.start + 1 : 0;
|
|
1274
|
+
}), x = r(() => {
|
|
1132
1275
|
let e = _.value;
|
|
1133
1276
|
if (!e) return null;
|
|
1134
1277
|
l.value, o.value;
|
|
1135
1278
|
let n = t.value, r = n?.getViewport(), a = i.value;
|
|
1136
1279
|
if (!n || !r || !a) return null;
|
|
1137
|
-
let s =
|
|
1280
|
+
let s = fn(e, n, a, r);
|
|
1138
1281
|
return {
|
|
1139
1282
|
left: `${s.left}px`,
|
|
1140
1283
|
width: `${s.width}px`,
|
|
1141
1284
|
height: `${s.height}px`
|
|
1142
1285
|
};
|
|
1143
1286
|
});
|
|
1144
|
-
function
|
|
1287
|
+
function S() {
|
|
1145
1288
|
m.value = {
|
|
1146
1289
|
startTimestamp: null,
|
|
1147
1290
|
endTimestamp: null,
|
|
1148
1291
|
isDragging: !1
|
|
1149
1292
|
}, u.value = "", d.value = "";
|
|
1150
1293
|
}
|
|
1151
|
-
|
|
1152
|
-
let n = t.value?.getData() ?? [], r =
|
|
1294
|
+
P(u, (e) => {
|
|
1295
|
+
let n = t.value?.getData() ?? [], r = yn(e);
|
|
1153
1296
|
r === null || n.length === 0 || (m.value = {
|
|
1154
1297
|
...m.value,
|
|
1155
1298
|
startTimestamp: r,
|
|
1156
1299
|
isDragging: !1
|
|
1157
1300
|
}, r < n[0].timestamp && t.value?.ensureDataRange(r));
|
|
1158
|
-
}),
|
|
1159
|
-
let n = t.value?.getData() ?? [], r =
|
|
1301
|
+
}), P(d, (e) => {
|
|
1302
|
+
let n = t.value?.getData() ?? [], r = yn(e);
|
|
1160
1303
|
r === null || n.length === 0 || (m.value = {
|
|
1161
1304
|
...m.value,
|
|
1162
1305
|
endTimestamp: r,
|
|
1163
1306
|
isDragging: !1
|
|
1164
1307
|
}, r < n[0].timestamp && t.value?.ensureDataRange(r));
|
|
1165
1308
|
});
|
|
1166
|
-
function
|
|
1309
|
+
function C(e, n) {
|
|
1167
1310
|
let r = t.value?.getData() ?? [];
|
|
1168
1311
|
if (r.length === 0) return null;
|
|
1169
1312
|
let i = n.getBoundingClientRect(), a = t.value?.getLogicalIndexAtX(e.clientX - i.left);
|
|
1170
1313
|
return a == null ? null : Math.max(0, Math.min(a, r.length - 1));
|
|
1171
1314
|
}
|
|
1172
|
-
function
|
|
1315
|
+
function w(e, n) {
|
|
1173
1316
|
if (!h.value || m.value.startTimestamp !== null && m.value.endTimestamp !== null && !m.value.isDragging) return !1;
|
|
1174
|
-
let r =
|
|
1317
|
+
let r = C(e, n);
|
|
1175
1318
|
if (r === null) return !0;
|
|
1176
1319
|
let i = (t.value?.getData() ?? [])[r]?.timestamp;
|
|
1177
1320
|
return i === void 0 ? !0 : (m.value = {
|
|
@@ -1180,9 +1323,9 @@ function fn(e) {
|
|
|
1180
1323
|
isDragging: !0
|
|
1181
1324
|
}, u.value = "", d.value = "", n.setPointerCapture?.(e.pointerId), e.preventDefault(), !0);
|
|
1182
1325
|
}
|
|
1183
|
-
function
|
|
1326
|
+
function E(e, n) {
|
|
1184
1327
|
if (!h.value || !m.value.isDragging) return !1;
|
|
1185
|
-
let r =
|
|
1328
|
+
let r = C(e, n);
|
|
1186
1329
|
if (r !== null) {
|
|
1187
1330
|
let e = (t.value?.getData() ?? [])[r]?.timestamp;
|
|
1188
1331
|
e !== void 0 && (m.value = {
|
|
@@ -1192,9 +1335,9 @@ function fn(e) {
|
|
|
1192
1335
|
}
|
|
1193
1336
|
return e.preventDefault(), !0;
|
|
1194
1337
|
}
|
|
1195
|
-
function
|
|
1338
|
+
function D(e, n) {
|
|
1196
1339
|
if (!h.value || !m.value.isDragging) return !1;
|
|
1197
|
-
let r =
|
|
1340
|
+
let r = C(e, n);
|
|
1198
1341
|
if (r !== null) {
|
|
1199
1342
|
let e = (t.value?.getData() ?? [])[r]?.timestamp;
|
|
1200
1343
|
e === void 0 ? m.value = {
|
|
@@ -1211,10 +1354,10 @@ function fn(e) {
|
|
|
1211
1354
|
};
|
|
1212
1355
|
return n.releasePointerCapture?.(e.pointerId), e.preventDefault(), !0;
|
|
1213
1356
|
}
|
|
1214
|
-
function
|
|
1357
|
+
function O(e, t) {
|
|
1215
1358
|
h.value && (f.value = e, t.currentTarget.setPointerCapture?.(t.pointerId), t.preventDefault());
|
|
1216
1359
|
}
|
|
1217
|
-
function
|
|
1360
|
+
function k(e) {
|
|
1218
1361
|
if (!f.value || m.value.startTimestamp === null || m.value.endTimestamp === null) return;
|
|
1219
1362
|
let n = i.value?.getBoundingClientRect();
|
|
1220
1363
|
if (!n) return;
|
|
@@ -1239,10 +1382,10 @@ function fn(e) {
|
|
|
1239
1382
|
endTimestamp: o
|
|
1240
1383
|
});
|
|
1241
1384
|
}
|
|
1242
|
-
function
|
|
1385
|
+
function A(e) {
|
|
1243
1386
|
f.value &&= (e.currentTarget.releasePointerCapture?.(e.pointerId), null);
|
|
1244
1387
|
}
|
|
1245
|
-
let
|
|
1388
|
+
let j = [
|
|
1246
1389
|
"timestamp",
|
|
1247
1390
|
"open",
|
|
1248
1391
|
"high",
|
|
@@ -1255,14 +1398,14 @@ function fn(e) {
|
|
|
1255
1398
|
"changePercent",
|
|
1256
1399
|
"changeAmount"
|
|
1257
1400
|
];
|
|
1258
|
-
function
|
|
1259
|
-
let i = [`stockCode,time,${
|
|
1260
|
-
let n =
|
|
1261
|
-
return `${
|
|
1401
|
+
function M(e, t, n, r) {
|
|
1402
|
+
let i = [`stockCode,time,${j.join(",")}`, ...e.map((e) => {
|
|
1403
|
+
let n = vn(V(e.timestamp, { showTime: !0 }));
|
|
1404
|
+
return `${vn(e.stockCode ?? t)},${n},${j.map((t) => vn(e[t])).join(",")}`;
|
|
1262
1405
|
})], a = new Blob([`\uFEFF${i.join("\n")}`], { type: "text/csv;charset=utf-8" }), o = URL.createObjectURL(a), s = document.createElement("a");
|
|
1263
|
-
s.href = o, s.download = `${t}-${
|
|
1406
|
+
s.href = o, s.download = `${t}-${gn(n)}-${gn(r)}.csv`, document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(o);
|
|
1264
1407
|
}
|
|
1265
|
-
async function
|
|
1408
|
+
async function N() {
|
|
1266
1409
|
let e = _.value, n = t.value?.getData() ?? [];
|
|
1267
1410
|
if (!e || n.length === 0) return;
|
|
1268
1411
|
let r = n[e.start].timestamp, i = n[e.end].timestamp, a = t.value?.symbols.peek()?.[0]?.symbol ?? "unknown", o = c.value, l = 1 + o.length, u = o.length > 0 ? `batch${l}` : a, d = [];
|
|
@@ -1306,17 +1449,17 @@ function fn(e) {
|
|
|
1306
1449
|
current: l,
|
|
1307
1450
|
total: l,
|
|
1308
1451
|
label: "正在生成文件..."
|
|
1309
|
-
},
|
|
1452
|
+
}, M(d, u, r, i), p.value = {
|
|
1310
1453
|
current: l,
|
|
1311
1454
|
total: l,
|
|
1312
1455
|
label: "导出完成"
|
|
1313
1456
|
};
|
|
1314
1457
|
}
|
|
1315
|
-
function
|
|
1458
|
+
function F() {
|
|
1316
1459
|
let e = i.value;
|
|
1317
1460
|
e && (l.value = e.scrollLeft);
|
|
1318
1461
|
}
|
|
1319
|
-
function
|
|
1462
|
+
function I() {
|
|
1320
1463
|
let e = i.value;
|
|
1321
1464
|
e && (l.value = e.scrollLeft);
|
|
1322
1465
|
}
|
|
@@ -1328,31 +1471,32 @@ function fn(e) {
|
|
|
1328
1471
|
isRangeSelectActive: h,
|
|
1329
1472
|
rangeSelectionReady: g,
|
|
1330
1473
|
rangeSelectionBounds: _,
|
|
1474
|
+
rangeSelectionCount: b,
|
|
1331
1475
|
rangeSelectionStartLabel: v,
|
|
1332
1476
|
rangeSelectionEndLabel: y,
|
|
1333
|
-
rangeSelectionOverlayStyle:
|
|
1334
|
-
clearRangeSelection:
|
|
1335
|
-
handleRangePointerDown:
|
|
1336
|
-
handleRangePointerMove:
|
|
1337
|
-
handleRangePointerUp:
|
|
1338
|
-
exportRangeToCsv:
|
|
1477
|
+
rangeSelectionOverlayStyle: x,
|
|
1478
|
+
clearRangeSelection: S,
|
|
1479
|
+
handleRangePointerDown: w,
|
|
1480
|
+
handleRangePointerMove: E,
|
|
1481
|
+
handleRangePointerUp: D,
|
|
1482
|
+
exportRangeToCsv: N,
|
|
1339
1483
|
exportingProgress: p,
|
|
1340
|
-
onEdgePointerDown:
|
|
1341
|
-
onEdgePointerMove:
|
|
1342
|
-
onEdgePointerUp:
|
|
1343
|
-
onScroll:
|
|
1344
|
-
syncScrollLeft:
|
|
1484
|
+
onEdgePointerDown: O,
|
|
1485
|
+
onEdgePointerMove: k,
|
|
1486
|
+
onEdgePointerUp: A,
|
|
1487
|
+
onScroll: F,
|
|
1488
|
+
syncScrollLeft: I
|
|
1345
1489
|
};
|
|
1346
1490
|
}
|
|
1347
1491
|
//#endregion
|
|
1348
1492
|
//#region ~icons/tabler/pointer
|
|
1349
|
-
var
|
|
1493
|
+
var xn = {
|
|
1350
1494
|
viewBox: "0 0 24 24",
|
|
1351
1495
|
width: "1.2em",
|
|
1352
1496
|
height: "1.2em"
|
|
1353
1497
|
};
|
|
1354
|
-
function
|
|
1355
|
-
return C(), o("svg",
|
|
1498
|
+
function Sn(e, t) {
|
|
1499
|
+
return C(), o("svg", xn, [...t[0] ||= [s("path", {
|
|
1356
1500
|
fill: "none",
|
|
1357
1501
|
stroke: "currentColor",
|
|
1358
1502
|
"stroke-linecap": "round",
|
|
@@ -1361,16 +1505,16 @@ function mn(e, t) {
|
|
|
1361
1505
|
d: "M7.904 17.563a1.2 1.2 0 0 0 2.228.308l2.09-3.093l4.907 4.907a1.067 1.067 0 0 0 1.509 0l1.047-1.047a1.067 1.067 0 0 0 0-1.509l-4.907-4.907l3.113-2.09a1.2 1.2 0 0 0-.309-2.228L4 4z"
|
|
1362
1506
|
}, null, -1)]]);
|
|
1363
1507
|
}
|
|
1364
|
-
var
|
|
1508
|
+
var Cn = h({
|
|
1365
1509
|
name: "tabler-pointer",
|
|
1366
|
-
render:
|
|
1367
|
-
}),
|
|
1510
|
+
render: Sn
|
|
1511
|
+
}), wn = {
|
|
1368
1512
|
viewBox: "0 0 24 24",
|
|
1369
1513
|
width: "1.2em",
|
|
1370
1514
|
height: "1.2em"
|
|
1371
1515
|
};
|
|
1372
|
-
function
|
|
1373
|
-
return C(), o("svg",
|
|
1516
|
+
function Tn(e, t) {
|
|
1517
|
+
return C(), o("svg", wn, [...t[0] ||= [s("path", {
|
|
1374
1518
|
fill: "none",
|
|
1375
1519
|
stroke: "currentColor",
|
|
1376
1520
|
"stroke-linecap": "round",
|
|
@@ -1379,16 +1523,16 @@ function _n(e, t) {
|
|
|
1379
1523
|
d: "M4 19h16M4 15l4-6l4 2l4-5l4 4"
|
|
1380
1524
|
}, null, -1)]]);
|
|
1381
1525
|
}
|
|
1382
|
-
var
|
|
1526
|
+
var En = h({
|
|
1383
1527
|
name: "tabler-chart-line",
|
|
1384
|
-
render:
|
|
1385
|
-
}),
|
|
1528
|
+
render: Tn
|
|
1529
|
+
}), Dn = {
|
|
1386
1530
|
viewBox: "0 0 24 24",
|
|
1387
1531
|
width: "1.2em",
|
|
1388
1532
|
height: "1.2em"
|
|
1389
1533
|
};
|
|
1390
|
-
function
|
|
1391
|
-
return C(), o("svg",
|
|
1534
|
+
function On(e, t) {
|
|
1535
|
+
return C(), o("svg", Dn, [...t[0] ||= [s("path", {
|
|
1392
1536
|
fill: "none",
|
|
1393
1537
|
stroke: "currentColor",
|
|
1394
1538
|
"stroke-linecap": "round",
|
|
@@ -1397,16 +1541,16 @@ function bn(e, t) {
|
|
|
1397
1541
|
d: "M17 7L7 17M8 7h9v9"
|
|
1398
1542
|
}, null, -1)]]);
|
|
1399
1543
|
}
|
|
1400
|
-
var
|
|
1544
|
+
var kn = h({
|
|
1401
1545
|
name: "tabler-arrow-up-right",
|
|
1402
|
-
render:
|
|
1403
|
-
}),
|
|
1546
|
+
render: On
|
|
1547
|
+
}), An = {
|
|
1404
1548
|
viewBox: "0 0 24 24",
|
|
1405
1549
|
width: "1.2em",
|
|
1406
1550
|
height: "1.2em"
|
|
1407
1551
|
};
|
|
1408
|
-
function
|
|
1409
|
-
return C(), o("svg",
|
|
1552
|
+
function jn(e, t) {
|
|
1553
|
+
return C(), o("svg", An, [...t[0] ||= [s("path", {
|
|
1410
1554
|
fill: "none",
|
|
1411
1555
|
stroke: "currentColor",
|
|
1412
1556
|
"stroke-linecap": "round",
|
|
@@ -1415,16 +1559,16 @@ function Cn(e, t) {
|
|
|
1415
1559
|
d: "M5 12h14m-6 6l6-6m-6-6l6 6"
|
|
1416
1560
|
}, null, -1)]]);
|
|
1417
1561
|
}
|
|
1418
|
-
var
|
|
1562
|
+
var Mn = h({
|
|
1419
1563
|
name: "tabler-arrow-right",
|
|
1420
|
-
render:
|
|
1421
|
-
}),
|
|
1564
|
+
render: jn
|
|
1565
|
+
}), Nn = {
|
|
1422
1566
|
viewBox: "0 0 24 24",
|
|
1423
1567
|
width: "1.2em",
|
|
1424
1568
|
height: "1.2em"
|
|
1425
1569
|
};
|
|
1426
|
-
function
|
|
1427
|
-
return C(), o("svg",
|
|
1570
|
+
function Pn(e, t) {
|
|
1571
|
+
return C(), o("svg", Nn, [...t[0] ||= [s("path", {
|
|
1428
1572
|
fill: "none",
|
|
1429
1573
|
stroke: "currentColor",
|
|
1430
1574
|
"stroke-linecap": "round",
|
|
@@ -1433,16 +1577,16 @@ function En(e, t) {
|
|
|
1433
1577
|
d: "M5 12h14"
|
|
1434
1578
|
}, null, -1)]]);
|
|
1435
1579
|
}
|
|
1436
|
-
var
|
|
1580
|
+
var Fn = h({
|
|
1437
1581
|
name: "tabler-minus",
|
|
1438
|
-
render:
|
|
1439
|
-
}),
|
|
1582
|
+
render: Pn
|
|
1583
|
+
}), In = {
|
|
1440
1584
|
viewBox: "0 0 24 24",
|
|
1441
1585
|
width: "1.2em",
|
|
1442
1586
|
height: "1.2em"
|
|
1443
1587
|
};
|
|
1444
|
-
function
|
|
1445
|
-
return C(), o("svg",
|
|
1588
|
+
function Ln(e, t) {
|
|
1589
|
+
return C(), o("svg", In, [...t[0] ||= [s("path", {
|
|
1446
1590
|
fill: "none",
|
|
1447
1591
|
stroke: "currentColor",
|
|
1448
1592
|
"stroke-linecap": "round",
|
|
@@ -1451,16 +1595,16 @@ function kn(e, t) {
|
|
|
1451
1595
|
d: "M3 12v.01M7 12h10m4 0v.01"
|
|
1452
1596
|
}, null, -1)]]);
|
|
1453
1597
|
}
|
|
1454
|
-
var
|
|
1598
|
+
var Rn = h({
|
|
1455
1599
|
name: "tabler-separator",
|
|
1456
|
-
render:
|
|
1457
|
-
}),
|
|
1600
|
+
render: Ln
|
|
1601
|
+
}), zn = {
|
|
1458
1602
|
viewBox: "0 0 24 24",
|
|
1459
1603
|
width: "1.2em",
|
|
1460
1604
|
height: "1.2em"
|
|
1461
1605
|
};
|
|
1462
|
-
function
|
|
1463
|
-
return C(), o("svg",
|
|
1606
|
+
function Bn(e, t) {
|
|
1607
|
+
return C(), o("svg", zn, [...t[0] ||= [s("path", {
|
|
1464
1608
|
fill: "none",
|
|
1465
1609
|
stroke: "currentColor",
|
|
1466
1610
|
"stroke-linecap": "round",
|
|
@@ -1469,16 +1613,16 @@ function Mn(e, t) {
|
|
|
1469
1613
|
d: "M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2m8-16h2a2 2 0 0 1 2 2v2m-4 12h2a2 2 0 0 0 2-2v-2M9 12h6m-3-3v6"
|
|
1470
1614
|
}, null, -1)]]);
|
|
1471
1615
|
}
|
|
1472
|
-
var
|
|
1616
|
+
var Vn = h({
|
|
1473
1617
|
name: "tabler-crosshair",
|
|
1474
|
-
render:
|
|
1475
|
-
}),
|
|
1618
|
+
render: Bn
|
|
1619
|
+
}), Hn = {
|
|
1476
1620
|
viewBox: "0 0 24 24",
|
|
1477
1621
|
width: "1.2em",
|
|
1478
1622
|
height: "1.2em"
|
|
1479
1623
|
};
|
|
1480
|
-
function
|
|
1481
|
-
return C(), o("svg",
|
|
1624
|
+
function Un(e, t) {
|
|
1625
|
+
return C(), o("svg", Hn, [...t[0] ||= [s("g", {
|
|
1482
1626
|
fill: "none",
|
|
1483
1627
|
stroke: "currentColor",
|
|
1484
1628
|
"stroke-linecap": "round",
|
|
@@ -1486,16 +1630,16 @@ function Fn(e, t) {
|
|
|
1486
1630
|
"stroke-width": "2"
|
|
1487
1631
|
}, [s("path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m9-3h.01" }), s("path", { d: "M11 12h1v4h1" })], -1)]]);
|
|
1488
1632
|
}
|
|
1489
|
-
var
|
|
1633
|
+
var Wn = h({
|
|
1490
1634
|
name: "tabler-info-circle",
|
|
1491
|
-
render:
|
|
1492
|
-
}),
|
|
1635
|
+
render: Un
|
|
1636
|
+
}), Gn = {
|
|
1493
1637
|
viewBox: "0 0 24 24",
|
|
1494
1638
|
width: "1.2em",
|
|
1495
1639
|
height: "1.2em"
|
|
1496
1640
|
};
|
|
1497
|
-
function
|
|
1498
|
-
return C(), o("svg",
|
|
1641
|
+
function Kn(e, t) {
|
|
1642
|
+
return C(), o("svg", Gn, [...t[0] ||= [s("path", {
|
|
1499
1643
|
fill: "none",
|
|
1500
1644
|
stroke: "currentColor",
|
|
1501
1645
|
"stroke-linecap": "round",
|
|
@@ -1504,16 +1648,16 @@ function Rn(e, t) {
|
|
|
1504
1648
|
d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m-3-3v6m11 8l-6-6"
|
|
1505
1649
|
}, null, -1)]]);
|
|
1506
1650
|
}
|
|
1507
|
-
var
|
|
1651
|
+
var qn = h({
|
|
1508
1652
|
name: "tabler-zoom-in",
|
|
1509
|
-
render:
|
|
1510
|
-
}),
|
|
1653
|
+
render: Kn
|
|
1654
|
+
}), Jn = {
|
|
1511
1655
|
viewBox: "0 0 24 24",
|
|
1512
1656
|
width: "1.2em",
|
|
1513
1657
|
height: "1.2em"
|
|
1514
1658
|
};
|
|
1515
|
-
function
|
|
1516
|
-
return C(), o("svg",
|
|
1659
|
+
function Yn(e, t) {
|
|
1660
|
+
return C(), o("svg", Jn, [...t[0] ||= [s("path", {
|
|
1517
1661
|
fill: "none",
|
|
1518
1662
|
stroke: "currentColor",
|
|
1519
1663
|
"stroke-linecap": "round",
|
|
@@ -1522,16 +1666,16 @@ function Vn(e, t) {
|
|
|
1522
1666
|
d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m8 11l-6-6"
|
|
1523
1667
|
}, null, -1)]]);
|
|
1524
1668
|
}
|
|
1525
|
-
var
|
|
1669
|
+
var Xn = h({
|
|
1526
1670
|
name: "tabler-zoom-out",
|
|
1527
|
-
render:
|
|
1528
|
-
}),
|
|
1671
|
+
render: Yn
|
|
1672
|
+
}), Zn = {
|
|
1529
1673
|
viewBox: "0 0 24 24",
|
|
1530
1674
|
width: "1.2em",
|
|
1531
1675
|
height: "1.2em"
|
|
1532
1676
|
};
|
|
1533
|
-
function
|
|
1534
|
-
return C(), o("svg",
|
|
1677
|
+
function Qn(e, t) {
|
|
1678
|
+
return C(), o("svg", Zn, [...t[0] ||= [s("path", {
|
|
1535
1679
|
fill: "none",
|
|
1536
1680
|
stroke: "currentColor",
|
|
1537
1681
|
"stroke-linecap": "round",
|
|
@@ -1540,16 +1684,16 @@ function Wn(e, t) {
|
|
|
1540
1684
|
d: "M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2m8-16h2a2 2 0 0 1 2 2v2m-4 12h2a2 2 0 0 0 2-2v-2"
|
|
1541
1685
|
}, null, -1)]]);
|
|
1542
1686
|
}
|
|
1543
|
-
var
|
|
1687
|
+
var $n = h({
|
|
1544
1688
|
name: "tabler-maximize",
|
|
1545
|
-
render:
|
|
1546
|
-
}),
|
|
1689
|
+
render: Qn
|
|
1690
|
+
}), er = {
|
|
1547
1691
|
viewBox: "0 0 24 24",
|
|
1548
1692
|
width: "1.2em",
|
|
1549
1693
|
height: "1.2em"
|
|
1550
1694
|
};
|
|
1551
|
-
function
|
|
1552
|
-
return C(), o("svg",
|
|
1695
|
+
function tr(e, t) {
|
|
1696
|
+
return C(), o("svg", er, [...t[0] ||= [s("path", {
|
|
1553
1697
|
fill: "none",
|
|
1554
1698
|
stroke: "currentColor",
|
|
1555
1699
|
"stroke-linecap": "round",
|
|
@@ -1558,16 +1702,16 @@ function qn(e, t) {
|
|
|
1558
1702
|
d: "M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"
|
|
1559
1703
|
}, null, -1)]]);
|
|
1560
1704
|
}
|
|
1561
|
-
var
|
|
1705
|
+
var nr = h({
|
|
1562
1706
|
name: "tabler-minimize",
|
|
1563
|
-
render:
|
|
1564
|
-
}),
|
|
1707
|
+
render: tr
|
|
1708
|
+
}), rr = {
|
|
1565
1709
|
viewBox: "0 0 24 24",
|
|
1566
1710
|
width: "1.2em",
|
|
1567
1711
|
height: "1.2em"
|
|
1568
1712
|
};
|
|
1569
|
-
function
|
|
1570
|
-
return C(), o("svg",
|
|
1713
|
+
function ir(e, t) {
|
|
1714
|
+
return C(), o("svg", rr, [...t[0] ||= [s("g", {
|
|
1571
1715
|
fill: "none",
|
|
1572
1716
|
stroke: "currentColor",
|
|
1573
1717
|
"stroke-linecap": "round",
|
|
@@ -1575,16 +1719,16 @@ function Xn(e, t) {
|
|
|
1575
1719
|
"stroke-width": "2"
|
|
1576
1720
|
}, [s("path", { d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 0 0-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 0 0-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 0 0-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 0 0-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 0 0 1.066-2.573c-.94-1.543.826-3.31 2.37-2.37c1 .608 2.296.07 2.572-1.065" }), s("path", { d: "M9 12a3 3 0 1 0 6 0a3 3 0 0 0-6 0" })], -1)]]);
|
|
1577
1721
|
}
|
|
1578
|
-
var
|
|
1722
|
+
var ar = h({
|
|
1579
1723
|
name: "tabler-settings",
|
|
1580
|
-
render:
|
|
1581
|
-
}),
|
|
1724
|
+
render: ir
|
|
1725
|
+
}), or = {
|
|
1582
1726
|
viewBox: "0 0 24 24",
|
|
1583
1727
|
width: "1.2em",
|
|
1584
1728
|
height: "1.2em"
|
|
1585
1729
|
};
|
|
1586
|
-
function
|
|
1587
|
-
return C(), o("svg",
|
|
1730
|
+
function sr(e, t) {
|
|
1731
|
+
return C(), o("svg", or, [...t[0] ||= [s("path", {
|
|
1588
1732
|
fill: "none",
|
|
1589
1733
|
stroke: "currentColor",
|
|
1590
1734
|
"stroke-linecap": "round",
|
|
@@ -1593,16 +1737,16 @@ function $n(e, t) {
|
|
|
1593
1737
|
d: "M3 5a2 2 0 1 0 4 0a2 2 0 1 0-4 0m14 0a2 2 0 1 0 4 0a2 2 0 1 0-4 0M3 19a2 2 0 1 0 4 0a2 2 0 1 0-4 0m14 0a2 2 0 1 0 4 0a2 2 0 1 0-4 0M5 7v10M7 5h10M7 19h10m2-12v10"
|
|
1594
1738
|
}, null, -1)]]);
|
|
1595
1739
|
}
|
|
1596
|
-
var
|
|
1740
|
+
var cr = h({
|
|
1597
1741
|
name: "tabler-shape",
|
|
1598
|
-
render:
|
|
1599
|
-
}),
|
|
1742
|
+
render: sr
|
|
1743
|
+
}), lr = {
|
|
1600
1744
|
viewBox: "0 0 24 24",
|
|
1601
1745
|
width: "1.2em",
|
|
1602
1746
|
height: "1.2em"
|
|
1603
1747
|
};
|
|
1604
|
-
function
|
|
1605
|
-
return C(), o("svg",
|
|
1748
|
+
function ur(e, t) {
|
|
1749
|
+
return C(), o("svg", lr, [...t[0] ||= [s("path", {
|
|
1606
1750
|
fill: "none",
|
|
1607
1751
|
stroke: "currentColor",
|
|
1608
1752
|
"stroke-linecap": "round",
|
|
@@ -1611,16 +1755,16 @@ function nr(e, t) {
|
|
|
1611
1755
|
d: "M3 7a2 2 0 1 0 4 0a2 2 0 1 0-4 0m11 8a2 2 0 1 0 4 0a2 2 0 1 0-4 0m1-9a3 3 0 1 0 6 0a3 3 0 1 0-6 0M3 18a3 3 0 1 0 6 0a3 3 0 1 0-6 0m6-1l5-1.5m-7.5-7l7.81 5.37M7 7l8-1"
|
|
1612
1756
|
}, null, -1)]]);
|
|
1613
1757
|
}
|
|
1614
|
-
var
|
|
1758
|
+
var dr = h({
|
|
1615
1759
|
name: "tabler-chart-dots-3",
|
|
1616
|
-
render:
|
|
1617
|
-
}),
|
|
1760
|
+
render: ur
|
|
1761
|
+
}), fr = {
|
|
1618
1762
|
viewBox: "0 0 24 24",
|
|
1619
1763
|
width: "1.2em",
|
|
1620
1764
|
height: "1.2em"
|
|
1621
1765
|
};
|
|
1622
|
-
function
|
|
1623
|
-
return C(), o("svg",
|
|
1766
|
+
function pr(e, t) {
|
|
1767
|
+
return C(), o("svg", fr, [...t[0] ||= [s("path", {
|
|
1624
1768
|
fill: "none",
|
|
1625
1769
|
stroke: "currentColor",
|
|
1626
1770
|
"stroke-linecap": "round",
|
|
@@ -1629,16 +1773,16 @@ function ar(e, t) {
|
|
|
1629
1773
|
d: "m18 10l-6-6l-6 6zm0 4l-6 6l-6-6z"
|
|
1630
1774
|
}, null, -1)]]);
|
|
1631
1775
|
}
|
|
1632
|
-
var
|
|
1776
|
+
var mr = h({
|
|
1633
1777
|
name: "tabler-caret-up-down",
|
|
1634
|
-
render:
|
|
1635
|
-
}),
|
|
1778
|
+
render: pr
|
|
1779
|
+
}), hr = {
|
|
1636
1780
|
viewBox: "0 0 24 24",
|
|
1637
1781
|
width: "1.2em",
|
|
1638
1782
|
height: "1.2em"
|
|
1639
1783
|
};
|
|
1640
|
-
function
|
|
1641
|
-
return C(), o("svg",
|
|
1784
|
+
function gr(e, t) {
|
|
1785
|
+
return C(), o("svg", hr, [...t[0] ||= [s("path", {
|
|
1642
1786
|
fill: "none",
|
|
1643
1787
|
stroke: "currentColor",
|
|
1644
1788
|
"stroke-linecap": "round",
|
|
@@ -1647,16 +1791,16 @@ function cr(e, t) {
|
|
|
1647
1791
|
d: "M8 4H5v16h3m8-16h3v16h-3"
|
|
1648
1792
|
}, null, -1)]]);
|
|
1649
1793
|
}
|
|
1650
|
-
var
|
|
1794
|
+
var _r = h({
|
|
1651
1795
|
name: "tabler-brackets",
|
|
1652
|
-
render:
|
|
1653
|
-
}),
|
|
1796
|
+
render: gr
|
|
1797
|
+
}), vr = {
|
|
1654
1798
|
viewBox: "0 0 24 24",
|
|
1655
1799
|
width: "1.2em",
|
|
1656
1800
|
height: "1.2em"
|
|
1657
1801
|
};
|
|
1658
|
-
function
|
|
1659
|
-
return C(), o("svg",
|
|
1802
|
+
function yr(e, t) {
|
|
1803
|
+
return C(), o("svg", vr, [...t[0] ||= [s("path", {
|
|
1660
1804
|
fill: "none",
|
|
1661
1805
|
stroke: "currentColor",
|
|
1662
1806
|
"stroke-linecap": "round",
|
|
@@ -1665,34 +1809,34 @@ function dr(e, t) {
|
|
|
1665
1809
|
d: "m7 8l-4 4l4 4m10-8l4 4l-4 4M3 12h18"
|
|
1666
1810
|
}, null, -1)]]);
|
|
1667
1811
|
}
|
|
1668
|
-
var
|
|
1812
|
+
var br = h({
|
|
1669
1813
|
name: "tabler-arrows-horizontal",
|
|
1670
|
-
render:
|
|
1814
|
+
render: yr
|
|
1671
1815
|
});
|
|
1672
1816
|
//#endregion
|
|
1673
1817
|
//#region src/debug/canvasProfiler.ts
|
|
1674
|
-
function
|
|
1818
|
+
function xr() {
|
|
1675
1819
|
return Object.create(null);
|
|
1676
1820
|
}
|
|
1677
|
-
function
|
|
1821
|
+
function Sr() {
|
|
1678
1822
|
return {
|
|
1679
|
-
ctxMethods:
|
|
1680
|
-
ctxProps:
|
|
1681
|
-
canvasProps:
|
|
1823
|
+
ctxMethods: xr(),
|
|
1824
|
+
ctxProps: xr(),
|
|
1825
|
+
canvasProps: xr(),
|
|
1682
1826
|
ctxMethodSources: Object.create(null)
|
|
1683
1827
|
};
|
|
1684
1828
|
}
|
|
1685
|
-
function
|
|
1829
|
+
function Cr(e, t, n) {
|
|
1686
1830
|
let r = e[t] ??= {
|
|
1687
1831
|
count: 0,
|
|
1688
1832
|
totalTime: 0
|
|
1689
1833
|
};
|
|
1690
1834
|
r.count += 1, r.totalTime += n;
|
|
1691
1835
|
}
|
|
1692
|
-
function
|
|
1693
|
-
|
|
1836
|
+
function wr(e, t, n, r) {
|
|
1837
|
+
Cr(e.ctxMethodSources[t] ??= xr(), n, r);
|
|
1694
1838
|
}
|
|
1695
|
-
function
|
|
1839
|
+
function Tr(e) {
|
|
1696
1840
|
return Object.entries(e).filter(([, e]) => e.count > 0).map(([e, t]) => ({
|
|
1697
1841
|
name: e,
|
|
1698
1842
|
count: t.count,
|
|
@@ -1700,12 +1844,12 @@ function _r(e) {
|
|
|
1700
1844
|
averageTime: (t.totalTime / t.count).toFixed(4)
|
|
1701
1845
|
})).sort((e, t) => Number(t.totalTime) - Number(e.totalTime));
|
|
1702
1846
|
}
|
|
1703
|
-
var
|
|
1704
|
-
function
|
|
1705
|
-
|
|
1847
|
+
var Er = !1, Dr = /* @__PURE__ */ new Map(), Or = /* @__PURE__ */ new Map();
|
|
1848
|
+
function kr(e) {
|
|
1849
|
+
Er = e, e ? typeof window < "u" && !window.__KMAP_CANVAS_PROFILER_INSTALLED__ && Mr() : Nr();
|
|
1706
1850
|
}
|
|
1707
|
-
function
|
|
1708
|
-
if (!
|
|
1851
|
+
function Ar() {
|
|
1852
|
+
if (!Er) return "disabled";
|
|
1709
1853
|
let e = (/* @__PURE__ */ Error()).stack;
|
|
1710
1854
|
if (!e) return "unknown";
|
|
1711
1855
|
let t = e.split("\n").map((e) => e.trim()).filter(Boolean);
|
|
@@ -1720,82 +1864,91 @@ function Sr() {
|
|
|
1720
1864
|
}
|
|
1721
1865
|
function Q(e, t, n, r) {
|
|
1722
1866
|
let i = `${e.constructor?.name ?? "proto"}:${t}`;
|
|
1723
|
-
if (
|
|
1867
|
+
if (Dr.has(i)) return;
|
|
1724
1868
|
let a = Reflect.get(e, t);
|
|
1725
|
-
typeof a == "function" && (
|
|
1726
|
-
if (!
|
|
1727
|
-
let i = r?.captureSource ?
|
|
1728
|
-
return
|
|
1869
|
+
typeof a == "function" && (Dr.set(i, a), Reflect.set(e, t, function(...e) {
|
|
1870
|
+
if (!Er) return a.apply(this, e);
|
|
1871
|
+
let i = r?.captureSource ? Ar() : null, o = performance.now(), s = a.apply(this, e), c = performance.now() - o;
|
|
1872
|
+
return Cr(n.ctxMethods, t, c), i && wr(n, t, i, c), s;
|
|
1729
1873
|
}));
|
|
1730
1874
|
}
|
|
1731
|
-
function
|
|
1875
|
+
function jr(e, t, n) {
|
|
1732
1876
|
let r = Object.getOwnPropertyDescriptor(e, t);
|
|
1733
1877
|
if (!r?.set || !r.configurable) return;
|
|
1734
1878
|
let i = `${e.constructor?.name ?? "proto"}:${t}`;
|
|
1735
|
-
|
|
1879
|
+
Or.has(i) || (Or.set(i, r), Object.defineProperty(e, t, {
|
|
1736
1880
|
configurable: !0,
|
|
1737
1881
|
enumerable: r.enumerable ?? !1,
|
|
1738
1882
|
get: r.get,
|
|
1739
1883
|
set(e) {
|
|
1740
|
-
if (!
|
|
1884
|
+
if (!Er) {
|
|
1741
1885
|
r.set.call(this, e);
|
|
1742
1886
|
return;
|
|
1743
1887
|
}
|
|
1744
1888
|
let i = performance.now();
|
|
1745
|
-
r.set.call(this, e),
|
|
1889
|
+
r.set.call(this, e), Cr(n, t, performance.now() - i);
|
|
1746
1890
|
}
|
|
1747
1891
|
}));
|
|
1748
1892
|
}
|
|
1749
|
-
function
|
|
1893
|
+
function Mr() {
|
|
1750
1894
|
if (typeof window > "u" || window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
|
|
1751
1895
|
let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
|
|
1752
1896
|
if (!e || !t) return;
|
|
1753
|
-
let n =
|
|
1754
|
-
Q(e, "fillText", n, { captureSource: !0 }), Q(e, "measureText", n, { captureSource: !0 }), Q(e, "drawImage", n), Q(e, "save", n), Q(e, "restore", n), Q(e, "clip", n), Q(e, "setTransform", n), Q(e, "scale", n),
|
|
1897
|
+
let n = Sr();
|
|
1898
|
+
Q(e, "fillText", n, { captureSource: !0 }), Q(e, "measureText", n, { captureSource: !0 }), Q(e, "drawImage", n), Q(e, "save", n), Q(e, "restore", n), Q(e, "clip", n), Q(e, "setTransform", n), Q(e, "scale", n), jr(e, "font", n.ctxProps), jr(e, "filter", n.ctxProps), jr(e, "shadowBlur", n.ctxProps), jr(e, "lineWidth", n.ctxProps), jr(t, "width", n.canvasProps), jr(t, "height", n.canvasProps), window.__KMAP_CANVAS_PROFILER_METRICS__ = n, window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !0, window.showCanvasReport = () => {
|
|
1755
1899
|
let e = window.__KMAP_CANVAS_PROFILER_METRICS__;
|
|
1756
1900
|
if (e) {
|
|
1757
|
-
console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(
|
|
1901
|
+
console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(Tr(e.ctxMethods)), console.log("ctx props"), console.table(Tr(e.ctxProps)), console.log("canvas props"), console.table(Tr(e.canvasProps));
|
|
1758
1902
|
for (let t of ["fillText", "measureText"]) {
|
|
1759
1903
|
let n = e.ctxMethodSources[t];
|
|
1760
|
-
n && (console.log(`${t} sources`), console.table(
|
|
1904
|
+
n && (console.log(`${t} sources`), console.table(Tr(n).slice(0, 20)));
|
|
1761
1905
|
}
|
|
1762
1906
|
console.groupEnd();
|
|
1763
1907
|
}
|
|
1764
1908
|
}, window.resetCanvasReport = () => {
|
|
1765
|
-
window.__KMAP_CANVAS_PROFILER_METRICS__ =
|
|
1909
|
+
window.__KMAP_CANVAS_PROFILER_METRICS__ = Sr();
|
|
1766
1910
|
}, console.info("[kmap] Canvas profiler enabled. Use window.showCanvasReport() and window.resetCanvasReport().");
|
|
1767
1911
|
}
|
|
1768
|
-
function
|
|
1912
|
+
function Nr() {
|
|
1769
1913
|
if (typeof window > "u" || !window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
|
|
1770
1914
|
let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
|
|
1771
|
-
|
|
1915
|
+
Dr.forEach((n, r) => {
|
|
1772
1916
|
let i = r.match(/^(.+):(.+)$/);
|
|
1773
1917
|
if (!i) return;
|
|
1774
1918
|
let [, a, o] = i, s = null;
|
|
1775
1919
|
a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && Reflect.set(s, o, n);
|
|
1776
|
-
}),
|
|
1920
|
+
}), Dr.clear(), Or.forEach((n, r) => {
|
|
1777
1921
|
let i = r.match(/^(.+):(.+)$/);
|
|
1778
1922
|
if (!i) return;
|
|
1779
1923
|
let [, a, o] = i, s = null;
|
|
1780
1924
|
a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && n.configurable && Object.defineProperty(s, o, n);
|
|
1781
|
-
}),
|
|
1925
|
+
}), Or.clear(), window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !1, window.__KMAP_CANVAS_PROFILER_METRICS__ = void 0, window.showCanvasReport = void 0, window.resetCanvasReport = void 0, console.info("[kmap] Canvas profiler disabled.");
|
|
1782
1926
|
}
|
|
1783
1927
|
//#endregion
|
|
1784
1928
|
//#region src/components/ChartSettingsDialog.vue?vue&type=script&setup=true&lang.ts
|
|
1785
|
-
var
|
|
1929
|
+
var Pr = { class: "settings-body" }, Fr = {
|
|
1930
|
+
key: 0,
|
|
1931
|
+
class: "md-switch"
|
|
1932
|
+
}, Ir = ["onUpdate:modelValue"], Lr = {
|
|
1933
|
+
key: 0,
|
|
1934
|
+
class: "md-switch"
|
|
1935
|
+
}, Rr = ["onUpdate:modelValue"], zr = {
|
|
1936
|
+
key: 0,
|
|
1937
|
+
class: "md-switch"
|
|
1938
|
+
}, Br = ["onUpdate:modelValue"], Vr = /*#__PURE__*/ q(/* @__PURE__ */ u({
|
|
1786
1939
|
__name: "ChartSettingsDialog",
|
|
1787
1940
|
props: { show: { type: Boolean } },
|
|
1788
1941
|
emits: ["close", "confirm"],
|
|
1789
|
-
setup(
|
|
1790
|
-
let
|
|
1791
|
-
function
|
|
1942
|
+
setup(t, { emit: n }) {
|
|
1943
|
+
let u = t, d = n, f = r(() => W.filter((e) => e.group === "main")), p = r(() => W.filter((e) => e.group === "experimental")), m = r(() => W.filter((e) => e.group === "style")), h = T(!1), g = T(null);
|
|
1944
|
+
function _() {
|
|
1792
1945
|
try {
|
|
1793
|
-
let e = localStorage.getItem(
|
|
1946
|
+
let e = localStorage.getItem(ge);
|
|
1794
1947
|
if (e) {
|
|
1795
1948
|
let t = JSON.parse(e), n = {};
|
|
1796
1949
|
return W.forEach((e) => {
|
|
1797
1950
|
n[e.key] = t[e.key] ?? e.default;
|
|
1798
|
-
}), n.colorPresetSettings =
|
|
1951
|
+
}), n.colorPresetSettings = ie(t.colorPresetSettings), n;
|
|
1799
1952
|
}
|
|
1800
1953
|
} catch {}
|
|
1801
1954
|
let e = {};
|
|
@@ -1803,181 +1956,163 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
|
|
|
1803
1956
|
e[t.key] = t.default;
|
|
1804
1957
|
}), e.colorPresetSettings = {}, e;
|
|
1805
1958
|
}
|
|
1806
|
-
let
|
|
1807
|
-
|
|
1808
|
-
e && (
|
|
1959
|
+
let v = T(_());
|
|
1960
|
+
P(() => u.show, (e) => {
|
|
1961
|
+
e && (v.value = _());
|
|
1809
1962
|
});
|
|
1810
|
-
function
|
|
1811
|
-
|
|
1963
|
+
function y() {
|
|
1964
|
+
d("close");
|
|
1812
1965
|
}
|
|
1813
|
-
function
|
|
1966
|
+
function b() {
|
|
1814
1967
|
let e = {};
|
|
1815
1968
|
W.forEach((t) => {
|
|
1816
1969
|
e[t.key] = t.default;
|
|
1817
|
-
}), e.colorPresetSettings = {},
|
|
1818
|
-
}
|
|
1819
|
-
function w() {
|
|
1820
|
-
p("confirm", { ...b.value });
|
|
1970
|
+
}), e.colorPresetSettings = {}, v.value = e;
|
|
1821
1971
|
}
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1972
|
+
function x() {
|
|
1973
|
+
d("confirm", { ...v.value });
|
|
1974
|
+
}
|
|
1975
|
+
return (n, r) => (C(), o(e, null, [l(Y, {
|
|
1976
|
+
show: t.show,
|
|
1977
|
+
width: "min(92vw, 460px)",
|
|
1978
|
+
"max-height": "min(720px, calc(100vh - 48px))",
|
|
1979
|
+
"footer-align": "space-between",
|
|
1980
|
+
onClose: y
|
|
1981
|
+
}, {
|
|
1982
|
+
header: F(() => [...r[5] ||= [s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "图表设置"), s("span", { class: "settings-subtitle" }, "个性化配置")], -1)]]),
|
|
1983
|
+
footer: F(() => [s("button", {
|
|
1984
|
+
class: "settings-btn reset",
|
|
1985
|
+
onClick: b
|
|
1986
|
+
}, [...r[13] ||= [s("svg", {
|
|
1987
|
+
viewBox: "0 0 24 24",
|
|
1988
|
+
fill: "none",
|
|
1989
|
+
stroke: "currentColor",
|
|
1990
|
+
"stroke-width": "2"
|
|
1991
|
+
}, [s("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), s("path", { d: "M3 3v5h5" })], -1), c(" 重置 ", -1)]]), s("div", { class: "footer-right" }, [s("button", {
|
|
1992
|
+
class: "settings-btn cancel",
|
|
1993
|
+
onClick: y
|
|
1994
|
+
}, "取消"), s("button", {
|
|
1995
|
+
class: "settings-btn confirm",
|
|
1826
1996
|
onClick: x
|
|
1827
|
-
}, [
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
size: "sm",
|
|
1876
|
-
"min-width": "100px",
|
|
1877
|
-
"onUpdate:modelValue": (t) => b.value[e.key] = t
|
|
1878
|
-
}, null, 8, [
|
|
1879
|
-
"model-value",
|
|
1880
|
-
"options",
|
|
1881
|
-
"onUpdate:modelValue"
|
|
1882
|
-
])) : a("", !0)])]))), 128)),
|
|
1883
|
-
s("div", {
|
|
1884
|
-
class: "settings-item nav-item",
|
|
1885
|
-
onClick: d[0] ||= (e) => v.value = !0
|
|
1886
|
-
}, [...d[9] ||= [s("label", { class: "settings-label" }, [s("span", null, "颜色配置"), s("svg", {
|
|
1887
|
-
viewBox: "0 0 24 24",
|
|
1888
|
-
fill: "none",
|
|
1889
|
-
stroke: "currentColor",
|
|
1890
|
-
"stroke-width": "2",
|
|
1891
|
-
width: "16",
|
|
1892
|
-
height: "16",
|
|
1893
|
-
class: "nav-arrow"
|
|
1894
|
-
}, [s("path", { d: "M9 18l6-6-6-6" })])], -1)]]),
|
|
1895
|
-
g.value.length > 0 ? (C(), o(e, { key: 1 }, [d[10] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "实验性 / 调试设置")], -1), (C(!0), o(e, null, E(g.value, (e) => (C(), o("div", {
|
|
1896
|
-
key: e.key,
|
|
1897
|
-
class: "settings-item experimental"
|
|
1898
|
-
}, [s("label", jr, [s("span", null, k(e.label), 1), e.type === "boolean" ? F((C(), o("input", {
|
|
1899
|
-
key: 0,
|
|
1900
|
-
type: "checkbox",
|
|
1901
|
-
class: "settings-checkbox",
|
|
1902
|
-
"onUpdate:modelValue": (t) => b.value[e.key] = t
|
|
1903
|
-
}, null, 8, Mr)), [[j, b.value[e.key]]]) : e.type === "select" && e.options ? (C(), i(Y, {
|
|
1904
|
-
key: 1,
|
|
1905
|
-
"model-value": String(b.value[e.key]),
|
|
1906
|
-
options: e.options,
|
|
1907
|
-
size: "sm",
|
|
1908
|
-
"min-width": "100px",
|
|
1909
|
-
"onUpdate:modelValue": (t) => b.value[e.key] = t
|
|
1910
|
-
}, null, 8, [
|
|
1911
|
-
"model-value",
|
|
1912
|
-
"options",
|
|
1913
|
-
"onUpdate:modelValue"
|
|
1914
|
-
])) : a("", !0)])]))), 128))], 64)) : a("", !0)
|
|
1915
|
-
]),
|
|
1916
|
-
s("div", { class: "settings-footer" }, [s("button", {
|
|
1917
|
-
class: "settings-btn reset",
|
|
1918
|
-
onClick: S
|
|
1919
|
-
}, [...d[12] ||= [s("svg", {
|
|
1920
|
-
viewBox: "0 0 24 24",
|
|
1921
|
-
fill: "none",
|
|
1922
|
-
stroke: "currentColor",
|
|
1923
|
-
"stroke-width": "2"
|
|
1924
|
-
}, [s("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), s("path", { d: "M3 3v5h5" })], -1), c(" 重置 ", -1)]]), s("div", { class: "footer-right" }, [s("button", {
|
|
1925
|
-
class: "settings-btn cancel",
|
|
1926
|
-
onClick: x
|
|
1927
|
-
}, "取消"), s("button", {
|
|
1928
|
-
class: "settings-btn confirm",
|
|
1929
|
-
onClick: w
|
|
1930
|
-
}, [...d[13] ||= [s("svg", {
|
|
1931
|
-
viewBox: "0 0 24 24",
|
|
1932
|
-
fill: "none",
|
|
1933
|
-
stroke: "currentColor",
|
|
1934
|
-
"stroke-width": "2.5"
|
|
1935
|
-
}, [s("path", { d: "M20 6L9 17l-5-5" })], -1), c(" 确定 ", -1)]])])])
|
|
1936
|
-
])]),
|
|
1937
|
-
_: 1
|
|
1938
|
-
})])) : a("", !0)]),
|
|
1939
|
-
_: 1
|
|
1940
|
-
}), l(n, { name: "overlay" }, {
|
|
1941
|
-
default: P(() => [v.value ? (C(), o("div", {
|
|
1942
|
-
key: 0,
|
|
1943
|
-
class: "settings-overlay nested-overlay",
|
|
1944
|
-
onClick: d[5] ||= (e) => v.value = !1
|
|
1945
|
-
}, [l(n, { name: "modal" }, {
|
|
1946
|
-
default: P(() => [s("div", {
|
|
1947
|
-
class: "settings-modal",
|
|
1948
|
-
onClick: d[4] ||= L(() => {}, ["stop"])
|
|
1949
|
-
}, [s("div", Nr, [d[15] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "颜色预设"), s("span", { class: "settings-subtitle" }, "自定义图表颜色")], -1), s("div", Pr, [s("button", {
|
|
1950
|
-
class: "settings-close",
|
|
1951
|
-
onClick: d[2] ||= (e) => v.value = !1
|
|
1952
|
-
}, [...d[14] ||= [s("svg", {
|
|
1997
|
+
}, [...r[14] ||= [s("svg", {
|
|
1998
|
+
viewBox: "0 0 24 24",
|
|
1999
|
+
fill: "none",
|
|
2000
|
+
stroke: "currentColor",
|
|
2001
|
+
"stroke-width": "2.5"
|
|
2002
|
+
}, [s("path", { d: "M20 6L9 17l-5-5" })], -1), c(" 确定 ", -1)]])])]),
|
|
2003
|
+
default: F(() => [s("div", Pr, [
|
|
2004
|
+
f.value.length > 0 ? (C(), o(e, { key: 0 }, [r[7] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "主图设置")], -1), (C(!0), o(e, null, E(f.value, (e) => (C(), o("div", {
|
|
2005
|
+
key: e.key,
|
|
2006
|
+
class: "settings-item"
|
|
2007
|
+
}, [s("span", null, A(e.label), 1), e.type === "boolean" ? (C(), o("label", Fr, [I(s("input", {
|
|
2008
|
+
type: "checkbox",
|
|
2009
|
+
"onUpdate:modelValue": (t) => v.value[e.key] = t
|
|
2010
|
+
}, null, 8, Ir), [[M, v.value[e.key]]]), r[6] ||= s("span", { class: "md-switch-slider" }, null, -1)])) : e.type === "select" && e.options ? (C(), i(J, {
|
|
2011
|
+
key: 1,
|
|
2012
|
+
"model-value": String(v.value[e.key]),
|
|
2013
|
+
options: e.options,
|
|
2014
|
+
size: "sm",
|
|
2015
|
+
"min-width": "100px",
|
|
2016
|
+
"onUpdate:modelValue": (t) => v.value[e.key] = t
|
|
2017
|
+
}, null, 8, [
|
|
2018
|
+
"model-value",
|
|
2019
|
+
"options",
|
|
2020
|
+
"onUpdate:modelValue"
|
|
2021
|
+
])) : a("", !0)]))), 128))], 64)) : a("", !0),
|
|
2022
|
+
r[12] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "样式 / 颜色")], -1),
|
|
2023
|
+
(C(!0), o(e, null, E(m.value, (e) => (C(), o("div", {
|
|
2024
|
+
key: e.key,
|
|
2025
|
+
class: "settings-item"
|
|
2026
|
+
}, [s("span", null, A(e.label), 1), e.type === "boolean" ? (C(), o("label", Lr, [I(s("input", {
|
|
2027
|
+
type: "checkbox",
|
|
2028
|
+
"onUpdate:modelValue": (t) => v.value[e.key] = t
|
|
2029
|
+
}, null, 8, Rr), [[M, v.value[e.key]]]), r[8] ||= s("span", { class: "md-switch-slider" }, null, -1)])) : e.type === "select" && e.options ? (C(), i(J, {
|
|
2030
|
+
key: 1,
|
|
2031
|
+
"model-value": String(v.value[e.key]),
|
|
2032
|
+
options: e.options,
|
|
2033
|
+
size: "sm",
|
|
2034
|
+
"min-width": "100px",
|
|
2035
|
+
"onUpdate:modelValue": (t) => v.value[e.key] = t
|
|
2036
|
+
}, null, 8, [
|
|
2037
|
+
"model-value",
|
|
2038
|
+
"options",
|
|
2039
|
+
"onUpdate:modelValue"
|
|
2040
|
+
])) : a("", !0)]))), 128)),
|
|
2041
|
+
s("div", {
|
|
2042
|
+
class: "settings-item nav-item",
|
|
2043
|
+
onClick: r[0] ||= (e) => h.value = !0
|
|
2044
|
+
}, [...r[9] ||= [s("span", null, "颜色配置", -1), s("svg", {
|
|
1953
2045
|
viewBox: "0 0 24 24",
|
|
1954
2046
|
fill: "none",
|
|
1955
2047
|
stroke: "currentColor",
|
|
1956
|
-
"stroke-width": "2"
|
|
1957
|
-
|
|
1958
|
-
"
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
2048
|
+
"stroke-width": "2",
|
|
2049
|
+
width: "16",
|
|
2050
|
+
height: "16",
|
|
2051
|
+
class: "nav-arrow"
|
|
2052
|
+
}, [s("path", { d: "M9 18l6-6-6-6" })], -1)]]),
|
|
2053
|
+
p.value.length > 0 ? (C(), o(e, { key: 1 }, [r[11] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "实验性 / 调试设置")], -1), (C(!0), o(e, null, E(p.value, (e) => (C(), o("div", {
|
|
2054
|
+
key: e.key,
|
|
2055
|
+
class: "settings-item experimental"
|
|
2056
|
+
}, [s("span", null, A(e.label), 1), e.type === "boolean" ? (C(), o("label", zr, [I(s("input", {
|
|
2057
|
+
type: "checkbox",
|
|
2058
|
+
"onUpdate:modelValue": (t) => v.value[e.key] = t
|
|
2059
|
+
}, null, 8, Br), [[M, v.value[e.key]]]), r[10] ||= s("span", { class: "md-switch-slider" }, null, -1)])) : e.type === "select" && e.options ? (C(), i(J, {
|
|
2060
|
+
key: 1,
|
|
2061
|
+
"model-value": String(v.value[e.key]),
|
|
2062
|
+
options: e.options,
|
|
2063
|
+
size: "sm",
|
|
2064
|
+
"min-width": "100px",
|
|
2065
|
+
"onUpdate:modelValue": (t) => v.value[e.key] = t
|
|
2066
|
+
}, null, 8, [
|
|
2067
|
+
"model-value",
|
|
2068
|
+
"options",
|
|
2069
|
+
"onUpdate:modelValue"
|
|
2070
|
+
])) : a("", !0)]))), 128))], 64)) : a("", !0)
|
|
2071
|
+
])]),
|
|
1966
2072
|
_: 1
|
|
1967
|
-
}
|
|
2073
|
+
}, 8, ["show"]), l(Y, {
|
|
2074
|
+
show: h.value,
|
|
2075
|
+
title: "颜色预设",
|
|
2076
|
+
subtitle: "自定义图表颜色",
|
|
2077
|
+
width: "min(92vw, 460px)",
|
|
2078
|
+
"max-height": "min(720px, calc(100vh - 48px))",
|
|
2079
|
+
"z-index": 1100,
|
|
2080
|
+
"footer-align": "space-between",
|
|
2081
|
+
onClose: r[4] ||= (e) => h.value = !1
|
|
2082
|
+
}, {
|
|
2083
|
+
footer: F(() => [s("button", {
|
|
2084
|
+
type: "button",
|
|
2085
|
+
class: "settings-btn reset",
|
|
2086
|
+
onClick: r[2] ||= (e) => g.value?.resetCurrentThemeColors()
|
|
2087
|
+
}, " 重置颜色 "), s("button", {
|
|
2088
|
+
type: "button",
|
|
2089
|
+
class: "settings-btn confirm",
|
|
2090
|
+
onClick: r[3] ||= (e) => h.value = !1
|
|
2091
|
+
}, " 确认 ")]),
|
|
2092
|
+
default: F(() => [l(Ce, {
|
|
2093
|
+
ref_key: "colorPresetPanelRef",
|
|
2094
|
+
ref: g,
|
|
2095
|
+
"color-preset-settings": v.value.colorPresetSettings,
|
|
2096
|
+
"onUpdate:colorPresetSettings": r[1] ||= (e) => v.value = {
|
|
2097
|
+
...v.value,
|
|
2098
|
+
colorPresetSettings: e
|
|
2099
|
+
}
|
|
2100
|
+
}, null, 8, ["color-preset-settings"])]),
|
|
2101
|
+
_: 1
|
|
2102
|
+
}, 8, ["show"])], 64));
|
|
1968
2103
|
}
|
|
1969
|
-
}), [["__scopeId", "data-v-
|
|
2104
|
+
}), [["__scopeId", "data-v-54c84784"]]), Hr = {
|
|
1970
2105
|
class: "left-toolbar",
|
|
1971
2106
|
"aria-label": "图表工具栏"
|
|
1972
|
-
},
|
|
2107
|
+
}, Ur = { class: "left-toolbar__group" }, Wr = [
|
|
1973
2108
|
"title",
|
|
1974
2109
|
"aria-label",
|
|
1975
2110
|
"onClick"
|
|
1976
|
-
],
|
|
2111
|
+
], Gr = ["onClick"], Kr = [
|
|
1977
2112
|
"title",
|
|
1978
2113
|
"aria-label",
|
|
1979
2114
|
"onClick"
|
|
1980
|
-
],
|
|
2115
|
+
], qr = { class: "left-toolbar__group" }, Jr = { class: "left-toolbar__group" }, Yr = ["title", "aria-label"], Xr = { class: "left-toolbar__group" }, Zr = /*#__PURE__*/ q(/* @__PURE__ */ u({
|
|
1981
2116
|
__name: "LeftToolbar",
|
|
1982
2117
|
props: { isFullscreen: { type: Boolean } },
|
|
1983
2118
|
emits: [
|
|
@@ -1992,86 +2127,86 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
|
|
|
1992
2127
|
{
|
|
1993
2128
|
id: "cursor",
|
|
1994
2129
|
title: "光标",
|
|
1995
|
-
icon:
|
|
2130
|
+
icon: Cn
|
|
1996
2131
|
},
|
|
1997
2132
|
{
|
|
1998
2133
|
id: "lines",
|
|
1999
2134
|
title: "线条",
|
|
2000
|
-
icon:
|
|
2135
|
+
icon: En,
|
|
2001
2136
|
children: [
|
|
2002
2137
|
{
|
|
2003
2138
|
id: "trend-line",
|
|
2004
2139
|
title: "线段",
|
|
2005
|
-
icon:
|
|
2140
|
+
icon: En
|
|
2006
2141
|
},
|
|
2007
2142
|
{
|
|
2008
2143
|
id: "ray",
|
|
2009
2144
|
title: "射线",
|
|
2010
|
-
icon:
|
|
2145
|
+
icon: kn
|
|
2011
2146
|
},
|
|
2012
2147
|
{
|
|
2013
2148
|
id: "h-line",
|
|
2014
2149
|
title: "水平线",
|
|
2015
|
-
icon:
|
|
2150
|
+
icon: Fn
|
|
2016
2151
|
},
|
|
2017
2152
|
{
|
|
2018
2153
|
id: "h-ray",
|
|
2019
2154
|
title: "水平射线",
|
|
2020
|
-
icon:
|
|
2155
|
+
icon: Mn
|
|
2021
2156
|
},
|
|
2022
2157
|
{
|
|
2023
2158
|
id: "v-line",
|
|
2024
2159
|
title: "垂直线",
|
|
2025
|
-
icon:
|
|
2160
|
+
icon: Rn
|
|
2026
2161
|
},
|
|
2027
2162
|
{
|
|
2028
2163
|
id: "crosshair-line",
|
|
2029
2164
|
title: "十字线",
|
|
2030
|
-
icon:
|
|
2165
|
+
icon: Vn
|
|
2031
2166
|
},
|
|
2032
2167
|
{
|
|
2033
2168
|
id: "info-line",
|
|
2034
2169
|
title: "信息线",
|
|
2035
|
-
icon:
|
|
2170
|
+
icon: Wn
|
|
2036
2171
|
}
|
|
2037
2172
|
]
|
|
2038
2173
|
},
|
|
2039
2174
|
{
|
|
2040
2175
|
id: "channels",
|
|
2041
2176
|
title: "通道",
|
|
2042
|
-
icon:
|
|
2177
|
+
icon: cr,
|
|
2043
2178
|
children: [
|
|
2044
2179
|
{
|
|
2045
2180
|
id: "parallel-channel",
|
|
2046
2181
|
title: "平行通道",
|
|
2047
|
-
icon:
|
|
2182
|
+
icon: cr
|
|
2048
2183
|
},
|
|
2049
2184
|
{
|
|
2050
2185
|
id: "regression-channel",
|
|
2051
2186
|
title: "回归趋势",
|
|
2052
|
-
icon:
|
|
2187
|
+
icon: dr
|
|
2053
2188
|
},
|
|
2054
2189
|
{
|
|
2055
2190
|
id: "flat-line",
|
|
2056
2191
|
title: "平滑顶底",
|
|
2057
|
-
icon:
|
|
2192
|
+
icon: mr
|
|
2058
2193
|
},
|
|
2059
2194
|
{
|
|
2060
2195
|
id: "disjoint-channel",
|
|
2061
2196
|
title: "不相交通道",
|
|
2062
|
-
icon:
|
|
2197
|
+
icon: _r
|
|
2063
2198
|
}
|
|
2064
2199
|
]
|
|
2065
2200
|
},
|
|
2066
2201
|
{
|
|
2067
2202
|
id: "range-select",
|
|
2068
2203
|
title: "导出区间数据",
|
|
2069
|
-
icon:
|
|
2204
|
+
icon: br
|
|
2070
2205
|
}
|
|
2071
2206
|
], d = c, f = T("cursor"), p = T(null), m = T(!1);
|
|
2072
2207
|
function h() {
|
|
2073
2208
|
try {
|
|
2074
|
-
let e = localStorage.getItem(
|
|
2209
|
+
let e = localStorage.getItem(ge);
|
|
2075
2210
|
if (e) {
|
|
2076
2211
|
let t = JSON.parse(e), n = { ...t };
|
|
2077
2212
|
return W.forEach((e) => {
|
|
@@ -2086,7 +2221,7 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
|
|
|
2086
2221
|
}
|
|
2087
2222
|
function g(e) {
|
|
2088
2223
|
try {
|
|
2089
|
-
localStorage.setItem(
|
|
2224
|
+
localStorage.setItem(ge, JSON.stringify(e));
|
|
2090
2225
|
} catch {}
|
|
2091
2226
|
}
|
|
2092
2227
|
let v = T(h());
|
|
@@ -2099,7 +2234,7 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
|
|
|
2099
2234
|
let t = e.children[0];
|
|
2100
2235
|
f.value = t.id, d("selectTool", t.id);
|
|
2101
2236
|
}
|
|
2102
|
-
|
|
2237
|
+
D(e.id);
|
|
2103
2238
|
return;
|
|
2104
2239
|
}
|
|
2105
2240
|
f.value = e.id, d("selectTool", e.id), p.value = null;
|
|
@@ -2107,28 +2242,28 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
|
|
|
2107
2242
|
function w(e) {
|
|
2108
2243
|
f.value = e.id, d("selectTool", e.id), p.value = null;
|
|
2109
2244
|
}
|
|
2110
|
-
function
|
|
2245
|
+
function D(e) {
|
|
2111
2246
|
p.value = p.value === e ? null : e;
|
|
2112
2247
|
}
|
|
2113
2248
|
function k() {
|
|
2114
2249
|
m.value = !0;
|
|
2115
2250
|
}
|
|
2116
|
-
function
|
|
2251
|
+
function A() {
|
|
2117
2252
|
return { ...v.value };
|
|
2118
2253
|
}
|
|
2119
|
-
r({ getSettings:
|
|
2254
|
+
r({ getSettings: A });
|
|
2120
2255
|
function M(e) {
|
|
2121
|
-
v.value = { ...e }, g(v.value),
|
|
2256
|
+
v.value = { ...e }, g(v.value), kr(!!v.value.enableCanvasProfiler), d("settingsChange", { ...v.value }), m.value = !1;
|
|
2122
2257
|
}
|
|
2123
2258
|
function N(e) {
|
|
2124
2259
|
e.target.closest(".tool-item") || (p.value = null);
|
|
2125
2260
|
}
|
|
2126
2261
|
return b(() => {
|
|
2127
|
-
document.addEventListener("click", N, !0), d("settingsChange", { ...v.value }),
|
|
2262
|
+
document.addEventListener("click", N, !0), d("settingsChange", { ...v.value }), kr(!!v.value.enableCanvasProfiler);
|
|
2128
2263
|
}), S(() => {
|
|
2129
2264
|
document.removeEventListener("click", N, !0);
|
|
2130
|
-
}), (r, c) => (C(), o(e, null, [s("nav",
|
|
2131
|
-
s("div",
|
|
2265
|
+
}), (r, c) => (C(), o(e, null, [s("nav", Hr, [
|
|
2266
|
+
s("div", Ur, [(C(), o(e, null, E(u, (t) => s("div", {
|
|
2132
2267
|
key: t.id,
|
|
2133
2268
|
class: "tool-item"
|
|
2134
2269
|
}, [s("button", {
|
|
@@ -2137,24 +2272,24 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
|
|
|
2137
2272
|
title: t.title,
|
|
2138
2273
|
"aria-label": t.title,
|
|
2139
2274
|
onClick: (e) => x(t),
|
|
2140
|
-
onPointerdown: c[0] ||=
|
|
2141
|
-
onPointermove: c[1] ||=
|
|
2142
|
-
onPointerup: c[2] ||=
|
|
2143
|
-
}, [(C(), i(
|
|
2275
|
+
onPointerdown: c[0] ||= R(() => {}, ["stop"]),
|
|
2276
|
+
onPointermove: c[1] ||= R(() => {}, ["stop"]),
|
|
2277
|
+
onPointerup: c[2] ||= R(() => {}, ["stop"])
|
|
2278
|
+
}, [(C(), i(O(t.icon), {
|
|
2144
2279
|
class: "tool-icon",
|
|
2145
2280
|
"aria-hidden": "true"
|
|
2146
2281
|
})), t.children && t.children.length ? (C(), o("span", {
|
|
2147
2282
|
key: 0,
|
|
2148
2283
|
class: _(["corner-indicator", { open: p.value === t.id }]),
|
|
2149
|
-
onClick:
|
|
2284
|
+
onClick: R((e) => D(t.id), ["stop"]),
|
|
2150
2285
|
"aria-label": "展开子菜单"
|
|
2151
|
-
}, null, 10,
|
|
2152
|
-
default:
|
|
2286
|
+
}, null, 10, Gr)) : a("", !0)], 42, Wr), l(n, { name: "dropdown" }, {
|
|
2287
|
+
default: F(() => [p.value === t.id && t.children && t.children.length ? (C(), o("div", {
|
|
2153
2288
|
key: 0,
|
|
2154
2289
|
class: "tool-dropdown",
|
|
2155
|
-
onPointerdown: c[3] ||=
|
|
2156
|
-
onPointermove: c[4] ||=
|
|
2157
|
-
onPointerup: c[5] ||=
|
|
2290
|
+
onPointerdown: c[3] ||= R(() => {}, ["stop"]),
|
|
2291
|
+
onPointermove: c[4] ||= R(() => {}, ["stop"]),
|
|
2292
|
+
onPointerup: c[5] ||= R(() => {}, ["stop"])
|
|
2158
2293
|
}, [(C(!0), o(e, null, E(t.children, (e) => (C(), o("button", {
|
|
2159
2294
|
key: e.id,
|
|
2160
2295
|
type: "button",
|
|
@@ -2162,23 +2297,23 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
|
|
|
2162
2297
|
title: e.title,
|
|
2163
2298
|
"aria-label": e.title,
|
|
2164
2299
|
onClick: (t) => w(e)
|
|
2165
|
-
}, [(C(), i(
|
|
2300
|
+
}, [(C(), i(O(e.icon), {
|
|
2166
2301
|
class: "tool-icon",
|
|
2167
2302
|
"aria-hidden": "true"
|
|
2168
|
-
}))], 10,
|
|
2303
|
+
}))], 10, Kr))), 128))], 32)) : a("", !0)]),
|
|
2169
2304
|
_: 2
|
|
2170
2305
|
}, 1024)])), 64))]),
|
|
2171
2306
|
c[22] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
2172
|
-
s("div",
|
|
2307
|
+
s("div", qr, [s("button", {
|
|
2173
2308
|
type: "button",
|
|
2174
2309
|
class: "left-toolbar__button",
|
|
2175
2310
|
title: "放大",
|
|
2176
2311
|
"aria-label": "放大",
|
|
2177
2312
|
onClick: c[6] ||= (e) => r.$emit("zoomIn"),
|
|
2178
|
-
onPointerdown: c[7] ||=
|
|
2179
|
-
onPointermove: c[8] ||=
|
|
2180
|
-
onPointerup: c[9] ||=
|
|
2181
|
-
}, [l(
|
|
2313
|
+
onPointerdown: c[7] ||= R(() => {}, ["stop"]),
|
|
2314
|
+
onPointermove: c[8] ||= R(() => {}, ["stop"]),
|
|
2315
|
+
onPointerup: c[9] ||= R(() => {}, ["stop"])
|
|
2316
|
+
}, [l(j(qn), {
|
|
2182
2317
|
class: "tool-icon",
|
|
2183
2318
|
"aria-hidden": "true"
|
|
2184
2319
|
})], 32), s("button", {
|
|
@@ -2187,53 +2322,53 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
|
|
|
2187
2322
|
title: "缩小",
|
|
2188
2323
|
"aria-label": "缩小",
|
|
2189
2324
|
onClick: c[10] ||= (e) => r.$emit("zoomOut"),
|
|
2190
|
-
onPointerdown: c[11] ||=
|
|
2191
|
-
onPointermove: c[12] ||=
|
|
2192
|
-
onPointerup: c[13] ||=
|
|
2193
|
-
}, [l(
|
|
2325
|
+
onPointerdown: c[11] ||= R(() => {}, ["stop"]),
|
|
2326
|
+
onPointermove: c[12] ||= R(() => {}, ["stop"]),
|
|
2327
|
+
onPointerup: c[13] ||= R(() => {}, ["stop"])
|
|
2328
|
+
}, [l(j(Xn), {
|
|
2194
2329
|
class: "tool-icon",
|
|
2195
2330
|
"aria-hidden": "true"
|
|
2196
2331
|
})], 32)]),
|
|
2197
2332
|
c[23] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
2198
|
-
s("div",
|
|
2333
|
+
s("div", Jr, [s("button", {
|
|
2199
2334
|
type: "button",
|
|
2200
2335
|
class: "left-toolbar__button",
|
|
2201
2336
|
title: t.isFullscreen ? "退出全屏" : "全屏显示",
|
|
2202
2337
|
"aria-label": t.isFullscreen ? "退出全屏" : "全屏显示",
|
|
2203
2338
|
onClick: c[14] ||= (e) => r.$emit("toggleFullscreen"),
|
|
2204
|
-
onPointerdown: c[15] ||=
|
|
2205
|
-
onPointermove: c[16] ||=
|
|
2206
|
-
onPointerup: c[17] ||=
|
|
2207
|
-
}, [t.isFullscreen ? (C(), i(
|
|
2339
|
+
onPointerdown: c[15] ||= R(() => {}, ["stop"]),
|
|
2340
|
+
onPointermove: c[16] ||= R(() => {}, ["stop"]),
|
|
2341
|
+
onPointerup: c[17] ||= R(() => {}, ["stop"])
|
|
2342
|
+
}, [t.isFullscreen ? (C(), i(j(nr), {
|
|
2208
2343
|
key: 0,
|
|
2209
2344
|
class: "tool-icon",
|
|
2210
2345
|
"aria-hidden": "true"
|
|
2211
|
-
})) : (C(), i(
|
|
2346
|
+
})) : (C(), i(j($n), {
|
|
2212
2347
|
key: 1,
|
|
2213
2348
|
class: "tool-icon",
|
|
2214
2349
|
"aria-hidden": "true"
|
|
2215
|
-
}))], 40,
|
|
2350
|
+
}))], 40, Yr)]),
|
|
2216
2351
|
c[24] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
2217
|
-
s("div",
|
|
2352
|
+
s("div", Xr, [s("button", {
|
|
2218
2353
|
type: "button",
|
|
2219
2354
|
class: "left-toolbar__button",
|
|
2220
2355
|
title: "设置",
|
|
2221
2356
|
"aria-label": "设置",
|
|
2222
2357
|
onClick: k,
|
|
2223
|
-
onPointerdown: c[18] ||=
|
|
2224
|
-
onPointermove: c[19] ||=
|
|
2225
|
-
onPointerup: c[20] ||=
|
|
2226
|
-
}, [l(
|
|
2358
|
+
onPointerdown: c[18] ||= R(() => {}, ["stop"]),
|
|
2359
|
+
onPointermove: c[19] ||= R(() => {}, ["stop"]),
|
|
2360
|
+
onPointerup: c[20] ||= R(() => {}, ["stop"])
|
|
2361
|
+
}, [l(j(ar), {
|
|
2227
2362
|
class: "tool-icon",
|
|
2228
2363
|
"aria-hidden": "true"
|
|
2229
2364
|
})], 32)])
|
|
2230
|
-
]), l(
|
|
2365
|
+
]), l(Vr, {
|
|
2231
2366
|
show: m.value,
|
|
2232
2367
|
onClose: c[21] ||= (e) => m.value = !1,
|
|
2233
2368
|
onConfirm: M
|
|
2234
2369
|
}, null, 8, ["show"])], 64));
|
|
2235
2370
|
}
|
|
2236
|
-
}), [["__scopeId", "data-v-
|
|
2371
|
+
}), [["__scopeId", "data-v-b7aa8ccf"]]), Qr = /* @__PURE__ */ u({
|
|
2237
2372
|
__name: "KLineLevelDropdown",
|
|
2238
2373
|
props: { modelValue: {} },
|
|
2239
2374
|
emits: ["update:modelValue"],
|
|
@@ -2280,7 +2415,7 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
|
|
|
2280
2415
|
value: "yearly"
|
|
2281
2416
|
}
|
|
2282
2417
|
], r = t;
|
|
2283
|
-
return (t, a) => (C(), i(
|
|
2418
|
+
return (t, a) => (C(), i(J, {
|
|
2284
2419
|
"model-value": e.modelValue,
|
|
2285
2420
|
options: n,
|
|
2286
2421
|
label: "级别",
|
|
@@ -2289,7 +2424,7 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
|
|
|
2289
2424
|
"onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
|
|
2290
2425
|
}, null, 8, ["model-value"]));
|
|
2291
2426
|
}
|
|
2292
|
-
}),
|
|
2427
|
+
}), $r = /* @__PURE__ */ u({
|
|
2293
2428
|
__name: "KLineAdjustmentDropdown",
|
|
2294
2429
|
props: { modelValue: {} },
|
|
2295
2430
|
emits: ["update:modelValue"],
|
|
@@ -2312,7 +2447,7 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
|
|
|
2312
2447
|
value: "none"
|
|
2313
2448
|
}
|
|
2314
2449
|
], r = t;
|
|
2315
|
-
return (t, a) => (C(), i(
|
|
2450
|
+
return (t, a) => (C(), i(J, {
|
|
2316
2451
|
"model-value": e.modelValue,
|
|
2317
2452
|
options: n,
|
|
2318
2453
|
label: "复权",
|
|
@@ -2321,13 +2456,13 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
|
|
|
2321
2456
|
"onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
|
|
2322
2457
|
}, null, 8, ["model-value"]));
|
|
2323
2458
|
}
|
|
2324
|
-
}),
|
|
2459
|
+
}), ei = {
|
|
2325
2460
|
viewBox: "0 0 24 24",
|
|
2326
2461
|
width: "1.2em",
|
|
2327
2462
|
height: "1.2em"
|
|
2328
2463
|
};
|
|
2329
|
-
function
|
|
2330
|
-
return C(), o("svg",
|
|
2464
|
+
function ti(e, t) {
|
|
2465
|
+
return C(), o("svg", ei, [...t[0] ||= [s("path", {
|
|
2331
2466
|
fill: "none",
|
|
2332
2467
|
stroke: "currentColor",
|
|
2333
2468
|
"stroke-linecap": "round",
|
|
@@ -2336,21 +2471,21 @@ function Xr(e, t) {
|
|
|
2336
2471
|
d: "M12 9v4m-1.637-9.409L2.257 17.125a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636-2.87L13.637 3.59a1.914 1.914 0 0 0-3.274 0M12 16h.01"
|
|
2337
2472
|
}, null, -1)]]);
|
|
2338
2473
|
}
|
|
2339
|
-
var
|
|
2474
|
+
var ni = h({
|
|
2340
2475
|
name: "tabler-alert-triangle",
|
|
2341
|
-
render:
|
|
2342
|
-
}),
|
|
2476
|
+
render: ti
|
|
2477
|
+
}), ri = ["title", "aria-expanded"], ii = { class: "symbol-chip__code" }, ai = {
|
|
2343
2478
|
key: 0,
|
|
2344
2479
|
class: "symbol-chip__spinner",
|
|
2345
2480
|
"aria-hidden": "true"
|
|
2346
|
-
},
|
|
2481
|
+
}, oi = { class: "symbol-search" }, si = {
|
|
2347
2482
|
class: "symbol-list",
|
|
2348
2483
|
role: "listbox",
|
|
2349
2484
|
"aria-label": "商品列表"
|
|
2350
|
-
},
|
|
2485
|
+
}, ci = {
|
|
2351
2486
|
key: 0,
|
|
2352
2487
|
class: "symbol-list__empty"
|
|
2353
|
-
},
|
|
2488
|
+
}, li = {
|
|
2354
2489
|
width: "32",
|
|
2355
2490
|
height: "32",
|
|
2356
2491
|
viewBox: "0 0 32 32",
|
|
@@ -2359,7 +2494,7 @@ var Zr = h({
|
|
|
2359
2494
|
"margin-bottom": "8px",
|
|
2360
2495
|
opacity: "0.35"
|
|
2361
2496
|
}
|
|
2362
|
-
},
|
|
2497
|
+
}, ui = ["aria-selected", "onClick"], di = { class: "symbol-list__left" }, fi = { class: "symbol-list__code" }, pi = { class: "symbol-list__desc" }, mi = { class: "symbol-list__exchange" }, hi = /*#__PURE__*/ q(/* @__PURE__ */ u({
|
|
2363
2498
|
__name: "SymbolSelector",
|
|
2364
2499
|
props: {
|
|
2365
2500
|
symbol: {},
|
|
@@ -2369,8 +2504,8 @@ var Zr = h({
|
|
|
2369
2504
|
},
|
|
2370
2505
|
emits: ["change"],
|
|
2371
2506
|
setup(c, { emit: u }) {
|
|
2372
|
-
let d = c, f = u, p = T(!1), m = T(""), h = T(null), x = T(null), S = T(null), w =
|
|
2373
|
-
let e =
|
|
2507
|
+
let d = c, f = u, p = T(!1), m = T(""), h = T(null), x = T(null), S = T(null), w = De(), { popupStyle: D, startPositionSync: O, stopPositionSync: k } = we(x, S, 8), M = r(() => d.symbols.find((e) => e.code === d.symbol)), L = r(() => {
|
|
2508
|
+
let e = M.value;
|
|
2374
2509
|
return e ? `${e.code} - ${e.description}` : d.symbol;
|
|
2375
2510
|
}), R = r(() => {
|
|
2376
2511
|
let e = m.value.trim().toLowerCase();
|
|
@@ -2379,8 +2514,8 @@ var Zr = h({
|
|
|
2379
2514
|
function z() {
|
|
2380
2515
|
p.value = !p.value, p.value && g(() => h.value?.focus());
|
|
2381
2516
|
}
|
|
2382
|
-
|
|
2383
|
-
e ? O() :
|
|
2517
|
+
P(p, (e) => {
|
|
2518
|
+
e ? O() : k();
|
|
2384
2519
|
});
|
|
2385
2520
|
function ee() {
|
|
2386
2521
|
m.value = "", h.value?.focus();
|
|
@@ -2389,11 +2524,11 @@ var Zr = h({
|
|
|
2389
2524
|
function B(e) {
|
|
2390
2525
|
f("change", e), p.value = !1, m.value = "";
|
|
2391
2526
|
}
|
|
2392
|
-
function
|
|
2527
|
+
function ne(e) {
|
|
2393
2528
|
let t = x.value, n = S.value;
|
|
2394
2529
|
t && !t.contains(e.target) && !n?.contains(e.target) && (p.value = !1);
|
|
2395
2530
|
}
|
|
2396
|
-
return b(() => document.addEventListener("mousedown",
|
|
2531
|
+
return b(() => document.addEventListener("mousedown", ne)), y(() => document.removeEventListener("mousedown", ne)), P(() => d.symbol, () => {
|
|
2397
2532
|
p.value = !1, m.value = "";
|
|
2398
2533
|
}), (r, u) => (C(), o("div", {
|
|
2399
2534
|
ref_key: "chipWrapRef",
|
|
@@ -2406,20 +2541,20 @@ var Zr = h({
|
|
|
2406
2541
|
"aria-expanded": p.value,
|
|
2407
2542
|
"aria-haspopup": "dialog",
|
|
2408
2543
|
onClick: z
|
|
2409
|
-
}, [s("span",
|
|
2544
|
+
}, [s("span", ii, A(L.value), 1), c.loading ? (C(), o("span", ai)) : c.error ? (C(), i(j(ni), {
|
|
2410
2545
|
key: 1,
|
|
2411
2546
|
class: "symbol-chip__warn",
|
|
2412
2547
|
"aria-hidden": "true"
|
|
2413
|
-
})) : a("", !0)], 10,
|
|
2414
|
-
default:
|
|
2548
|
+
})) : a("", !0)], 10, ri), (C(), i(t, { to: j(w) }, [l(n, { name: "symbol-popover" }, {
|
|
2549
|
+
default: F(() => [p.value ? (C(), o("div", {
|
|
2415
2550
|
key: 0,
|
|
2416
2551
|
ref_key: "popupRef",
|
|
2417
2552
|
ref: S,
|
|
2418
2553
|
class: "symbol-popover",
|
|
2419
|
-
style: v(
|
|
2554
|
+
style: v(j(D)),
|
|
2420
2555
|
role: "dialog",
|
|
2421
2556
|
"aria-label": "切换合约"
|
|
2422
|
-
}, [s("div",
|
|
2557
|
+
}, [s("div", oi, [
|
|
2423
2558
|
u[2] ||= s("span", {
|
|
2424
2559
|
class: "symbol-search__icon",
|
|
2425
2560
|
"aria-hidden": "true"
|
|
@@ -2443,7 +2578,7 @@ var Zr = h({
|
|
|
2443
2578
|
"stroke-width": "1.6",
|
|
2444
2579
|
"stroke-linecap": "round"
|
|
2445
2580
|
})])], -1),
|
|
2446
|
-
|
|
2581
|
+
I(s("input", {
|
|
2447
2582
|
ref_key: "searchInputRef",
|
|
2448
2583
|
ref: h,
|
|
2449
2584
|
"onUpdate:modelValue": u[0] ||= (e) => m.value = e,
|
|
@@ -2454,7 +2589,7 @@ var Zr = h({
|
|
|
2454
2589
|
spellcheck: "false",
|
|
2455
2590
|
"aria-label": "搜索商品",
|
|
2456
2591
|
onInput: te
|
|
2457
|
-
}, null, 544), [[
|
|
2592
|
+
}, null, 544), [[N, m.value]]),
|
|
2458
2593
|
m.value ? (C(), o("button", {
|
|
2459
2594
|
key: 0,
|
|
2460
2595
|
type: "button",
|
|
@@ -2475,7 +2610,7 @@ var Zr = h({
|
|
|
2475
2610
|
s("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
|
|
2476
2611
|
s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
|
|
2477
2612
|
], -1)]])) : a("", !0)
|
|
2478
|
-
]), s("div",
|
|
2613
|
+
]), s("div", si, [R.value.length === 0 ? (C(), o("div", ci, [(C(), o("svg", li, [...u[3] ||= [s("circle", {
|
|
2479
2614
|
cx: "13",
|
|
2480
2615
|
cy: "13",
|
|
2481
2616
|
r: "10",
|
|
@@ -2496,27 +2631,27 @@ var Zr = h({
|
|
|
2496
2631
|
role: "option",
|
|
2497
2632
|
"aria-selected": e.code === c.symbol,
|
|
2498
2633
|
onClick: (t) => B(e)
|
|
2499
|
-
}, [s("span",
|
|
2634
|
+
}, [s("span", di, [s("span", fi, A(e.code), 1), s("span", pi, A(e.description), 1)]), s("span", mi, A(e.exchange), 1)], 10, ui))), 128))])], 4)) : a("", !0)]),
|
|
2500
2635
|
_: 1
|
|
2501
2636
|
})], 8, ["to"]))], 512));
|
|
2502
2637
|
}
|
|
2503
|
-
}), [["__scopeId", "data-v-
|
|
2638
|
+
}), [["__scopeId", "data-v-3d5a580d"]]), gi = ["aria-expanded"], _i = {
|
|
2504
2639
|
key: 0,
|
|
2505
2640
|
class: "compare-chip__spinner"
|
|
2506
|
-
},
|
|
2641
|
+
}, vi = {
|
|
2507
2642
|
key: 1,
|
|
2508
2643
|
class: "compare-chip__badge"
|
|
2509
|
-
},
|
|
2644
|
+
}, yi = { class: "compare-search" }, bi = {
|
|
2510
2645
|
key: 0,
|
|
2511
2646
|
class: "compare-selected"
|
|
2512
|
-
},
|
|
2647
|
+
}, xi = { class: "compare-selected__list" }, Si = { class: "compare-selected__code" }, Ci = { class: "compare-selected__desc" }, wi = ["aria-label", "onClick"], Ti = {
|
|
2513
2648
|
class: "compare-list",
|
|
2514
2649
|
role: "listbox",
|
|
2515
2650
|
"aria-label": "商品列表"
|
|
2516
|
-
},
|
|
2651
|
+
}, Ei = {
|
|
2517
2652
|
key: 0,
|
|
2518
2653
|
class: "compare-list__empty"
|
|
2519
|
-
},
|
|
2654
|
+
}, Di = {
|
|
2520
2655
|
width: "32",
|
|
2521
2656
|
height: "32",
|
|
2522
2657
|
viewBox: "0 0 32 32",
|
|
@@ -2525,11 +2660,11 @@ var Zr = h({
|
|
|
2525
2660
|
"margin-bottom": "8px",
|
|
2526
2661
|
opacity: "0.35"
|
|
2527
2662
|
}
|
|
2528
|
-
},
|
|
2663
|
+
}, Oi = ["aria-selected", "onClick"], ki = { class: "compare-list__left" }, Ai = { class: "compare-list__code" }, ji = { class: "compare-list__desc" }, Mi = { class: "compare-list__right" }, Ni = { class: "compare-list__exchange" }, Pi = {
|
|
2529
2664
|
key: 0,
|
|
2530
2665
|
class: "compare-list__check",
|
|
2531
2666
|
"aria-hidden": "true"
|
|
2532
|
-
},
|
|
2667
|
+
}, Fi = /*#__PURE__*/ q(/* @__PURE__ */ u({
|
|
2533
2668
|
__name: "CompareSymbolSelector",
|
|
2534
2669
|
props: {
|
|
2535
2670
|
symbols: {},
|
|
@@ -2539,15 +2674,15 @@ var Zr = h({
|
|
|
2539
2674
|
},
|
|
2540
2675
|
emits: ["add", "remove"],
|
|
2541
2676
|
setup(c, { emit: u }) {
|
|
2542
|
-
let d = c, f = u, p = T(!1), m = T(""), h = T(null), x = T(null), S = T(null), w =
|
|
2543
|
-
let e =
|
|
2677
|
+
let d = c, f = u, p = T(!1), m = T(""), h = T(null), x = T(null), S = T(null), w = De(), { popupStyle: D, startPositionSync: O, stopPositionSync: k } = we(x, S, 8), M = r(() => new Set(d.selected ?? [])), L = r(() => {
|
|
2678
|
+
let e = M.value;
|
|
2544
2679
|
return d.symbols.filter((t) => e.has(t.code));
|
|
2545
2680
|
}), R = r(() => {
|
|
2546
2681
|
let e = m.value.trim().toLowerCase();
|
|
2547
2682
|
return e ? d.symbols.filter((t) => t.code.toLowerCase().includes(e) || t.description.toLowerCase().includes(e) || t.exchange.toLowerCase().includes(e)) : d.symbols;
|
|
2548
2683
|
});
|
|
2549
2684
|
function z(e) {
|
|
2550
|
-
return
|
|
2685
|
+
return M.value.has(e);
|
|
2551
2686
|
}
|
|
2552
2687
|
function ee(e) {
|
|
2553
2688
|
z(e.code) ? f("remove", e.code) : f("add", e);
|
|
@@ -2558,17 +2693,17 @@ var Zr = h({
|
|
|
2558
2693
|
function B() {
|
|
2559
2694
|
p.value = !p.value, p.value && g(() => h.value?.focus());
|
|
2560
2695
|
}
|
|
2561
|
-
|
|
2562
|
-
e ? O() :
|
|
2696
|
+
P(p, (e) => {
|
|
2697
|
+
e ? O() : k();
|
|
2563
2698
|
});
|
|
2564
|
-
function
|
|
2699
|
+
function ne() {
|
|
2565
2700
|
m.value = "", h.value?.focus();
|
|
2566
2701
|
}
|
|
2567
|
-
function
|
|
2702
|
+
function V(e) {
|
|
2568
2703
|
let t = x.value, n = S.value;
|
|
2569
2704
|
t && !t.contains(e.target) && !n?.contains(e.target) && (p.value = !1, m.value = "");
|
|
2570
2705
|
}
|
|
2571
|
-
return b(() => document.addEventListener("mousedown",
|
|
2706
|
+
return b(() => document.addEventListener("mousedown", V)), y(() => document.removeEventListener("mousedown", V)), (r, u) => (C(), o("div", {
|
|
2572
2707
|
ref_key: "rootRef",
|
|
2573
2708
|
ref: x,
|
|
2574
2709
|
class: "compare-chip-wrap"
|
|
@@ -2585,19 +2720,19 @@ var Zr = h({
|
|
|
2585
2720
|
"aria-hidden": "true"
|
|
2586
2721
|
}, "+", -1),
|
|
2587
2722
|
u[2] ||= s("span", { class: "compare-chip__text" }, "比较商品", -1),
|
|
2588
|
-
c.comparisonLoading ? (C(), o("span",
|
|
2589
|
-
c.selected.length > 0 ? (C(), o("span",
|
|
2590
|
-
], 10,
|
|
2591
|
-
default:
|
|
2723
|
+
c.comparisonLoading ? (C(), o("span", _i)) : a("", !0),
|
|
2724
|
+
c.selected.length > 0 ? (C(), o("span", vi, A(c.selected.length), 1)) : a("", !0)
|
|
2725
|
+
], 10, gi), (C(), i(t, { to: j(w) }, [l(n, { name: "symbol-popover" }, {
|
|
2726
|
+
default: F(() => [p.value ? (C(), o("div", {
|
|
2592
2727
|
key: 0,
|
|
2593
2728
|
ref_key: "popupRef",
|
|
2594
2729
|
ref: S,
|
|
2595
2730
|
class: "compare-popover",
|
|
2596
|
-
style: v(
|
|
2731
|
+
style: v(j(D)),
|
|
2597
2732
|
role: "dialog",
|
|
2598
2733
|
"aria-label": "比较商品"
|
|
2599
2734
|
}, [
|
|
2600
|
-
s("div",
|
|
2735
|
+
s("div", yi, [
|
|
2601
2736
|
u[4] ||= s("span", {
|
|
2602
2737
|
class: "compare-search__icon",
|
|
2603
2738
|
"aria-hidden": "true"
|
|
@@ -2621,7 +2756,7 @@ var Zr = h({
|
|
|
2621
2756
|
"stroke-width": "1.6",
|
|
2622
2757
|
"stroke-linecap": "round"
|
|
2623
2758
|
})])], -1),
|
|
2624
|
-
|
|
2759
|
+
I(s("input", {
|
|
2625
2760
|
ref_key: "searchInputRef",
|
|
2626
2761
|
ref: h,
|
|
2627
2762
|
"onUpdate:modelValue": u[0] ||= (e) => m.value = e,
|
|
@@ -2631,13 +2766,13 @@ var Zr = h({
|
|
|
2631
2766
|
autocomplete: "off",
|
|
2632
2767
|
spellcheck: "false",
|
|
2633
2768
|
"aria-label": "搜索比较商品"
|
|
2634
|
-
}, null, 512), [[
|
|
2769
|
+
}, null, 512), [[N, m.value]]),
|
|
2635
2770
|
m.value ? (C(), o("button", {
|
|
2636
2771
|
key: 0,
|
|
2637
2772
|
type: "button",
|
|
2638
2773
|
class: "compare-search__clear",
|
|
2639
2774
|
"aria-label": "清空搜索",
|
|
2640
|
-
onClick:
|
|
2775
|
+
onClick: ne
|
|
2641
2776
|
}, [...u[3] ||= [s("svg", {
|
|
2642
2777
|
class: "delete-icon",
|
|
2643
2778
|
viewBox: "0 0 24 24",
|
|
@@ -2653,7 +2788,7 @@ var Zr = h({
|
|
|
2653
2788
|
s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
|
|
2654
2789
|
], -1)]])) : a("", !0)
|
|
2655
2790
|
]),
|
|
2656
|
-
c.selected.length > 0 ? (C(), o("div",
|
|
2791
|
+
c.selected.length > 0 ? (C(), o("div", bi, [u[6] ||= s("div", { class: "compare-selected__header" }, [s("span", { class: "compare-selected__title" }, "已添加商品")], -1), s("div", xi, [(C(!0), o(e, null, E(L.value, (e) => (C(), o("div", {
|
|
2657
2792
|
key: e.code,
|
|
2658
2793
|
class: "compare-selected__item"
|
|
2659
2794
|
}, [
|
|
@@ -2661,8 +2796,8 @@ var Zr = h({
|
|
|
2661
2796
|
class: "compare-selected__color",
|
|
2662
2797
|
style: v({ background: c.comparisonColors?.get(e.code) ?? "#888" })
|
|
2663
2798
|
}, null, 4),
|
|
2664
|
-
s("span",
|
|
2665
|
-
s("span",
|
|
2799
|
+
s("span", Si, A(e.code), 1),
|
|
2800
|
+
s("span", Ci, A(e.description), 1),
|
|
2666
2801
|
s("button", {
|
|
2667
2802
|
type: "button",
|
|
2668
2803
|
class: "compare-selected__remove",
|
|
@@ -2677,9 +2812,9 @@ var Zr = h({
|
|
|
2677
2812
|
"stroke-width": "2",
|
|
2678
2813
|
"stroke-linecap": "round",
|
|
2679
2814
|
"stroke-linejoin": "round"
|
|
2680
|
-
}, [s("path", { d: "M18 6L6 18" }), s("path", { d: "M6 6l12 12" })], -1)]], 8,
|
|
2815
|
+
}, [s("path", { d: "M18 6L6 18" }), s("path", { d: "M6 6l12 12" })], -1)]], 8, wi)
|
|
2681
2816
|
]))), 128))])])) : a("", !0),
|
|
2682
|
-
s("div",
|
|
2817
|
+
s("div", Ti, [R.value.length === 0 ? (C(), o("div", Ei, [(C(), o("svg", Di, [...u[7] ||= [s("circle", {
|
|
2683
2818
|
cx: "13",
|
|
2684
2819
|
cy: "13",
|
|
2685
2820
|
r: "10",
|
|
@@ -2700,7 +2835,7 @@ var Zr = h({
|
|
|
2700
2835
|
role: "option",
|
|
2701
2836
|
"aria-selected": z(e.code),
|
|
2702
2837
|
onClick: (t) => ee(e)
|
|
2703
|
-
}, [s("span",
|
|
2838
|
+
}, [s("span", ki, [s("span", Ai, A(e.code), 1), s("span", ji, A(e.description), 1)]), s("span", Mi, [s("span", Ni, A(e.exchange), 1), z(e.code) ? (C(), o("span", Pi, [...u[9] ||= [s("svg", {
|
|
2704
2839
|
viewBox: "0 0 24 24",
|
|
2705
2840
|
width: "16",
|
|
2706
2841
|
height: "16",
|
|
@@ -2709,12 +2844,12 @@ var Zr = h({
|
|
|
2709
2844
|
"stroke-width": "2.5",
|
|
2710
2845
|
"stroke-linecap": "round",
|
|
2711
2846
|
"stroke-linejoin": "round"
|
|
2712
|
-
}, [s("polyline", { points: "20 6 9 17 4 12" })], -1)]])) : a("", !0)])], 10,
|
|
2847
|
+
}, [s("polyline", { points: "20 6 9 17 4 12" })], -1)]])) : a("", !0)])], 10, Oi))), 128))])
|
|
2713
2848
|
], 4)) : a("", !0)]),
|
|
2714
2849
|
_: 1
|
|
2715
2850
|
})], 8, ["to"]))], 512));
|
|
2716
2851
|
}
|
|
2717
|
-
}), [["__scopeId", "data-v-
|
|
2852
|
+
}), [["__scopeId", "data-v-8a5646b4"]]), Ii = /*#__PURE__*/ q(/* @__PURE__ */ u({
|
|
2718
2853
|
__name: "TopToolbar",
|
|
2719
2854
|
props: {
|
|
2720
2855
|
symbol: {},
|
|
@@ -2853,7 +2988,7 @@ var Zr = h({
|
|
|
2853
2988
|
onMouseup: m,
|
|
2854
2989
|
onMouseleave: m
|
|
2855
2990
|
}, [
|
|
2856
|
-
v.value ? (C(), i(
|
|
2991
|
+
v.value ? (C(), i(hi, {
|
|
2857
2992
|
key: 0,
|
|
2858
2993
|
symbol: v.value,
|
|
2859
2994
|
symbols: y.value,
|
|
@@ -2866,7 +3001,7 @@ var Zr = h({
|
|
|
2866
3001
|
"loading",
|
|
2867
3002
|
"error"
|
|
2868
3003
|
])) : a("", !0),
|
|
2869
|
-
l(
|
|
3004
|
+
l(Fi, {
|
|
2870
3005
|
symbols: y.value,
|
|
2871
3006
|
selected: e.overlaySymbols,
|
|
2872
3007
|
"comparison-colors": e.comparisonColors,
|
|
@@ -2879,11 +3014,11 @@ var Zr = h({
|
|
|
2879
3014
|
"comparison-colors",
|
|
2880
3015
|
"comparison-loading"
|
|
2881
3016
|
]),
|
|
2882
|
-
l(
|
|
3017
|
+
l(Qr, {
|
|
2883
3018
|
"model-value": e.kLineLevel,
|
|
2884
3019
|
"onUpdate:modelValue": r[2] ||= (e) => g("kLineLevelChange", e)
|
|
2885
3020
|
}, null, 8, ["model-value"]),
|
|
2886
|
-
l(
|
|
3021
|
+
l($r, {
|
|
2887
3022
|
"model-value": e.kLineAdjust,
|
|
2888
3023
|
"onUpdate:modelValue": r[3] ||= (e) => g("kLineAdjustChange", e)
|
|
2889
3024
|
}, null, 8, ["model-value"]),
|
|
@@ -2899,100 +3034,73 @@ var Zr = h({
|
|
|
2899
3034
|
}, "fx", -1), s("span", { class: "indicator-button__text" }, "指标", -1)]])
|
|
2900
3035
|
], 544));
|
|
2901
3036
|
}
|
|
2902
|
-
}), [["__scopeId", "data-v-8ecedbff"]]),
|
|
3037
|
+
}), [["__scopeId", "data-v-8ecedbff"]]), Li = /*#__PURE__*/ q(/* @__PURE__ */ u({
|
|
2903
3038
|
__name: "BatchStockDialog",
|
|
2904
3039
|
props: { show: { type: Boolean } },
|
|
2905
3040
|
emits: ["close", "apply"],
|
|
2906
|
-
setup(e, { emit:
|
|
2907
|
-
let
|
|
2908
|
-
get: () =>
|
|
3041
|
+
setup(e, { emit: t }) {
|
|
3042
|
+
let n = t, a = T([]), o = r({
|
|
3043
|
+
get: () => a.value.join("\n"),
|
|
2909
3044
|
set: (e) => {
|
|
2910
|
-
|
|
3045
|
+
a.value = e.split("\n").map((e) => e.trim()).filter(Boolean);
|
|
2911
3046
|
}
|
|
2912
3047
|
});
|
|
2913
|
-
function
|
|
2914
|
-
|
|
3048
|
+
function c() {
|
|
3049
|
+
a.value.length !== 0 && (n("apply", a.value), n("close"));
|
|
2915
3050
|
}
|
|
2916
|
-
return (
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
s("div", Ni, [F(s("textarea", {
|
|
2936
|
-
"onUpdate:modelValue": c[1] ||= (e) => p.value = e,
|
|
2937
|
-
class: "batch-textarea",
|
|
2938
|
-
placeholder: "每行一个股票代码\n例如:\n000001\n600036\n002415",
|
|
2939
|
-
rows: "8",
|
|
2940
|
-
spellcheck: "false"
|
|
2941
|
-
}, null, 512), [[M, p.value]])]),
|
|
2942
|
-
s("div", Pi, [s("button", {
|
|
2943
|
-
class: "batch-btn batch-btn--cancel",
|
|
2944
|
-
onClick: c[2] ||= (e) => u("close")
|
|
2945
|
-
}, "取消"), s("button", {
|
|
2946
|
-
class: "batch-btn batch-btn--confirm",
|
|
2947
|
-
onClick: m
|
|
2948
|
-
}, "应用")])
|
|
2949
|
-
])]),
|
|
2950
|
-
_: 1
|
|
2951
|
-
})])) : a("", !0)]),
|
|
3051
|
+
return (t, r) => (C(), i(Y, {
|
|
3052
|
+
title: "批量设置股票代码",
|
|
3053
|
+
show: e.show,
|
|
3054
|
+
onClose: r[2] ||= (e) => n("close")
|
|
3055
|
+
}, {
|
|
3056
|
+
footer: F(() => [s("button", {
|
|
3057
|
+
class: "batch-btn batch-btn--cancel",
|
|
3058
|
+
onClick: r[1] ||= (e) => n("close")
|
|
3059
|
+
}, "取消"), s("button", {
|
|
3060
|
+
class: "batch-btn batch-btn--confirm",
|
|
3061
|
+
onClick: c
|
|
3062
|
+
}, "应用")]),
|
|
3063
|
+
default: F(() => [I(s("textarea", {
|
|
3064
|
+
"onUpdate:modelValue": r[0] ||= (e) => o.value = e,
|
|
3065
|
+
class: "batch-textarea",
|
|
3066
|
+
placeholder: "每行一个股票代码,导出时会将所选区间内这些品种的数据一并导出\n例如:\n000001\n600036\n002415",
|
|
3067
|
+
rows: "8",
|
|
3068
|
+
spellcheck: "false"
|
|
3069
|
+
}, null, 512), [[N, o.value]])]),
|
|
2952
3070
|
_: 1
|
|
2953
|
-
}
|
|
3071
|
+
}, 8, ["show"]));
|
|
2954
3072
|
}
|
|
2955
|
-
}), [["__scopeId", "data-v-
|
|
2956
|
-
key: 0,
|
|
2957
|
-
class: "export-overlay"
|
|
2958
|
-
}, Li = { class: "export-header" }, Ri = { class: "export-body" }, zi = { class: "export-label" }, Bi = { class: "export-bar-track" }, Vi = { class: "export-counter" }, Hi = /*#__PURE__*/ G(/* @__PURE__ */ u({
|
|
3073
|
+
}), [["__scopeId", "data-v-2311afd3"]]), Ri = { class: "export-body" }, zi = { class: "export-label" }, Bi = { class: "export-bar-track" }, Vi = { class: "export-counter" }, Hi = /*#__PURE__*/ q(/* @__PURE__ */ u({
|
|
2959
3074
|
__name: "ExportProgressDialog",
|
|
2960
3075
|
props: { progress: {} },
|
|
2961
3076
|
emits: ["close"],
|
|
2962
|
-
setup(e, { emit:
|
|
2963
|
-
let
|
|
2964
|
-
return (
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
key: 0,
|
|
2986
|
-
class: "export-done-btn",
|
|
2987
|
-
onClick: c[1] ||= (e) => d("close")
|
|
2988
|
-
}, "完成")) : a("", !0)
|
|
2989
|
-
])])]),
|
|
2990
|
-
_: 1
|
|
2991
|
-
})])) : a("", !0)]),
|
|
3077
|
+
setup(e, { emit: t }) {
|
|
3078
|
+
let n = e, c = t, l = r(() => !n.progress || n.progress.total <= 0 ? 0 : Math.min(100, Math.round(n.progress.current / n.progress.total * 100)));
|
|
3079
|
+
return (t, n) => (C(), i(Y, {
|
|
3080
|
+
title: "导出数据",
|
|
3081
|
+
show: !!e.progress,
|
|
3082
|
+
"z-index": 1100,
|
|
3083
|
+
"close-on-overlay": !1,
|
|
3084
|
+
"footer-align": "center",
|
|
3085
|
+
onClose: n[1] ||= (e) => c("close")
|
|
3086
|
+
}, {
|
|
3087
|
+
footer: F(() => [e.progress && e.progress.current === e.progress.total ? (C(), o("button", {
|
|
3088
|
+
key: 0,
|
|
3089
|
+
class: "export-done-btn",
|
|
3090
|
+
onClick: n[0] ||= (e) => c("close")
|
|
3091
|
+
}, " 完成 ")) : a("", !0)]),
|
|
3092
|
+
default: F(() => [s("div", Ri, [
|
|
3093
|
+
s("div", zi, A(e.progress?.label), 1),
|
|
3094
|
+
s("div", Bi, [s("div", {
|
|
3095
|
+
class: "export-bar-fill",
|
|
3096
|
+
style: v({ width: l.value + "%" })
|
|
3097
|
+
}, null, 4)]),
|
|
3098
|
+
s("div", Vi, A(e.progress?.current ?? 0) + " / " + A(e.progress?.total ?? 0), 1)
|
|
3099
|
+
])]),
|
|
2992
3100
|
_: 1
|
|
2993
|
-
}
|
|
3101
|
+
}, 8, ["show"]));
|
|
2994
3102
|
}
|
|
2995
|
-
}), [["__scopeId", "data-v-
|
|
3103
|
+
}), [["__scopeId", "data-v-63b609dd"]]), Ui = ["data-theme"], Wi = {
|
|
2996
3104
|
class: "pane-separator-layer",
|
|
2997
3105
|
"aria-hidden": "true"
|
|
2998
3106
|
}, Gi = {
|
|
@@ -3001,7 +3109,7 @@ var Zr = h({
|
|
|
3001
3109
|
}, Ki = {
|
|
3002
3110
|
class: "x-axis-canvas",
|
|
3003
3111
|
ref: "xAxisCanvasRef"
|
|
3004
|
-
}, qi =
|
|
3112
|
+
}, qi = /*#__PURE__*/ q(/* @__PURE__ */ u({
|
|
3005
3113
|
__name: "KLineChart",
|
|
3006
3114
|
props: {
|
|
3007
3115
|
semanticConfig: {},
|
|
@@ -3029,23 +3137,23 @@ var Zr = h({
|
|
|
3029
3137
|
"kLineAdjustChange"
|
|
3030
3138
|
],
|
|
3031
3139
|
setup(n, { expose: c, emit: u }) {
|
|
3032
|
-
let d = n, f = u, p = T(d.semanticConfig?.data?.period ?? "daily"), h = T(d.semanticConfig?.data?.adjust ?? "none"), y = r(() => p.value.includes("min")), x = T("选择商品"), w = T(null), D = T(!1),
|
|
3140
|
+
let d = n, f = u, p = T(d.semanticConfig?.data?.period ?? "daily"), h = T(d.semanticConfig?.data?.adjust ?? "none"), y = r(() => p.value.includes("min")), x = T("选择商品"), w = T(null), D = T(!1), O = T(!1), A = T([]), M = T([]);
|
|
3141
|
+
function N(e) {
|
|
3142
|
+
p.value = e, f("kLineLevelChange", e), B();
|
|
3143
|
+
}
|
|
3033
3144
|
function I(e) {
|
|
3034
|
-
|
|
3145
|
+
h.value = e, f("kLineAdjustChange", e), B();
|
|
3035
3146
|
}
|
|
3036
|
-
function
|
|
3037
|
-
|
|
3147
|
+
function L(e) {
|
|
3148
|
+
O.value = !1, x.value = e.code, w.value = e, B();
|
|
3038
3149
|
}
|
|
3039
3150
|
function z(e) {
|
|
3040
|
-
|
|
3151
|
+
w.value?.code !== e.code && (A.value.includes(e.code) || (M.value = [...M.value, e], A.value = M.value.map((e) => e.code), ne(), H.value?.addComparisonSymbol(te(e))));
|
|
3041
3152
|
}
|
|
3042
3153
|
function ee(e) {
|
|
3043
|
-
|
|
3154
|
+
M.value = M.value.filter((t) => t.code !== e), A.value = M.value.map((e) => e.code), H.value?.removeComparisonSymbol(e);
|
|
3044
3155
|
}
|
|
3045
3156
|
function te(e) {
|
|
3046
|
-
P.value = P.value.filter((t) => t.code !== e), j.value = P.value.map((e) => e.code), U.value?.removeComparisonSymbol(e);
|
|
3047
|
-
}
|
|
3048
|
-
function B(e) {
|
|
3049
3157
|
return {
|
|
3050
3158
|
symbol: e.code,
|
|
3051
3159
|
exchange: e.exchange,
|
|
@@ -3056,37 +3164,37 @@ var Zr = h({
|
|
|
3056
3164
|
adjust: h.value
|
|
3057
3165
|
};
|
|
3058
3166
|
}
|
|
3059
|
-
function
|
|
3060
|
-
w.value &&
|
|
3167
|
+
function B() {
|
|
3168
|
+
w.value && H.value?.setSymbols([te(w.value), ...M.value.map(te)]);
|
|
3061
3169
|
}
|
|
3062
3170
|
function ne() {
|
|
3063
|
-
if (
|
|
3171
|
+
if (U.value.axisType === "percent") return;
|
|
3064
3172
|
let e = {
|
|
3065
|
-
...
|
|
3173
|
+
...U.value,
|
|
3066
3174
|
axisType: "percent"
|
|
3067
3175
|
};
|
|
3068
|
-
|
|
3176
|
+
U.value = e, H.value?.updateSettingsFacade(e);
|
|
3069
3177
|
try {
|
|
3070
|
-
localStorage.setItem(
|
|
3178
|
+
localStorage.setItem(ge, JSON.stringify(e));
|
|
3071
3179
|
} catch {}
|
|
3072
3180
|
}
|
|
3073
|
-
let
|
|
3074
|
-
|
|
3075
|
-
let
|
|
3076
|
-
controller:
|
|
3181
|
+
let V = T(null), re = T(null), ie = T(null), ae = T(null), oe = T(null), se = T(null);
|
|
3182
|
+
Ee(ie);
|
|
3183
|
+
let H = k(null), { chartTheme: le, chartSettings: U, tooltipColors: ue, themeCssVars: fe, handleSettingsChange: he, applyThemeFromSettings: W } = ln(H), _e = k(null), ve = T(0), ye = T(0), be = T(!1), xe = T([]), Se = T(0), G = T(1), K = T(d.initialZoomLevel ?? 1), q = T(0), Ce = T(1), we = T(0), Te = T({}), De = T(/* @__PURE__ */ new Map()), Oe = T(!1), ke = T("cursor"), { mainActiveIndicators: Ae, subActiveIndicators: je, activeIndicators: Me, indicatorParams: Ne, subPanes: Pe, buildPaneLayoutIntent: J, getDefaultParams: Fe, isSubPaneIndicator: Ie, addSubPane: Le, removeSubPane: Re, clearAllSubPanes: ze, initIndicatorsFromConfig: Ve, switchSubIndicator: He, handleIndicatorToggle: Ue, handleUpdateParams: We, handleReorderSubIndicators: Ge, setupIndicatorSubscriptions: Ke } = un(H, Te), { drawingController: Y, selectedDrawingId: qe, selectedDrawing: Je, drawings: Ye, handleSelectTool: Xe, onUpdateDrawingStyle: Ze, onDeleteDrawing: Qe, setupDrawing: $e } = dn(H), { rangeSelection: et, customStartDate: tt, customEndDate: nt, containerScrollLeft: rt, isRangeSelectActive: it, rangeSelectionReady: at, rangeSelectionBounds: ot, rangeSelectionCount: st, rangeSelectionStartLabel: ct, rangeSelectionEndLabel: lt, rangeSelectionOverlayStyle: ut, clearRangeSelection: dt, handleRangePointerDown: ft, handleRangePointerMove: pt, handleRangePointerUp: mt, exportRangeToCsv: ht, exportingProgress: gt, onEdgePointerDown: _t, onEdgePointerMove: vt, onEdgePointerUp: yt, onScroll: bt, syncScrollLeft: xt } = bn({
|
|
3184
|
+
controller: H,
|
|
3077
3185
|
activeToolId: ke,
|
|
3078
|
-
containerRef:
|
|
3079
|
-
dataVersion:
|
|
3080
|
-
viewportVersion:
|
|
3186
|
+
containerRef: V,
|
|
3187
|
+
dataVersion: ye,
|
|
3188
|
+
viewportVersion: Se,
|
|
3081
3189
|
dataFetcher: r(() => d.dataFetcher),
|
|
3082
|
-
batchStockCodes:
|
|
3083
|
-
}), St =
|
|
3084
|
-
|
|
3190
|
+
batchStockCodes: xe
|
|
3191
|
+
}), St = K.value;
|
|
3192
|
+
q.value = pe(St, {
|
|
3085
3193
|
minKWidth: d.minKWidth,
|
|
3086
3194
|
maxKWidth: d.maxKWidth,
|
|
3087
3195
|
zoomLevelCount: d.zoomLevels,
|
|
3088
|
-
dpr:
|
|
3089
|
-
}),
|
|
3196
|
+
dpr: G.value
|
|
3197
|
+
}), Ce.value = de(q.value, G.value);
|
|
3090
3198
|
function Ct() {}
|
|
3091
3199
|
function wt(e, t, n) {
|
|
3092
3200
|
let r = e.getBoundingClientRect();
|
|
@@ -3099,7 +3207,7 @@ var Zr = h({
|
|
|
3099
3207
|
e && g(() => {
|
|
3100
3208
|
if (!e.isConnected) return;
|
|
3101
3209
|
let t = wt(e, 180, 80);
|
|
3102
|
-
|
|
3210
|
+
H.value?.setTooltipSize(t);
|
|
3103
3211
|
});
|
|
3104
3212
|
}
|
|
3105
3213
|
function Et(e) {
|
|
@@ -3117,7 +3225,7 @@ var Zr = h({
|
|
|
3117
3225
|
function jt(e) {
|
|
3118
3226
|
return kt ||= e.getBoundingClientRect(), kt;
|
|
3119
3227
|
}
|
|
3120
|
-
let X =
|
|
3228
|
+
let X = k({
|
|
3121
3229
|
crosshairPos: null,
|
|
3122
3230
|
crosshairIndex: null,
|
|
3123
3231
|
crosshairPrice: null,
|
|
@@ -3139,7 +3247,7 @@ var Zr = h({
|
|
|
3139
3247
|
width: 220,
|
|
3140
3248
|
height: 120
|
|
3141
3249
|
}), Pt = r(() => {
|
|
3142
|
-
let e =
|
|
3250
|
+
let e = V.value, t = re.value;
|
|
3143
3251
|
return !e || !t ? {
|
|
3144
3252
|
x: 0,
|
|
3145
3253
|
y: 0
|
|
@@ -3147,48 +3255,48 @@ var Zr = h({
|
|
|
3147
3255
|
x: e.offsetLeft,
|
|
3148
3256
|
y: e.offsetTop
|
|
3149
3257
|
};
|
|
3150
|
-
}), Ft = r(() => X.value.hoveredMarkerData),
|
|
3258
|
+
}), Ft = r(() => X.value.hoveredMarkerData), It = r(() => X.value.hoveredCustomMarker), Rt = r(() => X.value.isDragging), zt = r(() => X.value.isResizingPaneBoundary), Bt = r(() => X.value.isHoveringPaneBoundary), Vt = r(() => X.value.hoveredPaneBoundaryId), Ht = r(() => X.value.isHoveringRightAxis), Ut = window.matchMedia("(pointer: coarse)").matches, Wt = r(() => X.value.hoveredIndex);
|
|
3151
3259
|
r(() => X.value.crosshairIndex);
|
|
3152
|
-
let
|
|
3260
|
+
let Gt = r(() => Rt.value ? "grabbing" : zt.value || Bt.value ? "ns-resize" : Wt.value === null ? "crosshair" : "pointer"), Kt = r(() => {
|
|
3153
3261
|
let e = X.value.hoveredIndex;
|
|
3154
3262
|
if (typeof e != "number") return null;
|
|
3155
|
-
|
|
3156
|
-
let t =
|
|
3263
|
+
ye.value;
|
|
3264
|
+
let t = H.value?.getData();
|
|
3157
3265
|
return t && e >= 0 && e < t.length ? t[e] : null;
|
|
3158
|
-
}),
|
|
3159
|
-
x:
|
|
3160
|
-
y:
|
|
3161
|
-
})),
|
|
3162
|
-
left: `${
|
|
3163
|
-
top: `${
|
|
3266
|
+
}), qt = r(() => X.value.hoveredIndex), Jt = r(() => X.value.tooltipPos), Yt = r(() => ({
|
|
3267
|
+
x: Jt.value.x + Pt.value.x,
|
|
3268
|
+
y: Jt.value.y + Pt.value.y
|
|
3269
|
+
})), Xt = r(() => ({
|
|
3270
|
+
left: `${Yt.value.x}px`,
|
|
3271
|
+
top: `${Yt.value.y}px`
|
|
3164
3272
|
})), Z = r(() => ({
|
|
3165
3273
|
x: Dt.value.x + Pt.value.x,
|
|
3166
3274
|
y: Dt.value.y + Pt.value.y
|
|
3167
|
-
})),
|
|
3275
|
+
})), Qt = r(() => ({
|
|
3168
3276
|
left: `${Z.value.x}px`,
|
|
3169
3277
|
top: `${Z.value.y}px`
|
|
3170
|
-
})),
|
|
3171
|
-
let e =
|
|
3278
|
+
})), $t = r(() => X.value.tooltipAnchorPlacement), tn = r(() => {
|
|
3279
|
+
let e = H.value?.viewport.peek(), t = V.value, n = e?.plotWidth ?? (t ? t.clientWidth : 0);
|
|
3172
3280
|
return Dt.value.x + 12 + Nt.value.width + 12 > n ? "left-bottom" : "right-bottom";
|
|
3173
|
-
}),
|
|
3174
|
-
function
|
|
3175
|
-
|
|
3281
|
+
}), nn = r(() => (ye.value, H.value?.getData() ?? []));
|
|
3282
|
+
function rn() {
|
|
3283
|
+
se.value?.toggleMenu();
|
|
3176
3284
|
}
|
|
3177
|
-
function
|
|
3178
|
-
|
|
3285
|
+
function on(e) {
|
|
3286
|
+
xe.value = e;
|
|
3179
3287
|
}
|
|
3180
|
-
function
|
|
3288
|
+
function sn(e) {
|
|
3181
3289
|
if (ke.value = e, e === "range-select") {
|
|
3182
|
-
|
|
3290
|
+
Y.value?.setTool("cursor"), qe.value = null;
|
|
3183
3291
|
return;
|
|
3184
3292
|
}
|
|
3185
|
-
dt(),
|
|
3293
|
+
dt(), Xe(e);
|
|
3186
3294
|
}
|
|
3187
|
-
function
|
|
3188
|
-
|
|
3295
|
+
function fn(e) {
|
|
3296
|
+
H.value?.handlePointerEvent(e, { onPointerDown: (e, t) => !!(ft(e, t) || Y.value?.onPointerDown(e, t)) });
|
|
3189
3297
|
}
|
|
3190
|
-
function
|
|
3191
|
-
let t =
|
|
3298
|
+
function pn(e) {
|
|
3299
|
+
let t = V.value;
|
|
3192
3300
|
if (t) {
|
|
3193
3301
|
let n = jt(t);
|
|
3194
3302
|
Dt.value = {
|
|
@@ -3196,53 +3304,53 @@ var Zr = h({
|
|
|
3196
3304
|
y: e.clientY - n.top
|
|
3197
3305
|
};
|
|
3198
3306
|
}
|
|
3199
|
-
|
|
3200
|
-
}
|
|
3201
|
-
function dn(e) {
|
|
3202
|
-
U.value?.handlePointerEvent(e, { onPointerUp: (e, t) => !!(mt(e, t) || qe.value?.onPointerUp(e, t)) });
|
|
3203
|
-
}
|
|
3204
|
-
function pn(e) {
|
|
3205
|
-
U.value?.handlePointerEvent(e);
|
|
3307
|
+
H.value?.handlePointerEvent(e, { onPointerMove: (e, t) => pt(e, t) ? !0 : Y.value?.onPointerMove(e, t) ? (Ye.value = Y.value.getDrawings(), !0) : !1 });
|
|
3206
3308
|
}
|
|
3207
3309
|
function mn(e) {
|
|
3208
|
-
|
|
3310
|
+
H.value?.handlePointerEvent(e, { onPointerUp: (e, t) => !!(mt(e, t) || Y.value?.onPointerUp(e, t)) });
|
|
3209
3311
|
}
|
|
3210
3312
|
function hn(e) {
|
|
3211
|
-
|
|
3313
|
+
H.value?.handlePointerEvent(e);
|
|
3212
3314
|
}
|
|
3213
3315
|
function gn(e) {
|
|
3214
|
-
|
|
3316
|
+
H.value?.handlePointerEvent(e);
|
|
3215
3317
|
}
|
|
3216
3318
|
function _n(e) {
|
|
3217
|
-
|
|
3319
|
+
H.value?.handlePointerEvent(e);
|
|
3218
3320
|
}
|
|
3219
|
-
function vn() {
|
|
3220
|
-
|
|
3321
|
+
function vn(e) {
|
|
3322
|
+
H.value?.handlePointerEvent(e);
|
|
3221
3323
|
}
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3324
|
+
function yn(e) {
|
|
3325
|
+
H.value?.handlePointerEvent(e);
|
|
3326
|
+
}
|
|
3327
|
+
function xn() {
|
|
3328
|
+
bt(), H.value?.handleScrollEvent();
|
|
3329
|
+
}
|
|
3330
|
+
let Sn = r(() => d.rightAxisWidth + d.priceLabelWidth), Cn = r(() => (ye.value, we.value, q.value, Ce.value, G.value, H.value?.getContentWidth() ?? 0));
|
|
3331
|
+
function wn(e, t) {
|
|
3332
|
+
H.value?.zoomToLevel(e, t);
|
|
3225
3333
|
}
|
|
3226
3334
|
c({
|
|
3227
3335
|
scheduleRender: Ct,
|
|
3228
|
-
addSubPane:
|
|
3229
|
-
removeSubPane:
|
|
3336
|
+
addSubPane: Le,
|
|
3337
|
+
removeSubPane: Re,
|
|
3230
3338
|
switchSubIndicator: He,
|
|
3231
|
-
clearAllSubPanes:
|
|
3232
|
-
zoomToLevel:
|
|
3233
|
-
zoomIn: (e) =>
|
|
3234
|
-
zoomOut: (e) =>
|
|
3235
|
-
getZoomLevel: () =>
|
|
3236
|
-
getZoomLevelCount: () =>
|
|
3237
|
-
getController: () =>
|
|
3339
|
+
clearAllSubPanes: ze,
|
|
3340
|
+
zoomToLevel: wn,
|
|
3341
|
+
zoomIn: (e) => wn(K.value + 1, e),
|
|
3342
|
+
zoomOut: (e) => wn(K.value - 1, e),
|
|
3343
|
+
getZoomLevel: () => K.value,
|
|
3344
|
+
getZoomLevelCount: () => H.value?.getZoomLevelCount() ?? 10,
|
|
3345
|
+
getController: () => H.value
|
|
3238
3346
|
});
|
|
3239
|
-
function
|
|
3347
|
+
function Tn() {
|
|
3240
3348
|
return (e) => {
|
|
3241
|
-
e.preventDefault(),
|
|
3349
|
+
e.preventDefault(), H.value?.handleWheelEvent(e);
|
|
3242
3350
|
};
|
|
3243
3351
|
}
|
|
3244
|
-
function
|
|
3245
|
-
return
|
|
3352
|
+
function En(e, t, n, r) {
|
|
3353
|
+
return ce({
|
|
3246
3354
|
container: e,
|
|
3247
3355
|
data: [],
|
|
3248
3356
|
canvasLayer: t,
|
|
@@ -3259,10 +3367,10 @@ var Zr = h({
|
|
|
3259
3367
|
mcp: d.mcp
|
|
3260
3368
|
});
|
|
3261
3369
|
}
|
|
3262
|
-
function
|
|
3370
|
+
function Dn(e) {
|
|
3263
3371
|
let t = e.paneLayout.subscribe(() => {
|
|
3264
3372
|
At();
|
|
3265
|
-
let t =
|
|
3373
|
+
let t = V.value && parseInt(getComputedStyle(V.value).borderTopWidth) || 0;
|
|
3266
3374
|
Mt.value = e.paneLayout.peek().slice(0, -1).map((n) => {
|
|
3267
3375
|
let r = e.getPaneInfo(n.id), i = (r?.top ?? 0) + (r?.height ?? 0);
|
|
3268
3376
|
return {
|
|
@@ -3271,17 +3379,17 @@ var Zr = h({
|
|
|
3271
3379
|
};
|
|
3272
3380
|
});
|
|
3273
3381
|
}), n = e.paneRatios.subscribe(() => {
|
|
3274
|
-
|
|
3382
|
+
Te.value = { ...e.paneRatios.peek() };
|
|
3275
3383
|
}), r = e.viewport.subscribe(() => {
|
|
3276
3384
|
let t = e.viewport.peek();
|
|
3277
|
-
|
|
3385
|
+
Se.value++, G.value !== t.dpr && (G.value = t.dpr), we.value !== t.plotWidth && (we.value = t.plotWidth), (K.value !== t.zoomLevel || q.value !== t.kWidth || Ce.value !== t.kGap) && (K.value = t.zoomLevel, q.value = t.kWidth, Ce.value = t.kGap), g(() => {
|
|
3278
3386
|
requestAnimationFrame(() => {
|
|
3279
3387
|
xt();
|
|
3280
3388
|
});
|
|
3281
3389
|
});
|
|
3282
3390
|
}), i = e.data.subscribe(() => {
|
|
3283
3391
|
let t = e.data.peek();
|
|
3284
|
-
|
|
3392
|
+
ve.value = t.length, ye.value++, O.value = t.length === 0;
|
|
3285
3393
|
}), a = e.dataLoading.subscribe(() => {
|
|
3286
3394
|
D.value = e.dataLoading.peek();
|
|
3287
3395
|
}), o = e.theme.subscribe(() => {
|
|
@@ -3296,62 +3404,62 @@ var Zr = h({
|
|
|
3296
3404
|
r(), i(), a(), n(), t(), o(), s(), c(), l();
|
|
3297
3405
|
});
|
|
3298
3406
|
}
|
|
3299
|
-
function
|
|
3407
|
+
function On(e) {
|
|
3300
3408
|
let t = oe.value?.getSettings() ?? { showVolumePriceMarkers: !0 };
|
|
3301
|
-
|
|
3409
|
+
U.value = t, W(t.theme), e.updateSettingsFacade(t);
|
|
3302
3410
|
}
|
|
3303
|
-
function
|
|
3411
|
+
function kn(e) {
|
|
3304
3412
|
e.setTooltipAnchorPositioning(Ot.value), e.interactionState.subscribe(() => {
|
|
3305
3413
|
X.value = e.interactionState.peek();
|
|
3306
|
-
}), X.value = e.interactionState.peek(),
|
|
3414
|
+
}), X.value = e.interactionState.peek(), G.value = e.viewport.peek().dpr;
|
|
3307
3415
|
}
|
|
3308
|
-
function
|
|
3309
|
-
e.setDataFetcher(d.dataFetcher),
|
|
3416
|
+
function An(e) {
|
|
3417
|
+
e.setDataFetcher(d.dataFetcher), _e.value = new me(e), _e.value.on("config:error", (e) => {
|
|
3310
3418
|
console.error("Semantic config error:", e);
|
|
3311
|
-
}),
|
|
3312
|
-
Ve(d.semanticConfig), g(() =>
|
|
3419
|
+
}), _e.value.on("config:ready", () => {
|
|
3420
|
+
Ve(d.semanticConfig), g(() => H.value?.scrollToRight());
|
|
3313
3421
|
});
|
|
3314
3422
|
}
|
|
3315
3423
|
return b(async () => {
|
|
3316
3424
|
Ot.value = !1;
|
|
3317
|
-
let e =
|
|
3425
|
+
let e = V.value, t = re.value;
|
|
3318
3426
|
if (!e || !t) return;
|
|
3319
|
-
let n =
|
|
3427
|
+
let n = Tn();
|
|
3320
3428
|
e.addEventListener("wheel", n, { passive: !1 });
|
|
3321
|
-
let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a = await
|
|
3322
|
-
!
|
|
3429
|
+
let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a = await En(e, r, t.querySelector(".right-axis-host"), i);
|
|
3430
|
+
!V.value || !re.value || (H.value = a, Dn(a), Ve(d.semanticConfig), On(a), $e(a), kn(a), An(a));
|
|
3323
3431
|
}), S(() => {
|
|
3324
|
-
let e =
|
|
3325
|
-
e && (
|
|
3326
|
-
}),
|
|
3327
|
-
|
|
3328
|
-
}),
|
|
3432
|
+
let e = H.value;
|
|
3433
|
+
e && (H.value = null, e.dispose()), Y.value = null;
|
|
3434
|
+
}), P(() => d.yPaddingPx, (e) => {
|
|
3435
|
+
H.value?.updateOptionsFacade({ yPaddingPx: e });
|
|
3436
|
+
}), P(() => d.semanticConfig, async (e, t) => {
|
|
3329
3437
|
if (e && e !== t) {
|
|
3330
|
-
let t = await
|
|
3438
|
+
let t = await _e.value?.applyConfig(e);
|
|
3331
3439
|
t && !t.success && console.error("Semantic config apply failed:", t.errors);
|
|
3332
3440
|
}
|
|
3333
3441
|
}, { deep: !0 }), (r, c) => (C(), o("div", {
|
|
3334
3442
|
ref_key: "chartWrapperRef",
|
|
3335
3443
|
ref: ie,
|
|
3336
3444
|
class: "chart-wrapper",
|
|
3337
|
-
"data-theme":
|
|
3338
|
-
style: v(
|
|
3445
|
+
"data-theme": j(le),
|
|
3446
|
+
style: v(j(fe))
|
|
3339
3447
|
}, [
|
|
3340
|
-
l(
|
|
3448
|
+
l(Ii, {
|
|
3341
3449
|
symbol: x.value,
|
|
3342
3450
|
"k-line-level": p.value,
|
|
3343
3451
|
"k-line-adjust": h.value,
|
|
3344
3452
|
"symbol-loading": D.value,
|
|
3345
|
-
"symbol-error":
|
|
3346
|
-
"overlay-symbols":
|
|
3453
|
+
"symbol-error": O.value,
|
|
3454
|
+
"overlay-symbols": A.value,
|
|
3347
3455
|
"comparison-colors": De.value,
|
|
3348
3456
|
"comparison-loading": Oe.value,
|
|
3349
|
-
onAddOverlaySymbol:
|
|
3350
|
-
onRemoveOverlaySymbol:
|
|
3351
|
-
onKLineLevelChange:
|
|
3352
|
-
onKLineAdjustChange:
|
|
3353
|
-
onToggleIndicator:
|
|
3354
|
-
onSymbolChange:
|
|
3457
|
+
onAddOverlaySymbol: z,
|
|
3458
|
+
onRemoveOverlaySymbol: ee,
|
|
3459
|
+
onKLineLevelChange: N,
|
|
3460
|
+
onKLineAdjustChange: I,
|
|
3461
|
+
onToggleIndicator: rn,
|
|
3462
|
+
onSymbolChange: L
|
|
3355
3463
|
}, null, 8, [
|
|
3356
3464
|
"symbol",
|
|
3357
3465
|
"k-line-level",
|
|
@@ -3367,16 +3475,16 @@ var Zr = h({
|
|
|
3367
3475
|
"is-resizing-pane": zt.value,
|
|
3368
3476
|
"is-hovering-pane-separator": Bt.value,
|
|
3369
3477
|
"is-hovering-right-axis": Ht.value,
|
|
3370
|
-
"is-hovering-kline":
|
|
3371
|
-
}]) }, [l(
|
|
3478
|
+
"is-hovering-kline": Wt.value !== null
|
|
3479
|
+
}]) }, [l(Zr, {
|
|
3372
3480
|
ref_key: "toolbarRef",
|
|
3373
3481
|
ref: oe,
|
|
3374
3482
|
"is-fullscreen": n.isFullscreen,
|
|
3375
|
-
onSelectTool:
|
|
3483
|
+
onSelectTool: sn,
|
|
3376
3484
|
onToggleFullscreen: c[0] ||= (e) => r.$emit("toggleFullscreen"),
|
|
3377
|
-
onZoomIn: c[1] ||= (e) =>
|
|
3378
|
-
onZoomOut: c[2] ||= (e) =>
|
|
3379
|
-
onSettingsChange:
|
|
3485
|
+
onZoomIn: c[1] ||= (e) => wn(K.value + 1),
|
|
3486
|
+
onZoomOut: c[2] ||= (e) => wn(K.value - 1),
|
|
3487
|
+
onSettingsChange: j(he)
|
|
3380
3488
|
}, null, 8, ["is-fullscreen", "onSettingsChange"]), s("div", {
|
|
3381
3489
|
class: "chart-main",
|
|
3382
3490
|
ref_key: "chartMainRef",
|
|
@@ -3394,122 +3502,92 @@ var Zr = h({
|
|
|
3394
3502
|
}, null, 512),
|
|
3395
3503
|
s("div", {
|
|
3396
3504
|
class: "chart-container",
|
|
3397
|
-
style: v({ cursor:
|
|
3505
|
+
style: v({ cursor: Gt.value }),
|
|
3398
3506
|
ref_key: "containerRef",
|
|
3399
|
-
ref:
|
|
3400
|
-
onScrollPassive:
|
|
3401
|
-
onPointerdown:
|
|
3402
|
-
onPointermove:
|
|
3403
|
-
onPointerup:
|
|
3404
|
-
onPointerleave:
|
|
3507
|
+
ref: V,
|
|
3508
|
+
onScrollPassive: xn,
|
|
3509
|
+
onPointerdown: fn,
|
|
3510
|
+
onPointermove: pn,
|
|
3511
|
+
onPointerup: mn,
|
|
3512
|
+
onPointerleave: hn
|
|
3405
3513
|
}, [s("div", {
|
|
3406
3514
|
class: "scroll-content",
|
|
3407
|
-
style: v({ width:
|
|
3408
|
-
}, [s("div", Gi, [
|
|
3409
|
-
|
|
3410
|
-
A(Ye) ? (C(), i(Pe, {
|
|
3515
|
+
style: v({ width: Cn.value + "px" })
|
|
3516
|
+
}, [s("div", Gi, [s("canvas", Ki, null, 512), l(cn, null, {
|
|
3517
|
+
default: F(() => [j(at) ? (C(), i(an, {
|
|
3411
3518
|
key: 0,
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3519
|
+
"start-date": j(tt),
|
|
3520
|
+
"onUpdate:startDate": c[3] ||= (e) => m(tt) ? tt.value = e : null,
|
|
3521
|
+
"end-date": j(nt),
|
|
3522
|
+
"onUpdate:endDate": c[4] ||= (e) => m(nt) ? nt.value = e : null,
|
|
3523
|
+
"start-label": j(ct),
|
|
3524
|
+
"end-label": j(lt),
|
|
3525
|
+
count: j(st),
|
|
3526
|
+
onExport: j(ht),
|
|
3527
|
+
onClear: j(dt),
|
|
3528
|
+
onBatchSetting: c[5] ||= (e) => be.value = !0
|
|
3529
|
+
}, null, 8, [
|
|
3530
|
+
"start-date",
|
|
3531
|
+
"end-date",
|
|
3532
|
+
"start-label",
|
|
3533
|
+
"end-label",
|
|
3534
|
+
"count",
|
|
3535
|
+
"onExport",
|
|
3536
|
+
"onClear"
|
|
3537
|
+
])) : a("", !0), j(Je) ? (C(), i(Be, {
|
|
3538
|
+
key: 1,
|
|
3539
|
+
drawing: j(Je),
|
|
3540
|
+
onUpdateStyle: j(Ze),
|
|
3541
|
+
onDelete: j(Qe)
|
|
3415
3542
|
}, null, 8, [
|
|
3416
3543
|
"drawing",
|
|
3417
3544
|
"onUpdateStyle",
|
|
3418
3545
|
"onDelete"
|
|
3419
|
-
])) : a("", !0),
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
class: "range-selection-export",
|
|
3423
|
-
onPointerdown: c[8] ||= L(() => {}, ["stop"]),
|
|
3424
|
-
onPointermove: c[9] ||= L(() => {}, ["stop"]),
|
|
3425
|
-
onPointerup: c[10] ||= L(() => {}, ["stop"])
|
|
3426
|
-
}, [
|
|
3427
|
-
F(s("input", {
|
|
3428
|
-
class: "range-selection-export__label",
|
|
3429
|
-
"onUpdate:modelValue": c[3] ||= (e) => m(nt) ? nt.value = e : null,
|
|
3430
|
-
placeholder: A(ct)
|
|
3431
|
-
}, null, 8, qi), [[M, A(nt)]]),
|
|
3432
|
-
c[20] ||= s("span", { class: "range-selection-export__sep" }, "~", -1),
|
|
3433
|
-
F(s("input", {
|
|
3434
|
-
class: "range-selection-export__label",
|
|
3435
|
-
"onUpdate:modelValue": c[4] ||= (e) => m(rt) ? rt.value = e : null,
|
|
3436
|
-
placeholder: A(lt)
|
|
3437
|
-
}, null, 8, Ji), [[M, A(rt)]]),
|
|
3438
|
-
s("button", {
|
|
3439
|
-
type: "button",
|
|
3440
|
-
class: "toolbar-btn",
|
|
3441
|
-
title: "批量设置",
|
|
3442
|
-
onClick: c[5] ||= L((e) => xe.value = !0, ["stop"])
|
|
3443
|
-
}, " 批量设置 "),
|
|
3444
|
-
s("button", {
|
|
3445
|
-
type: "button",
|
|
3446
|
-
class: "toolbar-btn",
|
|
3447
|
-
title: "导出",
|
|
3448
|
-
onClick: c[6] ||= L((...e) => A(ht) && A(ht)(...e), ["stop"])
|
|
3449
|
-
}, " 导出 "),
|
|
3450
|
-
s("button", {
|
|
3451
|
-
type: "button",
|
|
3452
|
-
class: "toolbar-btn delete-btn",
|
|
3453
|
-
title: "删除选区",
|
|
3454
|
-
onClick: c[7] ||= L((...e) => A(dt) && A(dt)(...e), ["stop"])
|
|
3455
|
-
}, [...c[19] ||= [s("svg", {
|
|
3456
|
-
class: "delete-icon",
|
|
3457
|
-
viewBox: "0 0 24 24",
|
|
3458
|
-
fill: "none",
|
|
3459
|
-
stroke: "currentColor",
|
|
3460
|
-
"stroke-width": "2",
|
|
3461
|
-
"stroke-linecap": "round",
|
|
3462
|
-
"stroke-linejoin": "round",
|
|
3463
|
-
"aria-hidden": "true"
|
|
3464
|
-
}, [
|
|
3465
|
-
s("path", { d: "M3 6h18" }),
|
|
3466
|
-
s("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
|
|
3467
|
-
s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
|
|
3468
|
-
], -1)]])
|
|
3469
|
-
], 32)) : a("", !0)
|
|
3470
|
-
], 512), A(ut) ? (C(), o("div", {
|
|
3546
|
+
])) : a("", !0)]),
|
|
3547
|
+
_: 1
|
|
3548
|
+
})], 512), j(ut) ? (C(), o("div", {
|
|
3471
3549
|
key: 0,
|
|
3472
|
-
class: _(["range-selection-overlay", { "is-dragging":
|
|
3473
|
-
style: v(
|
|
3550
|
+
class: _(["range-selection-overlay", { "is-dragging": j(et).isDragging }]),
|
|
3551
|
+
style: v(j(ut)),
|
|
3474
3552
|
"aria-label": "已选择的 K 线区间"
|
|
3475
|
-
}, [
|
|
3553
|
+
}, [j(at) ? (C(), o("div", {
|
|
3476
3554
|
key: 0,
|
|
3477
3555
|
class: "range-selection-handle range-selection-handle--left",
|
|
3478
|
-
onPointerdown: c[
|
|
3479
|
-
onPointermove: c[
|
|
3480
|
-
onPointerup: c[
|
|
3481
|
-
}, null, 32)) : a("", !0),
|
|
3556
|
+
onPointerdown: c[6] ||= R((e) => j(_t)("left", e), ["stop"]),
|
|
3557
|
+
onPointermove: c[7] ||= R((e) => j(vt)(e), ["stop"]),
|
|
3558
|
+
onPointerup: c[8] ||= R((e) => j(yt)(e), ["stop"])
|
|
3559
|
+
}, null, 32)) : a("", !0), j(at) ? (C(), o("div", {
|
|
3482
3560
|
key: 1,
|
|
3483
3561
|
class: "range-selection-handle range-selection-handle--right",
|
|
3484
|
-
onPointerdown: c[
|
|
3485
|
-
onPointermove: c[
|
|
3486
|
-
onPointerup: c[
|
|
3562
|
+
onPointerdown: c[9] ||= R((e) => j(_t)("right", e), ["stop"]),
|
|
3563
|
+
onPointermove: c[10] ||= R((e) => j(vt)(e), ["stop"]),
|
|
3564
|
+
onPointerup: c[11] ||= R((e) => j(yt)(e), ["stop"])
|
|
3487
3565
|
}, null, 32)) : a("", !0)], 6)) : a("", !0)], 4)], 36),
|
|
3488
3566
|
ae.value ? (C(), i(t, {
|
|
3489
3567
|
key: 0,
|
|
3490
3568
|
to: ae.value
|
|
3491
3569
|
}, [
|
|
3492
|
-
|
|
3570
|
+
Kt.value && !j(Ut) ? (C(), o("div", {
|
|
3493
3571
|
key: 0,
|
|
3494
3572
|
class: _(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": Ot.value }]),
|
|
3495
|
-
style: v(
|
|
3573
|
+
style: v(Xt.value)
|
|
3496
3574
|
}, null, 6)) : a("", !0),
|
|
3497
|
-
Ft.value ||
|
|
3575
|
+
Ft.value || It.value ? (C(), o("div", {
|
|
3498
3576
|
key: 1,
|
|
3499
3577
|
class: _(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": Ot.value }]),
|
|
3500
|
-
style: v(
|
|
3578
|
+
style: v(Qt.value)
|
|
3501
3579
|
}, null, 6)) : a("", !0),
|
|
3502
|
-
|
|
3580
|
+
Kt.value && !j(Ut) ? (C(), i(Zt, {
|
|
3503
3581
|
key: 2,
|
|
3504
|
-
k:
|
|
3505
|
-
index:
|
|
3506
|
-
data:
|
|
3507
|
-
pos:
|
|
3582
|
+
k: Kt.value,
|
|
3583
|
+
index: qt.value,
|
|
3584
|
+
data: nn.value,
|
|
3585
|
+
pos: Yt.value,
|
|
3508
3586
|
"set-el": Tt,
|
|
3509
3587
|
"use-anchor": Ot.value,
|
|
3510
|
-
"anchor-placement":
|
|
3511
|
-
"up-color":
|
|
3512
|
-
"down-color":
|
|
3588
|
+
"anchor-placement": $t.value,
|
|
3589
|
+
"up-color": j(ue).upColor,
|
|
3590
|
+
"down-color": j(ue).downColor,
|
|
3513
3591
|
timezone: d.timezone,
|
|
3514
3592
|
"show-time": y.value
|
|
3515
3593
|
}, null, 8, [
|
|
@@ -3524,12 +3602,12 @@ var Zr = h({
|
|
|
3524
3602
|
"timezone",
|
|
3525
3603
|
"show-time"
|
|
3526
3604
|
])) : a("", !0),
|
|
3527
|
-
Ft.value ||
|
|
3605
|
+
Ft.value || It.value ? (C(), i(en, {
|
|
3528
3606
|
key: 3,
|
|
3529
|
-
marker: Ft.value ||
|
|
3607
|
+
marker: Ft.value || It.value,
|
|
3530
3608
|
pos: Z.value,
|
|
3531
3609
|
"use-anchor": Ot.value,
|
|
3532
|
-
"anchor-placement":
|
|
3610
|
+
"anchor-placement": tn.value,
|
|
3533
3611
|
"set-el": Et
|
|
3534
3612
|
}, null, 8, [
|
|
3535
3613
|
"marker",
|
|
@@ -3541,30 +3619,30 @@ var Zr = h({
|
|
|
3541
3619
|
s("div", {
|
|
3542
3620
|
class: "right-axis-host",
|
|
3543
3621
|
ref: "rightAxisLayerRef",
|
|
3544
|
-
style: v({ width:
|
|
3545
|
-
onPointerdown:
|
|
3546
|
-
onPointermove:
|
|
3547
|
-
onPointerup:
|
|
3548
|
-
onPointerleave:
|
|
3622
|
+
style: v({ width: Sn.value + "px" }),
|
|
3623
|
+
onPointerdown: gn,
|
|
3624
|
+
onPointermove: _n,
|
|
3625
|
+
onPointerup: vn,
|
|
3626
|
+
onPointerleave: yn
|
|
3549
3627
|
}, null, 36)
|
|
3550
3628
|
], 512)], 2),
|
|
3551
3629
|
l(Hi, {
|
|
3552
|
-
progress:
|
|
3553
|
-
onClose: c[
|
|
3630
|
+
progress: j(gt),
|
|
3631
|
+
onClose: c[12] ||= (e) => gt.value = null
|
|
3554
3632
|
}, null, 8, ["progress"]),
|
|
3555
|
-
l(
|
|
3556
|
-
show:
|
|
3557
|
-
onClose: c[
|
|
3558
|
-
onApply:
|
|
3633
|
+
l(Li, {
|
|
3634
|
+
show: be.value,
|
|
3635
|
+
onClose: c[13] ||= (e) => be.value = !1,
|
|
3636
|
+
onApply: on
|
|
3559
3637
|
}, null, 8, ["show"]),
|
|
3560
|
-
l(
|
|
3638
|
+
l(Lt, {
|
|
3561
3639
|
ref_key: "indicatorSelectorRef",
|
|
3562
|
-
ref:
|
|
3563
|
-
"active-indicators":
|
|
3564
|
-
"indicator-params":
|
|
3565
|
-
onToggle:
|
|
3566
|
-
onUpdateParams:
|
|
3567
|
-
onReorderSubIndicators:
|
|
3640
|
+
ref: se,
|
|
3641
|
+
"active-indicators": j(Me),
|
|
3642
|
+
"indicator-params": j(Ne),
|
|
3643
|
+
onToggle: j(Ue),
|
|
3644
|
+
onUpdateParams: j(We),
|
|
3645
|
+
onReorderSubIndicators: j(Ge)
|
|
3568
3646
|
}, null, 8, [
|
|
3569
3647
|
"active-indicators",
|
|
3570
3648
|
"indicator-params",
|
|
@@ -3574,9 +3652,9 @@ var Zr = h({
|
|
|
3574
3652
|
])
|
|
3575
3653
|
], 12, Ui));
|
|
3576
3654
|
}
|
|
3577
|
-
}), [["__scopeId", "data-v-
|
|
3655
|
+
}), [["__scopeId", "data-v-44244ba7"]]), Ji = {
|
|
3578
3656
|
name: "@363045841yyt/klinechart",
|
|
3579
|
-
version: "0.8.
|
|
3657
|
+
version: "0.8.6",
|
|
3580
3658
|
description: "Vue 3 bindings for @363045841yyt/klinechart-core. Idiomatic composables, SFC components.",
|
|
3581
3659
|
license: "MIT",
|
|
3582
3660
|
repository: {
|
|
@@ -3649,25 +3727,25 @@ var Zr = h({
|
|
|
3649
3727
|
vitest: "^4.1.8",
|
|
3650
3728
|
vue: "^3.5.35"
|
|
3651
3729
|
}
|
|
3652
|
-
}.version,
|
|
3653
|
-
function
|
|
3654
|
-
|
|
3730
|
+
}.version, Yi = null;
|
|
3731
|
+
function Xi(e) {
|
|
3732
|
+
Yi = e;
|
|
3655
3733
|
}
|
|
3656
|
-
function
|
|
3734
|
+
function Zi(e) {
|
|
3657
3735
|
if (e.container == null) throw Error("[@363045841yyt/klinechart] createChart: `container` is required and must be a non-null HTMLElement");
|
|
3658
|
-
if (
|
|
3659
|
-
return
|
|
3736
|
+
if (Yi === null) throw Error("[@363045841yyt/klinechart] createChart: no ChartController factory registered. Call __setControllerFactory(...) before mounting (the core package wires this in production).");
|
|
3737
|
+
return Yi(e);
|
|
3660
3738
|
}
|
|
3661
3739
|
function $(e) {
|
|
3662
|
-
let t =
|
|
3740
|
+
let t = k(e.peek());
|
|
3663
3741
|
return x(e.subscribe(() => {
|
|
3664
3742
|
t.value = e.peek();
|
|
3665
3743
|
})), t;
|
|
3666
3744
|
}
|
|
3667
|
-
function
|
|
3668
|
-
let n =
|
|
3745
|
+
function Qi(e, t) {
|
|
3746
|
+
let n = k(null), r = !1, i = (e) => {
|
|
3669
3747
|
if (e == null || n.value != null) return;
|
|
3670
|
-
let i =
|
|
3748
|
+
let i = Zi({
|
|
3671
3749
|
...t,
|
|
3672
3750
|
container: e
|
|
3673
3751
|
}), a = (e) => {
|
|
@@ -3680,7 +3758,7 @@ function ea(e, t) {
|
|
|
3680
3758
|
typeof i.then == "function" ? i.then(a) : a(i);
|
|
3681
3759
|
};
|
|
3682
3760
|
i(e.value);
|
|
3683
|
-
let a =
|
|
3761
|
+
let a = P(e, (e) => {
|
|
3684
3762
|
i(e);
|
|
3685
3763
|
}, {
|
|
3686
3764
|
immediate: !0,
|
|
@@ -3692,8 +3770,8 @@ function ea(e, t) {
|
|
|
3692
3770
|
};
|
|
3693
3771
|
return x(o), y(o), { chart: n };
|
|
3694
3772
|
}
|
|
3695
|
-
function
|
|
3696
|
-
let t =
|
|
3773
|
+
function $i(e) {
|
|
3774
|
+
let t = k(e.indicators.peek());
|
|
3697
3775
|
return x(e.indicators.subscribe(() => {
|
|
3698
3776
|
t.value = e.indicators.peek();
|
|
3699
3777
|
})), {
|
|
@@ -3703,26 +3781,26 @@ function ta(e) {
|
|
|
3703
3781
|
updateParams: e.updateIndicatorParams.bind(e)
|
|
3704
3782
|
};
|
|
3705
3783
|
}
|
|
3706
|
-
function
|
|
3707
|
-
let t =
|
|
3784
|
+
function ea(e) {
|
|
3785
|
+
let t = k(e.interactionState.peek());
|
|
3708
3786
|
return x(e.interactionState.subscribe(() => {
|
|
3709
3787
|
t.value = e.interactionState.peek();
|
|
3710
3788
|
})), t;
|
|
3711
3789
|
}
|
|
3712
|
-
function
|
|
3713
|
-
let t =
|
|
3790
|
+
function ta(e) {
|
|
3791
|
+
let t = k(e.paneRatios.peek());
|
|
3714
3792
|
return x(e.paneRatios.subscribe(() => {
|
|
3715
3793
|
t.value = e.paneRatios.peek();
|
|
3716
3794
|
})), t;
|
|
3717
3795
|
}
|
|
3718
|
-
function
|
|
3719
|
-
let t =
|
|
3796
|
+
function na(e) {
|
|
3797
|
+
let t = k(e.viewport.peek());
|
|
3720
3798
|
return x(e.viewport.subscribe(() => {
|
|
3721
3799
|
t.value = e.viewport.peek();
|
|
3722
3800
|
})), t;
|
|
3723
3801
|
}
|
|
3724
|
-
function
|
|
3725
|
-
let t =
|
|
3802
|
+
function ra(e) {
|
|
3803
|
+
let t = B({ catalog: e.catalog });
|
|
3726
3804
|
x(() => t.dispose());
|
|
3727
3805
|
let n = $(t.filteredMain), r = $(t.filteredSub), i = $(t.menuOpen), a = $(t.searchQuery);
|
|
3728
3806
|
function o(t) {
|
|
@@ -3750,7 +3828,7 @@ function aa(e) {
|
|
|
3750
3828
|
isActive: c
|
|
3751
3829
|
};
|
|
3752
3830
|
}
|
|
3753
|
-
var
|
|
3831
|
+
var ia = u({
|
|
3754
3832
|
name: "KLineChart",
|
|
3755
3833
|
props: {
|
|
3756
3834
|
data: {
|
|
@@ -3779,7 +3857,7 @@ var oa = u({
|
|
|
3779
3857
|
zoomLevelChange: (e, t) => !0
|
|
3780
3858
|
},
|
|
3781
3859
|
setup(e, { emit: t, expose: n }) {
|
|
3782
|
-
let r =
|
|
3860
|
+
let r = k(null), i = d(), a = k(null), o = !0, s = (e) => {
|
|
3783
3861
|
if (!o) {
|
|
3784
3862
|
e.dispose();
|
|
3785
3863
|
return;
|
|
@@ -3794,7 +3872,7 @@ var oa = u({
|
|
|
3794
3872
|
b(() => {
|
|
3795
3873
|
let t = r.value;
|
|
3796
3874
|
t != null && (i.run(() => {
|
|
3797
|
-
let n =
|
|
3875
|
+
let n = Zi({
|
|
3798
3876
|
container: t,
|
|
3799
3877
|
data: e.data,
|
|
3800
3878
|
initialZoomLevel: e.initialZoomLevel,
|
|
@@ -3802,9 +3880,9 @@ var oa = u({
|
|
|
3802
3880
|
theme: e.theme
|
|
3803
3881
|
});
|
|
3804
3882
|
typeof n.then == "function" ? n.then(s) : s(n);
|
|
3805
|
-
}),
|
|
3883
|
+
}), P(() => e.data, (e) => {
|
|
3806
3884
|
a.value?.setData(e);
|
|
3807
|
-
}),
|
|
3885
|
+
}), P(() => e.theme, (e) => {
|
|
3808
3886
|
a.value?.setTheme(e);
|
|
3809
3887
|
}));
|
|
3810
3888
|
}), S(() => {
|
|
@@ -3834,9 +3912,9 @@ var oa = u({
|
|
|
3834
3912
|
}
|
|
3835
3913
|
});
|
|
3836
3914
|
}
|
|
3837
|
-
}),
|
|
3838
|
-
e.component("KLineChart",
|
|
3915
|
+
}), aa = { install(e) {
|
|
3916
|
+
e.component("KLineChart", ia);
|
|
3839
3917
|
} };
|
|
3840
|
-
|
|
3918
|
+
Xi(te);
|
|
3841
3919
|
//#endregion
|
|
3842
|
-
export {
|
|
3920
|
+
export { ee as CORE_VERSION, Be as DrawingStyleToolbar, at as IndicatorParams, Lt as IndicatorSelector, ia as KLineChart, qi as KLineChartVue, Zt as KLineTooltip, aa as KMapPlugin, Zr as LeftToolbar, en as MarkerTooltip, Ji as VERSION, Xi as __setControllerFactory, $ as coreSignalToVueRef, Zi as createChart, Qi as useChart, ra as useIndicatorSelector, $i as useIndicators, ea as useInteractionState, ta as usePaneRatios, na as useViewport };
|