st-comp 0.0.206 → 0.0.208
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/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +1 -74
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +55 -58
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +43 -46
- package/es/HeatMap.cjs +1 -1
- package/es/HeatMap.js +1 -118
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +16 -19
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +113 -116
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +161 -164
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +15 -18
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +18 -21
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +140 -143
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +2 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +55 -58
- package/es/User.cjs +1 -1
- package/es/User.js +85 -88
- package/es/VarSelectDialog.cjs +2 -2
- package/es/VarSelectDialog.js +53 -56
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +15 -17
- package/es/VarietySearch.cjs +10 -10
- package/es/VarietySearch.js +53 -56
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +31 -34
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +103 -106
- package/es/{_initCloneObject-eaef9418.js → _initCloneObject-c477c74d.js} +25 -26
- package/es/_initCloneObject-e660897e.cjs +1 -0
- package/es/base-7ba08794.cjs +5 -0
- package/es/{index-a871c3eb.js → base-aa512893.js} +454 -171
- package/es/{castArray-7741a212.js → castArray-1eb17278.js} +1 -1
- package/es/castArray-efa457a5.cjs +1 -0
- package/es/{config-provider-a584d81e.cjs → config-provider-18c0a68a.cjs} +1 -1
- package/es/{config-provider-b16efd62.js → config-provider-49c17381.js} +6 -6
- package/es/{debounce-8d53f4dd.js → debounce-33406a0d.js} +9 -9
- package/es/debounce-4aa22feb.cjs +1 -0
- package/es/{dropdown-071c5d7e.cjs → dropdown-3f1fe325.cjs} +1 -1
- package/es/{dropdown-a59bba73.js → dropdown-6e7b1df0.js} +15 -15
- package/es/el-autocomplete-609ac86d.cjs +1 -0
- package/es/{el-autocomplete-ba808eb6.js → el-autocomplete-87b7f461.js} +51 -53
- package/es/el-button-08310c06.cjs +1 -0
- package/es/{el-button-c95adb85.js → el-button-56624e61.js} +45 -46
- package/es/{el-checkbox-c25236a6.cjs → el-checkbox-09f3b57f.cjs} +1 -1
- package/es/{el-checkbox-7421ccd3.js → el-checkbox-f13560e9.js} +40 -40
- package/es/{el-dialog-41ab8417.js → el-dialog-1d5f5877.js} +9 -10
- package/es/el-dialog-ea480083.cjs +1 -0
- package/es/{el-divider-4e059794.js → el-divider-1cda1783.js} +1 -1
- package/es/{el-divider-4713d74c.cjs → el-divider-8a4c87e3.cjs} +1 -1
- package/es/{el-empty-33cb66f1.js → el-empty-04682b5d.js} +3 -3
- package/es/el-empty-b40fa7ea.cjs +1 -0
- package/es/el-form-item-338ea2f7.cjs +12 -0
- package/es/{el-form-item-c53c374d.js → el-form-item-505c0b70.js} +75 -76
- package/es/{el-input-2f75c4ba.js → el-input-262851e8.js} +84 -85
- package/es/el-input-b04b5bfc.cjs +1 -0
- package/es/el-input-number-7242c8b5.cjs +1 -0
- package/es/{el-input-number-5193fe6d.js → el-input-number-fdac2b86.js} +82 -83
- package/es/{el-loading-cfd86c15.cjs → el-loading-3cf7b796.cjs} +1 -1
- package/es/{el-loading-f6022062.js → el-loading-7440dc64.js} +2 -2
- package/es/{el-menu-item-7e881203.js → el-menu-item-36c3004c.js} +53 -54
- package/es/el-menu-item-7aca344e.cjs +1 -0
- package/es/el-message-05cd85bf.cjs +1 -0
- package/es/{el-message-e544a8f5.js → el-message-416bd265.js} +28 -29
- package/es/{el-message-box-a93d2f6a.js → el-message-box-8f5e34ca.js} +20 -22
- package/es/el-message-box-b7e9917e.cjs +1 -0
- package/es/{el-overlay-09ad71cd.js → el-overlay-04426e36.js} +52 -53
- package/es/el-overlay-60bc5a02.cjs +1 -0
- package/es/el-popconfirm-24b622c5.cjs +1 -0
- package/es/{el-popconfirm-81dcd202.js → el-popconfirm-3790cda2.js} +38 -39
- package/es/el-popper-1dd8f5b4.cjs +1 -0
- package/es/{el-popper-b4f97157.js → el-popper-49152708.js} +191 -192
- package/es/{el-segmented-b868d074.js → el-segmented-05509f9d.js} +12 -13
- package/es/el-segmented-a928d89b.cjs +1 -0
- package/es/el-select-5fd77a96.cjs +1 -0
- package/es/{el-select-95627997.js → el-select-700f3686.js} +292 -295
- package/es/{el-table-column-376cd907.js → el-table-column-44360700.js} +54 -57
- package/es/el-table-column-bf3ab2a6.cjs +14 -0
- package/es/{el-tag-66cab138.js → el-tag-55a172c9.js} +30 -31
- package/es/el-tag-d59f3463.cjs +1 -0
- package/es/{el-text-c20a9f48.cjs → el-text-5bcaffb6.cjs} +1 -1
- package/es/{el-text-ac60d0f2.js → el-text-ab6bfc40.js} +4 -4
- package/es/{index-1f7d4f70.js → index-0afedcbd.js} +11 -12
- package/es/{index-88546436.js → index-29418a8d.js} +18 -18
- package/es/index-3d0bc5da.js +566 -0
- package/es/{index-57672682.js → index-4e46f96c.js} +12 -13
- package/es/{index-844bdd85.js → index-66ad0d6a.js} +34 -34
- package/es/{index-f967d6c1.cjs → index-882d77d3.cjs} +1 -1
- package/es/index-a206f6eb.cjs +1 -0
- package/es/{index-298075cf.cjs → index-ae6c9d97.cjs} +1 -1
- package/es/index-b4700d83.cjs +1 -0
- package/es/index-c30cf7f9.cjs +1 -0
- package/es/{index-d91dc23f.js → index-cbbd78b4.js} +12 -12
- package/es/{index-11547a0c.cjs → index-d8294b1a.cjs} +1 -1
- package/es/{raf-8249652f.cjs → raf-336ef01e.cjs} +1 -1
- package/es/raf-d8c44079.js +6 -0
- package/es/{scroll-679bd6bf.js → scroll-0a48995c.js} +5 -5
- package/es/{scroll-b108dabd.cjs → scroll-19533c53.cjs} +1 -1
- package/es/style.css +1 -1
- package/es/use-form-common-props-41182853.cjs +1 -0
- package/es/use-form-common-props-4cdda474.js +671 -0
- package/es/use-global-config-7bfbe48c.js +71 -0
- package/es/use-global-config-dc5527e8.cjs +1 -0
- package/es/{validator-1b8a6128.cjs → validator-28b22907.cjs} +1 -1
- package/es/{validator-764a9db0.js → validator-e35f7978.js} +1 -1
- package/es/{vnode-b906ae6d.cjs → vnode-8cb31692.cjs} +1 -1
- package/es/{vnode-5ddb7ed1.js → vnode-b62d0045.js} +1 -1
- package/es/{zh-cn-e963c628.js → zh-cn-346f3a73.js} +2 -2
- package/es/{zh-cn-90317f62.cjs → zh-cn-7c8640bb.cjs} +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +1 -1
- package/lib/{index-66200fba.js → index-da0f2951.js} +6 -6
- package/lib/{python-3709061e.js → python-c0a1e4ef.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/components/KlineTips/index.vue +4 -4
- package/es/_initCloneObject-52b6a510.cjs +0 -1
- package/es/base-a5af3db3.js +0 -288
- package/es/base-ef747d02.cjs +0 -5
- package/es/castArray-35947698.cjs +0 -1
- package/es/debounce-62f5b6e8.cjs +0 -1
- package/es/el-autocomplete-a07e9439.cjs +0 -1
- package/es/el-button-eec58cff.cjs +0 -1
- package/es/el-dialog-ae86edb8.cjs +0 -1
- package/es/el-empty-1697ded8.cjs +0 -1
- package/es/el-form-item-c3fe189b.cjs +0 -12
- package/es/el-input-7fd293af.cjs +0 -1
- package/es/el-input-number-22e21d16.cjs +0 -1
- package/es/el-menu-item-17dc717e.cjs +0 -1
- package/es/el-message-5e6a6be9.cjs +0 -1
- package/es/el-message-box-c10adb52.cjs +0 -1
- package/es/el-overlay-9e34965f.cjs +0 -1
- package/es/el-popconfirm-70a976bf.cjs +0 -1
- package/es/el-popper-b6c99b28.cjs +0 -1
- package/es/el-segmented-f8fce9ac.cjs +0 -1
- package/es/el-select-d8d91db1.cjs +0 -1
- package/es/el-table-column-c974cb96.cjs +0 -14
- package/es/el-tag-a33c4b22.cjs +0 -1
- package/es/index-098c2447.cjs +0 -1
- package/es/index-960806da.js +0 -314
- package/es/index-9780a537.cjs +0 -1
- package/es/index-9b9ef5dd.cjs +0 -1
- package/es/index-bb833443.cjs +0 -1
- package/es/index-c108567d.cjs +0 -1
- package/es/index-d77a7336.js +0 -204
- package/es/index-e5566b94.js +0 -368
- package/es/index-f3562b52.cjs +0 -1
- package/es/raf-80ef0c0a.js +0 -6
- package/es/use-form-common-props-815d48a6.js +0 -364
- package/es/use-form-common-props-fd9b61a0.cjs +0 -1
- package/es/use-global-config-30d7d8ce.cjs +0 -1
- package/es/use-global-config-b5e9d3d5.js +0 -72
package/es/KlineBasic.js
CHANGED
|
@@ -1,42 +1,39 @@
|
|
|
1
|
-
import "./base-
|
|
2
|
-
import { E as Ee } from "./el-dialog-
|
|
3
|
-
import "./el-overlay-
|
|
4
|
-
import "./el-input-
|
|
5
|
-
import { E as Be } from "./el-input-number-
|
|
6
|
-
import { E as Oe } from "./el-button-
|
|
7
|
-
import { E as Ie } from "./el-empty-
|
|
8
|
-
import { E as $e, a as Pe } from "./el-menu-item-
|
|
1
|
+
import "./base-aa512893.js";
|
|
2
|
+
import { E as Ee } from "./el-dialog-1d5f5877.js";
|
|
3
|
+
import "./el-overlay-04426e36.js";
|
|
4
|
+
import "./el-input-262851e8.js";
|
|
5
|
+
import { E as Be } from "./el-input-number-fdac2b86.js";
|
|
6
|
+
import { E as Oe } from "./el-button-56624e61.js";
|
|
7
|
+
import { E as Ie } from "./el-empty-04682b5d.js";
|
|
8
|
+
import { E as $e, a as Pe } from "./el-menu-item-36c3004c.js";
|
|
9
9
|
import "./el-tooltip-4ed993c7.js";
|
|
10
|
-
import "./el-popper-
|
|
11
|
-
import { defineComponent as he, openBlock as E, createElementBlock as O, Fragment as le, renderList as me, normalizeStyle as ye, toDisplayString as ce, computed as J, createVNode as B, ref as
|
|
10
|
+
import "./el-popper-49152708.js";
|
|
11
|
+
import { defineComponent as he, openBlock as E, createElementBlock as O, Fragment as le, renderList as me, normalizeStyle as ye, toDisplayString as ce, computed as J, createVNode as B, ref as F, onMounted as _e, onUnmounted as we, nextTick as De, createElementVNode as U, withCtx as K, createBlock as ke, createCommentVNode as X, renderSlot as Ye, watch as We, createTextVNode as re, pushScopeId as Ne, popScopeId as qe } from "vue";
|
|
12
12
|
import * as fe from "echarts";
|
|
13
13
|
import { d as u } from "./dayjs.min-8313b006.js";
|
|
14
14
|
import { y as Ce, v as ze, U as Ke, K as Ue, V as Q, x as ge, D as He } from "./index-7ed0999e.js";
|
|
15
|
-
import { E as ie } from "./el-message-
|
|
15
|
+
import { E as ie } from "./el-message-416bd265.js";
|
|
16
16
|
import { _ as ee } from "./_plugin-vue_export-helper-dad06003.js";
|
|
17
|
-
import "./el-tag-
|
|
18
|
-
import { E as je, a as Ze } from "./el-select-
|
|
17
|
+
import "./el-tag-55a172c9.js";
|
|
18
|
+
import { E as je, a as Ze } from "./el-select-700f3686.js";
|
|
19
19
|
import "./el-scrollbar-323542e7.js";
|
|
20
|
-
import "./
|
|
21
|
-
import "./
|
|
22
|
-
import "./index-960806da.js";
|
|
23
|
-
import "./index-d77a7336.js";
|
|
20
|
+
import "./use-form-common-props-4cdda474.js";
|
|
21
|
+
import "./index-3d0bc5da.js";
|
|
24
22
|
import "./index-2e331d74.js";
|
|
25
|
-
import "./vnode-
|
|
26
|
-
import "./scroll-
|
|
27
|
-
import "./use-global-config-
|
|
28
|
-
import "./index-e5566b94.js";
|
|
23
|
+
import "./vnode-b62d0045.js";
|
|
24
|
+
import "./scroll-0a48995c.js";
|
|
25
|
+
import "./use-global-config-7bfbe48c.js";
|
|
29
26
|
import "./typescript-7ae59c4c.js";
|
|
30
|
-
import "./index-
|
|
27
|
+
import "./index-cbbd78b4.js";
|
|
31
28
|
import "./index-657047bb.js";
|
|
32
|
-
import "./config-provider-
|
|
33
|
-
import "./index-
|
|
34
|
-
import "./index-
|
|
35
|
-
import "./castArray-
|
|
36
|
-
import "./debounce-
|
|
29
|
+
import "./config-provider-49c17381.js";
|
|
30
|
+
import "./index-66ad0d6a.js";
|
|
31
|
+
import "./index-4e46f96c.js";
|
|
32
|
+
import "./castArray-1eb17278.js";
|
|
33
|
+
import "./debounce-33406a0d.js";
|
|
37
34
|
let Z = null;
|
|
38
35
|
const Xe = (n) => {
|
|
39
|
-
const
|
|
36
|
+
const R = Ce(n, {
|
|
40
37
|
handleReq: (A) => {
|
|
41
38
|
ze() && (A.headers.token = Ke());
|
|
42
39
|
},
|
|
@@ -46,9 +43,9 @@ const Xe = (n) => {
|
|
|
46
43
|
return location.origin.includes("localhost") ? location.href = `${location.origin}/#/404` : Ue(), !0;
|
|
47
44
|
}
|
|
48
45
|
});
|
|
49
|
-
|
|
50
|
-
}, Ge = (n) => Z("/middleLayer/kline/getKlineBasic", { ...n, userId: Q("id") }), Je = (n) => Z("/middleLayer/kline/getKline", n), Qe = async (n) => Z("/alarm/deliversign/addAlarmPrice", { ...n, userId: Q("id") }), et = async (n) => Z("/alarm/deliversign/findAlarmPriceByUserId", { ...n, userId: Q("id") }), Me = async (n) => Z("/alarm/deliversign/updateAlarmPrice", { ...n, userId: Q("id") }), tt = async (n) => Z("/alarm/deliversign/deleteAlarmPrice", { ...n, userId: Q("id") }), { round: G } = ge, nt = (n,
|
|
51
|
-
const { data: e, time: h } = n, { gridTop: b, gridRight: s, gridLeft: x, maxShowCounts: Y, showSubChart: r } =
|
|
46
|
+
R.get, Z = R.post;
|
|
47
|
+
}, Ge = (n) => Z("/middleLayer/kline/getKlineBasic", { ...n, userId: Q("id") }), Je = (n) => Z("/middleLayer/kline/getKline", n), Qe = async (n) => Z("/alarm/deliversign/addAlarmPrice", { ...n, userId: Q("id") }), et = async (n) => Z("/alarm/deliversign/findAlarmPriceByUserId", { ...n, userId: Q("id") }), Me = async (n) => Z("/alarm/deliversign/updateAlarmPrice", { ...n, userId: Q("id") }), tt = async (n) => Z("/alarm/deliversign/deleteAlarmPrice", { ...n, userId: Q("id") }), { round: G } = ge, nt = (n, R, A, D, g) => {
|
|
48
|
+
const { data: e, time: h } = n, { gridTop: b, gridRight: s, gridLeft: x, maxShowCounts: Y, showSubChart: r } = R;
|
|
52
49
|
return {
|
|
53
50
|
animation: !1,
|
|
54
51
|
grid: {
|
|
@@ -149,13 +146,13 @@ const Xe = (n) => {
|
|
|
149
146
|
}
|
|
150
147
|
}
|
|
151
148
|
};
|
|
152
|
-
}, ot = (n,
|
|
149
|
+
}, ot = (n, R, A, D, g) => {
|
|
153
150
|
const { variety: e, featureId: h, featureType: b } = A, { gridTop: s, gridLeft: x, gridRight: Y } = D;
|
|
154
|
-
return
|
|
151
|
+
return R.reduce((r, a) => {
|
|
155
152
|
const { warnPrice: _ } = a, p = n == null ? void 0 : n.convertToPixel({ yAxisIndex: 0 }, _);
|
|
156
153
|
if (p <= s || p >= (n == null ? void 0 : n.getHeight()))
|
|
157
154
|
return r;
|
|
158
|
-
let
|
|
155
|
+
let T = 0;
|
|
159
156
|
return [
|
|
160
157
|
...r,
|
|
161
158
|
{
|
|
@@ -200,21 +197,21 @@ const Xe = (n) => {
|
|
|
200
197
|
}
|
|
201
198
|
],
|
|
202
199
|
// 事件:开始拖拽
|
|
203
|
-
ondragstart: (
|
|
204
|
-
|
|
200
|
+
ondragstart: (k) => {
|
|
201
|
+
T = k.offsetY;
|
|
205
202
|
},
|
|
206
|
-
ondrag: (
|
|
203
|
+
ondrag: (k) => {
|
|
207
204
|
var P;
|
|
208
|
-
if (
|
|
209
|
-
const
|
|
210
|
-
(P =
|
|
205
|
+
if (k.target && k.target.childAt(1)) {
|
|
206
|
+
const M = n.convertFromPixel({ yAxisIndex: 0 }, p + (k.offsetY - T));
|
|
207
|
+
(P = k.target.childAt(1)) == null || P.animate("style", !1).when(1, { text: G(M, 3) }).start();
|
|
211
208
|
}
|
|
212
209
|
},
|
|
213
210
|
// 事件:结束拖拽
|
|
214
|
-
ondragend: async (
|
|
215
|
-
const
|
|
216
|
-
if (
|
|
217
|
-
const V = n == null ? void 0 : n.convertFromPixel({ yAxisIndex: 0 },
|
|
211
|
+
ondragend: async (k) => {
|
|
212
|
+
const M = k.offsetY - T;
|
|
213
|
+
if (M !== 0) {
|
|
214
|
+
const V = n == null ? void 0 : n.convertFromPixel({ yAxisIndex: 0 }, M + p), d = {
|
|
218
215
|
id: a.id,
|
|
219
216
|
warnPrice: G(V, 3),
|
|
220
217
|
featureId: h,
|
|
@@ -240,7 +237,7 @@ const Xe = (n) => {
|
|
|
240
237
|
}
|
|
241
238
|
},
|
|
242
239
|
setup(n) {
|
|
243
|
-
return (
|
|
240
|
+
return (R, A) => (E(), O("div", at, [
|
|
244
241
|
(E(!0), O(le, null, me(n.data, (D, g) => (E(), O("div", {
|
|
245
242
|
key: g,
|
|
246
243
|
class: "kline-tips-item",
|
|
@@ -264,31 +261,31 @@ const it = { class: "kline-tips" }, lt = {
|
|
|
264
261
|
}
|
|
265
262
|
},
|
|
266
263
|
setup(n) {
|
|
267
|
-
const { round:
|
|
264
|
+
const { round: R, formatValue: A } = ge, D = n, g = J(() => {
|
|
268
265
|
const { data: h, activeIndex: b } = D;
|
|
269
266
|
if (h.data && h.data[b]) {
|
|
270
267
|
const s = h.data[b], x = [
|
|
271
|
-
{ label: "开", value:
|
|
272
|
-
{ label: "高", value:
|
|
273
|
-
{ label: "低", value:
|
|
274
|
-
{ label: "收", value:
|
|
268
|
+
{ label: "开", value: s[0] },
|
|
269
|
+
{ label: "高", value: s[3] },
|
|
270
|
+
{ label: "低", value: s[2] },
|
|
271
|
+
{ label: "收", value: s[1] }
|
|
275
272
|
];
|
|
276
273
|
s[4] !== null && x.push({ label: "额", value: A(s[4]) });
|
|
277
274
|
let Y;
|
|
278
|
-
return s[6] > 0 ? Y = "red" : s[6] < 0 && (Y = "green"), x.push({ label: "涨跌", value: `${
|
|
275
|
+
return s[6] > 0 ? Y = "red" : s[6] < 0 && (Y = "green"), x.push({ label: "涨跌", value: `${R(s[6])}%`, color: Y }), x;
|
|
279
276
|
}
|
|
280
277
|
return [];
|
|
281
278
|
}), e = J(() => {
|
|
282
279
|
var s;
|
|
283
280
|
const { data: h, activeIndex: b } = D;
|
|
284
|
-
return ((s = h == null ? void 0 : h.mainIndicator) == null ? void 0 : s.map((x) => ({ label: x.key, value:
|
|
281
|
+
return ((s = h == null ? void 0 : h.mainIndicator) == null ? void 0 : s.map((x) => ({ label: x.key, value: R(x.data[b]), color: x.color }))) || [];
|
|
285
282
|
});
|
|
286
283
|
return (h, b) => (E(), O("div", it, [
|
|
287
284
|
B(pe, { data: g.value }, null, 8, ["data"]),
|
|
288
285
|
B(pe, { data: e.value }, null, 8, ["data"])
|
|
289
286
|
]));
|
|
290
287
|
}
|
|
291
|
-
}, st = /* @__PURE__ */ ee(lt, [["__scopeId", "data-v-
|
|
288
|
+
}, st = /* @__PURE__ */ ee(lt, [["__scopeId", "data-v-ffa125ec"]]);
|
|
292
289
|
const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
293
290
|
key: 0,
|
|
294
291
|
class: "klineSub-tips-select"
|
|
@@ -308,10 +305,10 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
308
305
|
// 副图指标列表
|
|
309
306
|
},
|
|
310
307
|
emits: ["update:modelValue"],
|
|
311
|
-
setup(n, { expose:
|
|
308
|
+
setup(n, { expose: R, emit: A }) {
|
|
312
309
|
const { round: D } = ge;
|
|
313
310
|
let g, e;
|
|
314
|
-
const h = A, b = n, s =
|
|
311
|
+
const h = A, b = n, s = F(), x = J({
|
|
315
312
|
get() {
|
|
316
313
|
return b.modelValue;
|
|
317
314
|
},
|
|
@@ -321,7 +318,7 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
321
318
|
}), Y = J(() => {
|
|
322
319
|
var p;
|
|
323
320
|
const { data: a, activeIndex: _ } = b;
|
|
324
|
-
return ((p = a == null ? void 0 : a.subIndicator) == null ? void 0 : p.map((
|
|
321
|
+
return ((p = a == null ? void 0 : a.subIndicator) == null ? void 0 : p.map((T) => ({ label: T.key, color: T.color, value: T.data[_] || "-" }))) || [];
|
|
325
322
|
});
|
|
326
323
|
_e(() => {
|
|
327
324
|
g = fe.init(s.value);
|
|
@@ -337,8 +334,8 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
337
334
|
g.dispose(), e.disconnect(), e = null;
|
|
338
335
|
});
|
|
339
336
|
const r = (a, _) => {
|
|
340
|
-
const p = a[_],
|
|
341
|
-
return p[0] === p[1] ? p[0] >=
|
|
337
|
+
const p = a[_], T = _ === 0 ? a[_] : a[_ - 1];
|
|
338
|
+
return p[0] === p[1] ? p[0] >= T[1] ? {
|
|
342
339
|
color: "transparent",
|
|
343
340
|
borderColor: "#FF0000"
|
|
344
341
|
} : {
|
|
@@ -350,14 +347,14 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
350
347
|
color: "#00FFFF"
|
|
351
348
|
};
|
|
352
349
|
};
|
|
353
|
-
return
|
|
350
|
+
return R({
|
|
354
351
|
connect: (a) => {
|
|
355
352
|
fe.connect([a, g]);
|
|
356
353
|
},
|
|
357
354
|
// 联动
|
|
358
355
|
draw: (a, _) => {
|
|
359
356
|
De(() => {
|
|
360
|
-
const { startValue: p, endValue:
|
|
357
|
+
const { startValue: p, endValue: T, maxValueSpan: k } = a, { leftYAxisRange: P, rightYAxisRange: M } = b.data.subIndicator[0], V = b.data.subIndicator.map((d) => {
|
|
361
358
|
if (d.series === "bar")
|
|
362
359
|
return {
|
|
363
360
|
name: "subMain",
|
|
@@ -411,8 +408,8 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
411
408
|
{
|
|
412
409
|
type: "inside",
|
|
413
410
|
startValue: p,
|
|
414
|
-
endValue:
|
|
415
|
-
maxValueSpan:
|
|
411
|
+
endValue: T,
|
|
412
|
+
maxValueSpan: k
|
|
416
413
|
}
|
|
417
414
|
],
|
|
418
415
|
tooltip: {
|
|
@@ -469,8 +466,8 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
469
466
|
},
|
|
470
467
|
{
|
|
471
468
|
position: "right",
|
|
472
|
-
min:
|
|
473
|
-
max:
|
|
469
|
+
min: M === "cover" ? (d) => d.min : null,
|
|
470
|
+
max: M === "cover" ? (d) => d.max : null,
|
|
474
471
|
splitNumber: 1,
|
|
475
472
|
axisLine: {
|
|
476
473
|
show: !1
|
|
@@ -491,22 +488,22 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
491
488
|
}
|
|
492
489
|
// 重置
|
|
493
490
|
}), (a, _) => {
|
|
494
|
-
const p = je,
|
|
491
|
+
const p = je, T = Ze;
|
|
495
492
|
return E(), O("div", ut, [
|
|
496
493
|
U("div", dt, [
|
|
497
494
|
Y.value.length ? (E(), O("div", ct, [
|
|
498
|
-
B(
|
|
495
|
+
B(T, {
|
|
499
496
|
modelValue: x.value,
|
|
500
|
-
"onUpdate:modelValue": _[0] || (_[0] = (
|
|
497
|
+
"onUpdate:modelValue": _[0] || (_[0] = (k) => x.value = k),
|
|
501
498
|
size: "small",
|
|
502
499
|
"popper-class": "element-dark",
|
|
503
500
|
class: "element-dark subIndicator"
|
|
504
501
|
}, {
|
|
505
502
|
default: K(() => [
|
|
506
|
-
(E(!0), O(le, null, me(n.subIndicatorList, (
|
|
507
|
-
key:
|
|
508
|
-
label:
|
|
509
|
-
value:
|
|
503
|
+
(E(!0), O(le, null, me(n.subIndicatorList, (k) => (E(), ke(p, {
|
|
504
|
+
key: k.value,
|
|
505
|
+
label: k.label,
|
|
506
|
+
value: k.value
|
|
510
507
|
}, null, 8, ["label", "value"]))), 128))
|
|
511
508
|
]),
|
|
512
509
|
_: 1
|
|
@@ -525,8 +522,8 @@ const ut = { class: "klineSub" }, dt = { class: "klineSub-tips" }, ct = {
|
|
|
525
522
|
}, pt = /* @__PURE__ */ ee(ft, [["__scopeId", "data-v-ab519de5"]]), mt = /* @__PURE__ */ he({
|
|
526
523
|
__name: "index",
|
|
527
524
|
emits: ["closeContextMenuCallBack"],
|
|
528
|
-
setup(n, { emit:
|
|
529
|
-
const A =
|
|
525
|
+
setup(n, { emit: R }) {
|
|
526
|
+
const A = R, D = F(), g = F(), e = F({
|
|
530
527
|
display: "none",
|
|
531
528
|
top: "0px",
|
|
532
529
|
left: "0px"
|
|
@@ -645,10 +642,10 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
645
642
|
// 时段框选
|
|
646
643
|
},
|
|
647
644
|
emits: ["change", "getFactorData"],
|
|
648
|
-
setup(n, { expose:
|
|
645
|
+
setup(n, { expose: R, emit: A }) {
|
|
649
646
|
const D = [{ label: "画线预警", key: "drawWarningLine" }];
|
|
650
647
|
let g = null, e = null, h, b, s = !1, x = !1;
|
|
651
|
-
const Y = A, r = n, a =
|
|
648
|
+
const Y = A, r = n, a = F(!1), _ = F(!1), p = F(!1), T = F(null), k = F(null), P = F("VOL"), M = F(0), V = F({}), d = F([]), N = F({}), C = F(!1), te = F(""), se = F([...D]), H = J(() => ({
|
|
652
649
|
defaultShowCounts: 500,
|
|
653
650
|
// 默认展示条数
|
|
654
651
|
addCounts: 2e3,
|
|
@@ -686,7 +683,7 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
686
683
|
e == null || e.off("datazoom"), e == null || e.off("highlight"), e == null || e.off("globalout"), e == null || e.dispose(), g == null || g.dispose(), window.removeEventListener("keydown", ve);
|
|
687
684
|
});
|
|
688
685
|
const Le = () => {
|
|
689
|
-
e || (e = fe.init(
|
|
686
|
+
e || (e = fe.init(T.value), Te(), H.value.showSubChart && k.value.connect(e), g = He(T.value), g.listen(() => {
|
|
690
687
|
requestAnimationFrame(() => {
|
|
691
688
|
e.resize();
|
|
692
689
|
});
|
|
@@ -711,11 +708,11 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
711
708
|
break;
|
|
712
709
|
}
|
|
713
710
|
case "ArrowLeft": {
|
|
714
|
-
o > 0 && (o -= 1, l -= 1),
|
|
711
|
+
o > 0 && (o -= 1, l -= 1), M.value > 0 && (M.value -= 1);
|
|
715
712
|
break;
|
|
716
713
|
}
|
|
717
714
|
case "ArrowRight": {
|
|
718
|
-
l < f.length - 1 && (o += 1, l += 1), a.value &&
|
|
715
|
+
l < f.length - 1 && (o += 1, l += 1), a.value && M.value < f.length - 1 && (M.value += 1);
|
|
719
716
|
break;
|
|
720
717
|
}
|
|
721
718
|
}
|
|
@@ -726,10 +723,10 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
726
723
|
}), e.dispatchAction({
|
|
727
724
|
type: "updateAxisPointer",
|
|
728
725
|
seriesIndex: 0,
|
|
729
|
-
dataIndex: a.value ?
|
|
726
|
+
dataIndex: a.value ? M.value : null
|
|
730
727
|
}), e.dispatchAction({
|
|
731
728
|
type: "highlight",
|
|
732
|
-
dataIndex: a.value ?
|
|
729
|
+
dataIndex: a.value ? M.value : l
|
|
733
730
|
});
|
|
734
731
|
}
|
|
735
732
|
}, Te = () => {
|
|
@@ -747,12 +744,12 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
747
744
|
var c, f;
|
|
748
745
|
let m = t.dataIndex || -1;
|
|
749
746
|
t.batch && (m = typeof ((c = t == null ? void 0 : t.batch[0]) == null ? void 0 : c.dataIndex) == "number" ? (f = t == null ? void 0 : t.batch[0]) == null ? void 0 : f.dataIndex : -1), clearTimeout(h), h = setTimeout(() => {
|
|
750
|
-
|
|
747
|
+
M.value = m, clearTimeout(h);
|
|
751
748
|
}, 20);
|
|
752
749
|
}), e == null || e.on("globalout", () => {
|
|
753
750
|
var m, c, f;
|
|
754
751
|
const t = (f = (c = (m = e == null ? void 0 : e.getOption()) == null ? void 0 : m.dataZoom) == null ? void 0 : c[0]) == null ? void 0 : f.endValue;
|
|
755
|
-
|
|
752
|
+
M.value = t;
|
|
756
753
|
});
|
|
757
754
|
let i = null;
|
|
758
755
|
e == null || e.on("contextmenu", (t) => {
|
|
@@ -768,17 +765,17 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
768
765
|
try {
|
|
769
766
|
if (!r.variety || !r.cycle)
|
|
770
767
|
return;
|
|
771
|
-
const { variety: l, featureId: w, cycle:
|
|
768
|
+
const { variety: l, featureId: w, cycle: S, indicatorStore: v, mainIndicator: q, right: z, startTime: j, endTime: L } = r, { defaultShowCounts: I, addCounts: y, showWarningLine: de, getFactorData: ae } = H.value, $ = {
|
|
772
769
|
variety: l,
|
|
773
770
|
featureId: w,
|
|
774
|
-
cycle:
|
|
771
|
+
cycle: S,
|
|
775
772
|
mainIndicatorList: v.getIndicatorParams(q),
|
|
776
773
|
subIndicator: P.value,
|
|
777
774
|
right: z,
|
|
778
775
|
showWarningLine: de,
|
|
779
776
|
getFactorData: ae
|
|
780
777
|
};
|
|
781
|
-
j &&
|
|
778
|
+
j && L ? ($.startTime = j, $.endTime = L) : j ? ($.startTime = j, $.limit = I + y) : L ? ($.endTime = L, $.limit = I + y) : ($.endTime = u().add(1, "hour").format("YYYY-MM-DD HH:mm:ss"), $.limit = I + y);
|
|
782
779
|
const W = await Ge($);
|
|
783
780
|
if ((m = (t = (i = W == null ? void 0 : W.body) == null ? void 0 : i.kline) == null ? void 0 : t.time) != null && m.length)
|
|
784
781
|
_.value = !1, p.value = !1;
|
|
@@ -793,7 +790,7 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
793
790
|
}, Fe = async (i) => {
|
|
794
791
|
const { variety: t, cycle: m, indicatorStore: c, mainIndicator: f, right: o } = r, { addCounts: l } = H.value, { time: w } = V.value;
|
|
795
792
|
if (i === "history") {
|
|
796
|
-
const
|
|
793
|
+
const S = await Je({
|
|
797
794
|
variety: t,
|
|
798
795
|
cycle: m,
|
|
799
796
|
endTime: w[0],
|
|
@@ -803,64 +800,64 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
803
800
|
right: o
|
|
804
801
|
});
|
|
805
802
|
V.value = {
|
|
806
|
-
time: [...
|
|
807
|
-
data: [...
|
|
803
|
+
time: [...S.body.time, ...V.value.time.slice(1)],
|
|
804
|
+
data: [...S.body.data, ...V.value.data.slice(1)],
|
|
808
805
|
mainIndicator: V.value.mainIndicator.map((v, q) => {
|
|
809
806
|
var z;
|
|
810
807
|
return {
|
|
811
808
|
...v,
|
|
812
|
-
data: [...((z =
|
|
809
|
+
data: [...((z = S.body.mainIndicator[q]) == null ? void 0 : z.data) ?? [], ...v.data.slice(1)]
|
|
813
810
|
};
|
|
814
811
|
}),
|
|
815
812
|
subIndicator: V.value.subIndicator.map((v, q) => {
|
|
816
813
|
var z;
|
|
817
814
|
return {
|
|
818
815
|
...v,
|
|
819
|
-
data: [...((z =
|
|
816
|
+
data: [...((z = S.body.subIndicator[q]) == null ? void 0 : z.data) ?? [], ...v.data.slice(1)]
|
|
820
817
|
};
|
|
821
818
|
})
|
|
822
|
-
}, be(!0),
|
|
819
|
+
}, be(!0), S.body.data.length < l && (x = !0), s = !1;
|
|
823
820
|
}
|
|
824
821
|
}, be = (i = !1) => {
|
|
825
822
|
var q, z, j;
|
|
826
823
|
Le();
|
|
827
824
|
const { time: t } = V.value, { gridRight: m, gridLeft: c, defaultShowCounts: f, maxShowCounts: o, showSubChart: l } = H.value;
|
|
828
|
-
let w = t.length - 1 - f,
|
|
825
|
+
let w = t.length - 1 - f, S = t.length - 1;
|
|
829
826
|
if (i) {
|
|
830
|
-
const
|
|
831
|
-
w = t.findIndex(($) => $ === de),
|
|
827
|
+
const L = e.getOption(), I = (z = (q = L == null ? void 0 : L.xAxis) == null ? void 0 : q[0]) == null ? void 0 : z.data, y = (j = L == null ? void 0 : L.dataZoom) == null ? void 0 : j[0], de = I[y == null ? void 0 : y.startValue], ae = I[y == null ? void 0 : y.endValue];
|
|
828
|
+
w = t.findIndex(($) => $ === de), S = t.findIndex(($) => $ === ae);
|
|
832
829
|
}
|
|
833
|
-
const v = nt(V.value, H.value, w,
|
|
834
|
-
if (e.setOption(v, !0),
|
|
835
|
-
let
|
|
830
|
+
const v = nt(V.value, H.value, w, S, r.cycle);
|
|
831
|
+
if (e.setOption(v, !0), M.value = S, r.brushRange) {
|
|
832
|
+
let L = null, I = null;
|
|
836
833
|
switch (r.cycle) {
|
|
837
834
|
case "6": {
|
|
838
|
-
|
|
835
|
+
L = t.find((y) => new Date(y).getTime() >= new Date(r.brushRange[0]).getTime() || u(y).format("YYYY-MM-DD") === u(r.brushRange[0]).format("YYYY-MM-DD")), I = t.findLast((y) => new Date(y).getTime() <= new Date(r.brushRange[1]).getTime() || u(y).format("YYYY-MM-DD") === u(r.brushRange[1]).format("YYYY-MM-DD"));
|
|
839
836
|
break;
|
|
840
837
|
}
|
|
841
838
|
case "7": {
|
|
842
|
-
|
|
839
|
+
L = t.find((y) => u(y).day(5).format("YYYY-MM-DD") === u(r.brushRange[0]).day(5).format("YYYY-MM-DD")), I = t.findLast((y) => u(y).day(5).format("YYYY-MM-DD") === u(r.brushRange[1]).day(5).format("YYYY-MM-DD"));
|
|
843
840
|
break;
|
|
844
841
|
}
|
|
845
842
|
case "8": {
|
|
846
|
-
|
|
843
|
+
L = t.find((y) => u(y).endOf("month").format("YYYY-MM-DD") === u(r.brushRange[0]).endOf("month").format("YYYY-MM-DD")), I = t.findLast((y) => u(y).endOf("month").format("YYYY-MM-DD") === u(r.brushRange[1]).endOf("month").format("YYYY-MM-DD"));
|
|
847
844
|
break;
|
|
848
845
|
}
|
|
849
846
|
default:
|
|
850
|
-
|
|
847
|
+
L = t.find((y) => new Date(y).getTime() >= new Date(r.brushRange[0]).getTime()), I = t.findLast((y) => new Date(y).getTime() <= new Date(r.brushRange[1]).getTime());
|
|
851
848
|
}
|
|
852
|
-
console.log(
|
|
849
|
+
console.log(L, I), e.dispatchAction({
|
|
853
850
|
type: "brush",
|
|
854
851
|
areas: [
|
|
855
852
|
{
|
|
856
853
|
brushType: "lineX",
|
|
857
|
-
coordRange: [
|
|
854
|
+
coordRange: [L, I],
|
|
858
855
|
xAxisIndex: 0
|
|
859
856
|
}
|
|
860
857
|
]
|
|
861
858
|
});
|
|
862
859
|
}
|
|
863
|
-
l &&
|
|
860
|
+
l && k.value.draw({ startValue: w, endValue: S, maxValueSpan: o }, { gridLeft: c, gridRight: m }), xe();
|
|
864
861
|
}, ne = () => {
|
|
865
862
|
if (!e)
|
|
866
863
|
return;
|
|
@@ -944,14 +941,14 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
944
941
|
// 颜色改为透明
|
|
945
942
|
backgroundColor: "transparent",
|
|
946
943
|
// 仅显示Y轴值
|
|
947
|
-
formatter: (
|
|
944
|
+
formatter: (S) => ""
|
|
948
945
|
}
|
|
949
946
|
}
|
|
950
947
|
}
|
|
951
948
|
});
|
|
952
|
-
const w = async (
|
|
949
|
+
const w = async (S) => {
|
|
953
950
|
e == null || e.getZr().off("mousedown", w);
|
|
954
|
-
const v = e == null ? void 0 : e.convertFromPixel({ yAxisIndex: 0 },
|
|
951
|
+
const v = e == null ? void 0 : e.convertFromPixel({ yAxisIndex: 0 }, S.offsetY), q = Math.round(v * 1e3) / 1e3;
|
|
955
952
|
e == null || e.setOption({
|
|
956
953
|
...o,
|
|
957
954
|
// 指示器样式
|
|
@@ -1003,12 +1000,12 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
1003
1000
|
}, Ve = () => {
|
|
1004
1001
|
se.value = [...D];
|
|
1005
1002
|
};
|
|
1006
|
-
return
|
|
1003
|
+
return R({
|
|
1007
1004
|
draw: (i, t) => {
|
|
1008
1005
|
i === "warningLine" && (d.value = t, ne());
|
|
1009
1006
|
}
|
|
1010
1007
|
}), (i, t) => {
|
|
1011
|
-
var
|
|
1008
|
+
var S;
|
|
1012
1009
|
const m = $e, c = Pe, f = Ie, o = Oe, l = Be, w = Ee;
|
|
1013
1010
|
return E(), O(le, null, [
|
|
1014
1011
|
U("div", {
|
|
@@ -1019,7 +1016,7 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
1019
1016
|
U("div", gt, [
|
|
1020
1017
|
B(st, {
|
|
1021
1018
|
data: V.value,
|
|
1022
|
-
activeIndex:
|
|
1019
|
+
activeIndex: M.value
|
|
1023
1020
|
}, null, 8, ["data", "activeIndex"])
|
|
1024
1021
|
]),
|
|
1025
1022
|
U("div", {
|
|
@@ -1053,7 +1050,7 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
1053
1050
|
default: K(() => [
|
|
1054
1051
|
U("div", {
|
|
1055
1052
|
ref_key: "klineBasicMainRef",
|
|
1056
|
-
ref:
|
|
1053
|
+
ref: T,
|
|
1057
1054
|
style: { height: "100%" }
|
|
1058
1055
|
}, null, 512)
|
|
1059
1056
|
]),
|
|
@@ -1063,13 +1060,13 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
1063
1060
|
H.value.showSubChart ? (E(), O("div", vt, [
|
|
1064
1061
|
B(pt, {
|
|
1065
1062
|
ref_key: "klineSubRef",
|
|
1066
|
-
ref:
|
|
1063
|
+
ref: k,
|
|
1067
1064
|
modelValue: P.value,
|
|
1068
1065
|
"onUpdate:modelValue": t[0] || (t[0] = (v) => P.value = v),
|
|
1069
1066
|
data: V.value,
|
|
1070
1067
|
cycle: n.cycle,
|
|
1071
|
-
activeIndex:
|
|
1072
|
-
subIndicatorList: (
|
|
1068
|
+
activeIndex: M.value,
|
|
1069
|
+
subIndicatorList: (S = n.indicatorStore) == null ? void 0 : S.subIndicatorList
|
|
1073
1070
|
}, null, 8, ["modelValue", "data", "cycle", "activeIndex", "subIndicatorList"])
|
|
1074
1071
|
])) : X("", !0),
|
|
1075
1072
|
_.value ? (E(), O("div", bt, [
|
|
@@ -1131,11 +1128,11 @@ const Se = (n) => (Ne("data-v-9e6456be"), n = n(), qe(), n), gt = { class: "klin
|
|
|
1131
1128
|
], 64);
|
|
1132
1129
|
};
|
|
1133
1130
|
}
|
|
1134
|
-
}, kt = /* @__PURE__ */ ee(Dt, [["__scopeId", "data-v-9e6456be"]]),
|
|
1131
|
+
}, kt = /* @__PURE__ */ ee(Dt, [["__scopeId", "data-v-9e6456be"]]), an = {
|
|
1135
1132
|
install(n) {
|
|
1136
1133
|
n.component("st-klineBasic", kt);
|
|
1137
1134
|
}
|
|
1138
1135
|
};
|
|
1139
1136
|
export {
|
|
1140
|
-
|
|
1137
|
+
an as default
|
|
1141
1138
|
};
|