st-comp 0.0.186 → 0.0.187
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 +13 -12
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +21 -18
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +27 -24
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +14 -11
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +23 -20
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +18 -15
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +13 -10
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +16 -13
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +63 -60
- package/es/Table.cjs +1 -1
- package/es/Table.js +31 -29
- package/es/User.cjs +1 -1
- package/es/User.js +50 -47
- package/es/VarSelectDialog.cjs +3 -3
- package/es/VarSelectDialog.js +165 -478
- package/es/VarietyAutoComplete.cjs +1 -0
- package/es/VarietyAutoComplete.js +84 -0
- package/es/VarietySearch.cjs +6 -6
- package/es/VarietySearch.js +47 -44
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +31 -29
- package/es/_initCloneObject-25b9751e.cjs +1 -0
- package/es/{_initCloneObject-00cee14a.js → _initCloneObject-e473908b.js} +24 -23
- package/es/config-provider-87edaad3.cjs +1 -0
- package/es/{config-provider-89aba243.js → config-provider-8863d600.js} +10 -9
- package/es/{debounce-0b77a317.cjs → debounce-62f5b6e8.cjs} +1 -1
- package/es/{debounce-5f2ec4be.js → debounce-ccdceb02.js} +18 -18
- package/es/{dropdown-babf55db.cjs → dropdown-41097c52.cjs} +1 -1
- package/es/{dropdown-0fd8bdbd.js → dropdown-9b1f2f66.js} +2 -2
- package/es/el-autocomplete-03bc5b82.cjs +1 -0
- package/es/el-autocomplete-79142038.js +328 -0
- package/es/{el-button-338a49b7.cjs → el-button-8dd00125.cjs} +1 -1
- package/es/{el-button-f44cb2cf.js → el-button-e9ca802c.js} +2 -2
- package/es/{el-dialog-c2451c86.js → el-dialog-98b77ce1.js} +7 -7
- package/es/{el-dialog-45250561.cjs → el-dialog-ae8da57b.cjs} +1 -1
- package/es/el-empty-1697ded8.cjs +1 -0
- package/es/{el-empty-87a86f30.js → el-empty-34086220.js} +11 -10
- package/es/{el-form-item-64c14a64.js → el-form-item-1117a48f.js} +52 -51
- package/es/el-form-item-f66f8499.cjs +12 -0
- package/es/{el-input-ef6edbf3.js → el-input-2714f71f.js} +3 -3
- package/es/{el-input-c663697a.cjs → el-input-fc445025.cjs} +1 -1
- package/es/{el-input-number-5fda0890.cjs → el-input-number-25e0cdc0.cjs} +1 -1
- package/es/{el-input-number-cda5c4e1.js → el-input-number-657ec056.js} +4 -4
- package/es/{el-loading-8c3379d5.cjs → el-loading-4028e070.cjs} +1 -1
- package/es/{el-loading-1be77e7c.js → el-loading-a980dadc.js} +1 -1
- package/es/{el-menu-item-cf9e0e36.cjs → el-menu-item-940c40eb.cjs} +1 -1
- package/es/{el-menu-item-84a4b594.js → el-menu-item-c2ccd259.js} +4 -4
- package/es/{el-message-c500161d.cjs → el-message-0a3a0f2a.cjs} +1 -1
- package/es/{el-message-ba131b90.js → el-message-25e15a78.js} +4 -4
- package/es/{el-message-box-38779ab9.js → el-message-box-08498df3.js} +9 -9
- package/es/{el-message-box-743c461a.cjs → el-message-box-194cfd71.cjs} +1 -1
- package/es/{el-overlay-a6f43919.js → el-overlay-55b8b63b.js} +17 -17
- package/es/{el-overlay-39e2e96f.cjs → el-overlay-f42f765e.cjs} +1 -1
- package/es/{el-popconfirm-08b4221f.cjs → el-popconfirm-204d8607.cjs} +1 -1
- package/es/{el-popconfirm-16597a41.js → el-popconfirm-a1637c22.js} +4 -4
- package/es/{el-popper-05a8f271.js → el-popper-26aebdb6.js} +54 -54
- package/es/{el-popper-dca2de0d.cjs → el-popper-f194e471.cjs} +1 -1
- package/es/el-scrollbar-1c9093bf.cjs +1 -0
- package/es/el-scrollbar-e74f90d9.js +395 -0
- package/es/{el-segmented-c2952e4c.cjs → el-segmented-51f6d786.cjs} +1 -1
- package/es/{el-segmented-d68dfe31.js → el-segmented-85c9467d.js} +3 -3
- package/es/{el-select-7846f331.js → el-select-7b52dfc9.js} +106 -103
- package/es/el-select-f416ce28.cjs +1 -0
- package/es/el-table-column-8e24a62f.cjs +14 -0
- package/es/{el-table-column-cd63e722.js → el-table-column-f8a4f27b.js} +144 -142
- package/es/el-tag-65658264.cjs +1 -0
- package/es/{el-tag-914c96a9.js → el-tag-7de14b18.js} +23 -22
- package/es/index-02f7b722.cjs +1 -0
- package/es/{index-b132c1b1.js → index-30e29356.js} +1 -1
- package/es/index-482f09b5.js +204 -0
- package/es/{index-1c409d46.cjs → index-4a8be5b9.cjs} +1 -1
- package/es/{index-e6deec5d.cjs → index-4cd86c5e.cjs} +1 -1
- package/es/{index-20749652.js → index-520cfefa.js} +2 -2
- package/es/index-62df8bda.cjs +1 -0
- package/es/index-89502796.js +314 -0
- package/es/index-9780a537.cjs +1 -0
- package/es/index-b9cbb01d.js +60 -0
- package/es/index-bb833443.cjs +1 -0
- package/es/index-fee2efa8.js +375 -0
- package/es/style.css +1 -1
- package/es/use-global-config-51cce73d.js +72 -0
- package/es/use-global-config-b6bc4c2f.cjs +1 -0
- package/es/{validator-f66b0f34.cjs → validator-ed9fb862.cjs} +1 -1
- package/es/{validator-90d3e848.js → validator-fe13c731.js} +1 -1
- package/es/vnode-b906ae6d.cjs +1 -0
- package/es/vnode-c51c8aa3.js +14 -0
- package/es/{zh-cn-de7ae601.cjs → zh-cn-3771d788.cjs} +1 -1
- package/es/{zh-cn-530f1ed1.js → zh-cn-4fb50443.js} +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +130 -130
- package/lib/{index-26fab3e5.js → index-73ca8189.js} +4620 -4552
- package/lib/{python-c34eeb40.js → python-a61cab9a.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/VarietyAutoComplete/index.ts +8 -0
- package/packages/VarietyAutoComplete/index.vue +89 -0
- package/packages/index.ts +2 -0
- package/src/pages/VarietyAutoComplete/index.vue +19 -0
- package/src/router/routes.ts +5 -0
- package/es/_initCloneObject-4dd3c9a4.cjs +0 -1
- package/es/config-provider-d82ea78c.cjs +0 -1
- package/es/el-empty-bb2b0235.cjs +0 -1
- package/es/el-form-item-b5f6081b.cjs +0 -12
- package/es/el-scrollbar-31d72626.js +0 -763
- package/es/el-scrollbar-802d874d.cjs +0 -1
- package/es/el-select-8337856d.cjs +0 -1
- package/es/el-table-column-34f080b5.cjs +0 -14
- package/es/el-tag-a2e99294.cjs +0 -1
- package/es/index-34592e82.js +0 -513
- package/es/index-3a74eae4.cjs +0 -1
- package/es/use-global-config-53be2b7d.js +0 -71
- package/es/use-global-config-f3664595.cjs +0 -1
- package/es/vnode-6d51e502.cjs +0 -1
- package/es/vnode-8ddc4f78.js +0 -70
package/es/Kline.js
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import "./base-62a70f61.js";
|
|
2
|
-
import { E as he, a as Ce } from "./el-menu-item-
|
|
2
|
+
import { E as he, a as Ce } from "./el-menu-item-c2ccd259.js";
|
|
3
3
|
import "./el-tooltip-4ed993c7.js";
|
|
4
|
-
import "./el-popper-
|
|
4
|
+
import "./el-popper-26aebdb6.js";
|
|
5
5
|
import { defineComponent as Me, openBlock as C, createElementBlock as v, createElementVNode as K, Fragment as ae, renderList as le, normalizeStyle as ye, toDisplayString as q, ref as S, renderSlot as De, createCommentVNode as xe, nextTick as Ye, computed as W, watch as H, onMounted as de, onUnmounted as ge, createVNode as V, withCtx as X, createBlock as Ae, createTextVNode as Oe, normalizeClass as ke } from "vue";
|
|
6
6
|
import * as oe from "echarts";
|
|
7
7
|
import { _ as $ } from "./_plugin-vue_export-helper-dad06003.js";
|
|
8
8
|
import { x as re } from "./index-7ed0999e.js";
|
|
9
9
|
import { i as ve, t as be } from "./index.esm-8d9a2abe.js";
|
|
10
|
-
import "./el-tag-
|
|
11
|
-
import { E as Ee, a as Se } from "./el-select-
|
|
12
|
-
import "./el-scrollbar-
|
|
10
|
+
import "./el-tag-7de14b18.js";
|
|
11
|
+
import { E as Ee, a as Se } from "./el-select-7b52dfc9.js";
|
|
12
|
+
import "./el-scrollbar-e74f90d9.js";
|
|
13
13
|
import "./index-35129268.js";
|
|
14
14
|
import "./index-657047bb.js";
|
|
15
15
|
import "./typescript-7ae59c4c.js";
|
|
16
|
-
import "./vnode-
|
|
17
|
-
import "./index-
|
|
18
|
-
import "./index-
|
|
16
|
+
import "./vnode-c51c8aa3.js";
|
|
17
|
+
import "./index-89502796.js";
|
|
18
|
+
import "./index-fee2efa8.js";
|
|
19
|
+
import "./index-482f09b5.js";
|
|
20
|
+
import "./index-30e29356.js";
|
|
21
|
+
import "./index-b9cbb01d.js";
|
|
19
22
|
import "./scroll-7d352c1f.js";
|
|
20
|
-
import "./debounce-
|
|
23
|
+
import "./debounce-ccdceb02.js";
|
|
21
24
|
const Fe = { class: "st-kline-tips" }, Qe = { class: "st-kline-tips-row" }, _e = /* @__PURE__ */ Me({
|
|
22
25
|
__name: "index",
|
|
23
26
|
props: {
|
|
@@ -1889,11 +1892,11 @@ const Tt = {
|
|
|
1889
1892
|
ref: l
|
|
1890
1893
|
}, null, 512));
|
|
1891
1894
|
}
|
|
1892
|
-
}, Dt = /* @__PURE__ */ $(Tt, [["__scopeId", "data-v-7a2f3dd0"]]),
|
|
1895
|
+
}, Dt = /* @__PURE__ */ $(Tt, [["__scopeId", "data-v-7a2f3dd0"]]), Bt = {
|
|
1893
1896
|
install(a) {
|
|
1894
1897
|
a.component("st-kline", at), a.component("st-kline-sub-new", zt), a.component("st-kline-tips-new", dt), a.component("st-kline-slide-new", Dt), a.component("st-kline-utils-new", gt);
|
|
1895
1898
|
}
|
|
1896
1899
|
};
|
|
1897
1900
|
export {
|
|
1898
|
-
|
|
1901
|
+
Bt as default
|
|
1899
1902
|
};
|
package/es/KlineBasic.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./base-ef747d02.cjs");const ve=require("./el-dialog-45250561.cjs");require("./el-overlay-39e2e96f.cjs");require("./el-input-c663697a.cjs");const xe=require("./el-input-number-5fda0890.cjs"),be=require("./el-button-338a49b7.cjs"),he=require("./el-empty-bb2b0235.cjs"),ie=require("./el-menu-item-cf9e0e36.cjs");require("./el-tooltip-0ea8fbf8.cjs");require("./el-popper-dca2de0d.cjs");const e=require("vue"),_e=require("echarts"),u=require("./dayjs.min-2c20abe6.cjs"),R=require("./index-8901a38c.cjs"),J=require("./el-message-c500161d.cjs"),K=require("./_plugin-vue_export-helper-f246444f.cjs");require("./el-tag-a2e99294.cjs");const se=require("./el-select-8337856d.cjs");require("./el-scrollbar-802d874d.cjs");require("./index-8feed26f.cjs");require("./index-3a74eae4.cjs");require("./index-f1c702f6.cjs");require("./vnode-6d51e502.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-f3664595.cjs");require("./typescript-b63f8e83.cjs");require("./index-eea0bcb3.cjs");require("./config-provider-d82ea78c.cjs");require("./index-e6deec5d.cjs");require("./debounce-0b77a317.cjs");function Ye(o){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const S in o)if(S!=="default"){const h=Object.getOwnPropertyDescriptor(o,S);Object.defineProperty(b,S,h.get?h:{enumerable:!0,get:()=>o[S]})}}return b.default=o,Object.freeze(b)}const ne=Ye(_e);let W=null;const ke=o=>{const b=R.y(o,{handleReq:S=>{R.v()&&(S.headers.token=R.U())},handleRes:S=>{const{data:h}=S;if(h.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:R.K(),!0}});b.get,W=b.post},we=o=>W("/middleLayer/kline/getKlineBasic",{...o,userId:R.V("id")}),De=o=>W("/middleLayer/kline/getKline",o),Me=async o=>W("/alarm/deliversign/addAlarmPrice",{...o,userId:R.V("id")}),Se=async o=>W("/alarm/deliversign/findAlarmPriceByUserId",{...o,userId:R.V("id")}),ce=async o=>W("/alarm/deliversign/updateAlarmPrice",{...o,userId:R.V("id")}),Ve=async o=>W("/alarm/deliversign/deleteAlarmPrice",{...o,userId:R.V("id")}),{round:z}=R.x,Le=(o,b,S,h,v)=>{const{data:t,time:w}=o,{gridTop:_,gridRight:c,gridLeft:Y,maxShowCounts:k,showSubChart:l}=b;return{animation:!1,grid:{top:`${_}px`,right:`${c}px`,bottom:l?"6px":"24px",left:`${Y}px`},dataZoom:[{type:"inside",startValue:S,endValue:h,maxValueSpan:k}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:r=>{const{axisDimension:D,value:y}=r;return D==="x"?l?"":["6","7","8"].includes(v)?u.dayjs(y).format("YYYY-MM-DD"):y:String(z(y))}}},formatter:()=>""},xAxis:{show:!l,type:"category",data:w,splitLine:{show:!1},axisLabel:{formatter:r=>["6","7","8"].includes(v)?u.dayjs(r).format("YYYY-MM-DD"):r}},yAxis:{type:"value",axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:r=>z(r.min),max:r=>z(r.max)},series:[{type:"candlestick",data:t,itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1}},...o.mainIndicator.map(r=>({name:r.key,type:"line",silent:!0,symbol:"none",data:r.data,lineStyle:{width:r.width||1},itemStyle:{color:r.color}}))],toolbox:{show:!1},brush:{xAxisIndex:"all",brushLink:"all",transformable:!1,outOfBrush:{colorAlpha:2},brushStyle:{color:"rgba(255,255,255,0.1)",borderColor:"rgba(255,255,255,0.4)"}}}},Te=(o,b,S,h,v)=>{const{variety:t,featureId:w,featureType:_}=S,{gridTop:c,gridLeft:Y,gridRight:k}=h;return b.reduce((l,r)=>{const{warnPrice:D}=r,y=o==null?void 0:o.convertToPixel({yAxisIndex:0},D);if(y<=c||y>=(o==null?void 0:o.getHeight()))return l;let E=0;return[...l,{type:"group",name:"warningLine",info:r,draggable:"vertical",children:[{type:"line",info:r,shape:{x1:Y,y1:y,x2:(o==null?void 0:o.getWidth())-k,y2:y},style:{stroke:"#FFF",lineWidth:1,lineDash:[8,4]},z:10},{type:"text",info:r,x:(o==null?void 0:o.getWidth())-k,y:y-5,style:{fill:"#FFF",text:D,stroke:"#000",lineWidth:1,opacity:1},z:10}],ondragstart:V=>{E=V.offsetY},ondrag:V=>{var A;if(V.target&&V.target.childAt(1)){const L=o.convertFromPixel({yAxisIndex:0},y+(V.offsetY-E));(A=V.target.childAt(1))==null||A.animate("style",!1).when(1,{text:z(L,3)}).start()}},ondragend:async V=>{const L=V.offsetY-E;if(L!==0){const N=o==null?void 0:o.convertFromPixel({yAxisIndex:0},L+y),d={id:r.id,warnPrice:z(N,3),featureId:w,featureCode:t,featureType:_};await ce(d),J.ElMessage.success("画线预警修改成功"),v&&v()}}}]},[])},Be={class:"kline-tips"},Ee=e.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(o){return(b,S)=>(e.openBlock(),e.createElementBlock("div",Be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.data,(h,v)=>(e.openBlock(),e.createElementBlock("div",{key:v,class:"kline-tips-item",style:e.normalizeStyle({color:h.color})},e.toDisplayString(h.label)+" "+e.toDisplayString(h.value),5))),128))]))}});const oe=K._export_sfc(Ee,[["__scopeId","data-v-f83b6b36"]]);const Ne={class:"kline-tips"},Fe={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(o){const{round:b,formatValue:S}=R.x,h=o,v=e.computed(()=>{const{data:w,activeIndex:_}=h;if(w.data&&w.data[_]){const c=w.data[_],Y=[{label:"开",value:b(c[0])},{label:"高",value:b(c[3])},{label:"低",value:b(c[2])},{label:"收",value:b(c[1])}];c[4]!==null&&Y.push({label:"额",value:S(c[4])});let k;return c[6]>0?k="red":c[6]<0&&(k="green"),Y.push({label:"涨跌",value:`${b(c[6])}%`,color:k}),Y}return[]}),t=e.computed(()=>{var c;const{data:w,activeIndex:_}=h;return((c=w==null?void 0:w.mainIndicator)==null?void 0:c.map(Y=>({label:Y.key,value:b(Y.data[_]),color:Y.color})))||[]});return(w,_)=>(e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(oe,{data:v.value},null,8,["data"]),e.createVNode(oe,{data:t.value},null,8,["data"])]))}},je=K._export_sfc(Fe,[["__scopeId","data-v-64b5c2a3"]]);const Re={class:"klineSub"},Ae={class:"klineSub-tips"},qe={key:0,class:"klineSub-tips-select"},Oe={__name:"index",props:{cycle:{type:[String,Number],default:()=>null},data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0}},emits:["update:modelValue"],setup(o,{expose:b,emit:S}){const{round:h}=R.x;let v,t;const w=S,_=o,c=e.ref(),Y=e.computed({get(){return _.modelValue},set(r){w("update:modelValue",r)}}),k=e.computed(()=>{var y;const{data:r,activeIndex:D}=_;return((y=r==null?void 0:r.subIndicator)==null?void 0:y.map(E=>({label:E.key,color:E.color,value:E.data[D]||"-"})))||[]});e.onMounted(()=>{v=ne.init(c.value);let r=!0;t=new ResizeObserver(()=>{if(r){r=null;return}v.resize()}),t.observe(c.value)}),e.onUnmounted(()=>{v.dispose(),t.disconnect(),t=null});const l=(r,D)=>{const y=r[D],E=D===0?r[D]:r[D-1];return y[0]===y[1]?y[0]>=E[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:y[1]>y[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return b({connect:r=>{ne.connect([r,v])},draw:(r,D)=>{e.nextTick(()=>{const{startValue:y,endValue:E,maxValueSpan:V}=r,{leftYAxisRange:A,rightYAxisRange:L}=_.data.subIndicator[0],N=_.data.subIndicator.map(d=>{if(d.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:d.data.map((O,P)=>d.seriesColor==="kline"?{value:O,itemStyle:l(_.data.data,P)}:d.seriesColor==="value"?{value:O,itemStyle:{color:O>=0?"#FF0000":"#00FFFF"}}:{value:O,itemStyle:{color:d.seriesColor}})};if(d.series==="line")return{xAxisIndex:0,yAxisIndex:d.yAxis==="right"?2:1,name:d.key,type:"line",silent:!0,symbol:"none",data:d.data,lineStyle:{width:1},itemStyle:{color:d.color}}});v.setOption({animation:!1,grid:{left:`${D.gridLeft}px`,top:"10px",right:`${D.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:y,endValue:E,maxValueSpan:V}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:d=>{const{axisDimension:O,value:P}=d;if(O==="x")return["6","7","8"].includes(_.cycle)?u.dayjs(P).format("YYYY-MM-DD"):P;if(d.axisIndex===1)return String(h(P))}}},formatter:()=>""},xAxis:{type:"category",data:_.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{formatter:d=>["6","7","8"].includes(_.cycle)?u.dayjs(d).format("YYYY-MM-DD"):d}},yAxis:[{position:"right"},{position:"left",min:A==="cover"?d=>d.min:null,max:A==="cover"?d=>d.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:L==="cover"?d=>d.min:null,max:L==="cover"?d=>d.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:N},!0)})}}),(r,D)=>{const y=se.ElOption,E=se.ElSelect;return e.openBlock(),e.createElementBlock("div",Re,[e.createElementVNode("div",Ae,[k.value.length?(e.openBlock(),e.createElementBlock("div",qe,[e.createVNode(E,{modelValue:Y.value,"onUpdate:modelValue":D[0]||(D[0]=V=>Y.value=V),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.subIndicatorList,V=>(e.openBlock(),e.createBlock(y,{key:V.value,label:V.label,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(oe,{data:k.value},null,8,["data"])]),e.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:c},null,512)])}}},Ie=K._export_sfc(Oe,[["__scopeId","data-v-ab519de5"]]),Pe=e.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(o,{emit:b}){const S=b,h=e.ref(),v=e.ref(),t=e.ref({display:"none",top:"0px",left:"0px"}),w=()=>{t.value.display="none",S("closeContextMenuCallBack"),document.removeEventListener("click",w)},_=c=>{if(c.preventDefault(),t.value.display==="block"){const{offsetX:Y,offsetY:k}=c,{offsetWidth:l,offsetHeight:r}=v.value;if(Y<=l&&k<=r)return}h.value.click(),t.value={display:"block",top:`${c.offsetY}px`,left:`${c.offsetX}px`},e.nextTick(()=>{const Y=h.value.getBoundingClientRect(),k=v.value.getBoundingClientRect();k.left+k.width>=Y.right&&(t.value.left=`${c.offsetX-k.width}px`),k.top+k.height>=Y.bottom&&(console.log("高度超出"),t.value.top=`${c.offsetY-k.height}px`)}),document.addEventListener("click",w)};return(c,Y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"contextmenuRef",ref:h,class:"contextmenu",onContextmenu:_,onMouseleave:w},[e.renderSlot(c.$slots,"default",{},void 0,!0),t.value.display!=="none"?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:v,class:"contextmenu-popover",style:e.normalizeStyle(t.value)},[e.renderSlot(c.$slots,"popover",{},void 0,!0)],4)):e.createCommentVNode("",!0)],544))}});const $e=K._export_sfc(Pe,[["__scopeId","data-v-811db6b4"]]);const ue=o=>(e.pushScopeId("data-v-79254471"),o=o(),e.popScopeId(),o),Ce={class:"klineBasic-tips"},We={key:0,class:"klineBasic-sub"},ze={key:1,class:"klineBasic-empty"},Ke={key:2,class:"klineBasic-error"},Ue=ue(()=>e.createElementVNode("div",{class:"klineBasic-error-content"},"加载失败,请刷新重试",-1)),He={style:{"text-align":"center"}},Ze=ue(()=>e.createElementVNode("span",{style:{"margin-right":"10px"}},"预警价格:",-1)),Xe={class:"dialog-footer"},Ge={__name:"index",props:{variety:{type:[String,Number],default:()=>null},varietyName:{type:[String,Number],default:()=>null},featureId:{type:[String,Number],default:()=>null},featureType:{type:[String,Number],default:()=>null},cycle:{type:[String,Number],default:()=>null},mainIndicator:{type:String,default:()=>""},indicatorStore:{type:Object,default:()=>null},startTime:{type:String,default:()=>null},endTime:{type:String,default:()=>null},right:{type:[String,Number],default:1},config:{type:Object,default:()=>({})},env:{type:Object,default:()=>({})},brushRange:{type:[Array,null],default:()=>null}},emits:["change","getFactorData"],setup(o,{expose:b,emit:S}){const h=[{label:"画线预警",key:"drawWarningLine"}];let v=null,t=null,w,_,c=!1,Y=!1;const k=S,l=o,r=e.ref(!1),D=e.ref(!1),y=e.ref(!1),E=e.ref(null),V=e.ref(null),A=e.ref("VOL"),L=e.ref(0),N=e.ref({}),d=e.ref([]),O=e.ref({}),P=e.ref(!1),U=e.ref(""),Q=e.ref([...h]),$=e.computed(()=>({defaultShowCounts:500,addCounts:2e3,maxShowCounts:5e3,loadCheckCounts:500,showSubChart:!0,gridTop:48,gridLeft:80,gridRight:50,showWarningLine:!0,getFactorData:!0,...l.config}));e.watch(()=>{var i,n;return[l.variety,l.cycle,l.mainIndicator,A.value,(i=l.indicatorStore)==null?void 0:i.filterIndicator,(n=l.indicatorStore)==null?void 0:n.customIndicator]},()=>{ee()},{deep:!0}),e.onMounted(()=>{ke(l.env),ee(),window.addEventListener("keydown",ae)}),e.onUnmounted(()=>{t==null||t.off("datazoom"),t==null||t.off("highlight"),t==null||t.off("globalout"),t==null||t.dispose(),v==null||v.dispose(),window.removeEventListener("keydown",ae)});const de=()=>{t||(t=ne.init(E.value),fe(),$.value.showSubChart&&V.value.connect(t),v=R.D(E.value),v.listen(()=>{requestAnimationFrame(()=>{t.resize()})}))},ae=({code:i,ctrlKey:n})=>{if(!(n||r.value))return;const{xAxis:m,dataZoom:f}=t.getOption(),{data:p}=(m==null?void 0:m[0])??{data:[]};let{startValue:a,endValue:s}=(f==null?void 0:f[0])??{};if(p!=null&&p.length){switch(i){case"ArrowUp":{if(s-a<5)return;const M=Math.floor((s-a)/2)+1;a=a+M,s-a<5&&(a=s-4);break}case"ArrowDown":{const M=Math.min(500,s-a);a=a-M-1;break}case"ArrowLeft":{a>0&&(a-=1,s-=1),L.value>0&&(L.value-=1);break}case"ArrowRight":{s<p.length-1&&(a+=1,s+=1),r.value&&L.value<p.length-1&&(L.value+=1);break}}t.dispatchAction({type:"dataZoom",startValue:a,endValue:s}),t.dispatchAction({type:"updateAxisPointer",seriesIndex:0,dataIndex:r.value?L.value:null}),t.dispatchAction({type:"highlight",dataIndex:r.value?L.value:s})}},fe=()=>{t==null||t.on("datazoom",n=>{clearTimeout(_),_=setTimeout(()=>{var f,p,a,s;const{loadCheckCounts:m}=$.value;if((p=(f=t==null?void 0:t.getOption())==null?void 0:f.dataZoom)!=null&&p[0]){const{startValue:M}=(s=(a=t==null?void 0:t.getOption())==null?void 0:a.dataZoom)==null?void 0:s[0];M<m&&c===!1&&Y===!1&&(c=!0,pe("history")),H()}clearTimeout(_)},100)}),t==null||t.on("highlight",n=>{var f,p;let m=n.dataIndex||-1;n.batch&&(m=typeof((f=n==null?void 0:n.batch[0])==null?void 0:f.dataIndex)=="number"?(p=n==null?void 0:n.batch[0])==null?void 0:p.dataIndex:-1),clearTimeout(w),w=setTimeout(()=>{L.value=m,clearTimeout(w)},20)}),t==null||t.on("globalout",()=>{var m,f,p;const n=(p=(f=(m=t==null?void 0:t.getOption())==null?void 0:m.dataZoom)==null?void 0:f[0])==null?void 0:p.endValue;L.value=n});let i=null;t==null||t.on("contextmenu",n=>{i=setTimeout(()=>{n.componentType==="graphic"&&(O.value=n.info,Q.value=[{label:"删除画线",key:"deleteWarningLine"},{label:"修改画线",key:"changeWarningLine"}]),clearTimeout(i),i=null})})},ee=async()=>{var i,n,m,f,p,a;try{if(!l.variety||!l.cycle)return;const{variety:s,featureId:M,cycle:T,indicatorStore:x,mainIndicator:I,right:X,startTime:C,endTime:B}=l,{defaultShowCounts:F,addCounts:g,showWarningLine:te,getFactorData:G}=$.value,j={variety:s,featureId:M,cycle:T,mainIndicatorList:x.getIndicatorParams(I),subIndicator:A.value,right:X,showWarningLine:te,getFactorData:G};C&&B?(j.startTime=C,j.endTime=B):C?(j.startTime=C,j.limit=F+g):B?(j.endTime=B,j.limit=F+g):(j.endTime=u.dayjs().add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),j.limit=F+g);const q=await we(j);if((m=(n=(i=q==null?void 0:q.body)==null?void 0:i.kline)==null?void 0:n.time)!=null&&m.length)D.value=!1,y.value=!1;else{D.value=!0,y.value=!1;return}N.value=(f=q==null?void 0:q.body)==null?void 0:f.kline,d.value=((p=q==null?void 0:q.body)==null?void 0:p.warningLine)||[],re(),H(),G&&k("getFactorData",(a=q==null?void 0:q.body)==null?void 0:a.factor)}catch(s){throw y.value=!0,D.value=!1,new Error(s)}},pe=async i=>{const{variety:n,cycle:m,indicatorStore:f,mainIndicator:p,right:a}=l,{addCounts:s}=$.value,{time:M}=N.value;if(i==="history"){const T=await De({variety:n,cycle:m,endTime:M[0],limit:s,mainIndicatorList:f.getIndicatorParams(p),subIndicator:A.value,right:a});N.value={time:[...T.body.time,...N.value.time.slice(1)],data:[...T.body.data,...N.value.data.slice(1)],mainIndicator:N.value.mainIndicator.map((x,I)=>({...x,data:[...T.body.mainIndicator[I].data,...x.data.slice(1)]})),subIndicator:N.value.subIndicator.map((x,I)=>({...x,data:[...T.body.subIndicator[I].data,...x.data.slice(1)]}))},re(!0),T.body.data.length<s&&(Y=!0),c=!1}},re=(i=!1)=>{var I,X,C;de();const{time:n}=N.value,{gridRight:m,gridLeft:f,defaultShowCounts:p,maxShowCounts:a,showSubChart:s}=$.value;let M=n.length-1-p,T=n.length-1;if(i){const B=t.getOption(),F=(X=(I=B==null?void 0:B.xAxis)==null?void 0:I[0])==null?void 0:X.data,g=(C=B==null?void 0:B.dataZoom)==null?void 0:C[0],te=F[g==null?void 0:g.startValue],G=F[g==null?void 0:g.endValue];M=n.findIndex(j=>j===te),T=n.findIndex(j=>j===G)}const x=Le(N.value,$.value,M,T,l.cycle);if(t.setOption(x,!0),L.value=T,l.brushRange){let B=null,F=null;switch(l.cycle){case"6":{B=n.find(g=>new Date(g).getTime()>=new Date(l.brushRange[0]).getTime()||u.dayjs(g).format("YYYY-MM-DD")===u.dayjs(l.brushRange[0]).format("YYYY-MM-DD")),F=n.findLast(g=>new Date(g).getTime()<=new Date(l.brushRange[1]).getTime()||u.dayjs(g).format("YYYY-MM-DD")===u.dayjs(l.brushRange[1]).format("YYYY-MM-DD"));break}case"7":{B=n.find(g=>u.dayjs(g).day(5).format("YYYY-MM-DD")===u.dayjs(l.brushRange[0]).day(5).format("YYYY-MM-DD")),F=n.findLast(g=>u.dayjs(g).day(5).format("YYYY-MM-DD")===u.dayjs(l.brushRange[1]).day(5).format("YYYY-MM-DD"));break}case"8":{B=n.find(g=>u.dayjs(g).endOf("month").format("YYYY-MM-DD")===u.dayjs(l.brushRange[0]).endOf("month").format("YYYY-MM-DD")),F=n.findLast(g=>u.dayjs(g).endOf("month").format("YYYY-MM-DD")===u.dayjs(l.brushRange[1]).endOf("month").format("YYYY-MM-DD"));break}default:B=n.find(g=>new Date(g).getTime()>=new Date(l.brushRange[0]).getTime()),F=n.findLast(g=>new Date(g).getTime()<=new Date(l.brushRange[1]).getTime())}console.log(B,F),t.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[B,F],xAxisIndex:0}]})}s&&V.value.draw({startValue:M,endValue:T,maxValueSpan:a},{gridLeft:f,gridRight:m}),le()},H=()=>{if(!t)return;const i=t==null?void 0:t.getOption();i&&(t==null||t.setOption({...i,graphic:[...Te(t,d.value,l,$.value,()=>{Z()})]},!0),le())},le=()=>{const{time:i}=N.value;if(l.brushRange&&(i!=null&&i.length)){let n=u.dayjs(l.brushRange[0]).format("YYYY-MM-DD 00:00:00"),m=u.dayjs(l.brushRange[1]).format("YYYY-MM-DD 23:59:59"),f=null,p=null;switch(l.cycle){case"6":{f=i.find(a=>u.dayjs(a).format("YYYY-MM-DD")===u.dayjs(n).format("YYYY-MM-DD")),p=f;break}case"7":{f=i.find(a=>u.dayjs(a).day(5).format("YYYY-MM-DD")===u.dayjs(n).day(5).format("YYYY-MM-DD")),p=i.findLast(a=>u.dayjs(a).day(5).format("YYYY-MM-DD")===u.dayjs(m).day(5).format("YYYY-MM-DD"));break}case"8":{f=i.find(a=>u.dayjs(a).endOf("month").format("YYYY-MM-DD")===u.dayjs(n).endOf("month").format("YYYY-MM-DD")),p=i.findLast(a=>u.dayjs(a).endOf("month").format("YYYY-MM-DD")===u.dayjs(m).endOf("month").format("YYYY-MM-DD"));break}default:f=i.find(a=>{const s=u.dayjs(a).format("YYYY-MM-DD")===u.dayjs(n).format("YYYY-MM-DD"),M=new Date(a).getTime()>=new Date(n).getTime();return s&&M}),p=i.findLast(a=>{const s=u.dayjs(a).format("YYYY-MM-DD")===u.dayjs(m).format("YYYY-MM-DD"),M=new Date(a).getTime()<=new Date(m).getTime();return s&&M})}t.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[f,p],xAxisIndex:0}]})}},Z=async()=>{const i=await Se({featureId:l.featureId});d.value=(i==null?void 0:i.body)||[],H(),k("change","warningLine",d.value)},ye=async i=>{const{variety:n,varietyName:m,featureId:f,featureType:p}=l;if(i.key==="drawWarningLine"){const a=t==null?void 0:t.getOption(),s=a.tooltip[0];t==null||t.setOption({...a,tooltip:{...s,axisPointer:{...s.axisPointer,lineStyle:{width:0},crossStyle:{width:2},label:{...s.axisPointer.label,backgroundColor:"transparent",formatter:T=>""}}}});const M=async T=>{t==null||t.getZr().off("mousedown",M);const x=t==null?void 0:t.convertFromPixel({yAxisIndex:0},T.offsetY),I=Math.round(x*1e3)/1e3;t==null||t.setOption({...a,tooltip:{...s,axisPointer:{...s.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...s.axisPointer.label,backgroundColor:null}}}}),await Me({featureCode:n,featureName:m,featureId:f,featureType:p,warnPrice:I}),J.ElMessage.success("画线预警成功!"),Z()};t==null||t.getZr().on("mousedown",M)}else i.key==="deleteWarningLine"?(await Ve({id:O.value.id}),J.ElMessage.success("画线预警删除成功"),Z()):i.key==="changeWarningLine"&&(P.value=!0,U.value=O.value.warnPrice)},me=async()=>{const{variety:i,varietyName:n,featureId:m,featureType:f}=l;await ce({id:O.value.id,featureCode:i,featureName:n,featureId:m,featureType:f,warnPrice:U.value}),J.ElMessage.success("画线预警修改成功"),Z()},ge=()=>{Q.value=[...h]};return b({draw:(i,n)=>{i==="warningLine"&&(d.value=n,H())}}),(i,n)=>{var T;const m=ie.ElMenuItem,f=ie.ElMenu,p=he.ElEmpty,a=be.ElButton,s=xe.ElInputNumber,M=ve.ElDialog;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"klineBasic",onMousemove:n[1]||(n[1]=x=>r.value=!0),onMouseout:n[2]||(n[2]=x=>r.value=!1)},[e.createElementVNode("div",Ce,[e.createVNode(je,{data:N.value,activeIndex:L.value},null,8,["data","activeIndex"])]),e.createElementVNode("div",{class:"klineBasic-main",style:e.normalizeStyle({height:$.value.showSubChart?"70%":"100%"})},[e.createVNode($e,{onCloseContextMenuCallBack:ge},{popover:e.withCtx(()=>[e.createVNode(f,{style:{borderRadius:"4px",overflow:"hidden",background:"#fff",borderRight:0}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,x=>(e.openBlock(),e.createBlock(m,{style:{height:"36px"},key:x.key,index:x.key,onClick:I=>ye(x)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"klineBasicMainRef",ref:E,style:{height:"100%"}},null,512)]),_:1})],4),$.value.showSubChart?(e.openBlock(),e.createElementBlock("div",We,[e.createVNode(Ie,{ref_key:"klineSubRef",ref:V,modelValue:A.value,"onUpdate:modelValue":n[0]||(n[0]=x=>A.value=x),data:N.value,cycle:o.cycle,activeIndex:L.value,subIndicatorList:(T=o.indicatorStore)==null?void 0:T.subIndicatorList},null,8,["modelValue","data","cycle","activeIndex","subIndicatorList"])])):e.createCommentVNode("",!0),D.value?(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(p,{class:"klineBasic-empty-content",description:"暂无数据"})])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("div",Ke,[Ue,e.createElementVNode("div",He,[e.createVNode(a,{onClick:ee},{default:e.withCtx(()=>[e.createTextVNode("刷新")]),_:1})])])):e.createCommentVNode("",!0)],32),e.createVNode(M,{modelValue:P.value,"onUpdate:modelValue":n[5]||(n[5]=x=>P.value=x),title:"画线预警-修改价格",width:"30%","align-center":""},{footer:e.withCtx(()=>[e.createElementVNode("span",Xe,[e.createVNode(a,{onClick:n[4]||(n[4]=x=>P.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(a,{type:"primary",onClick:me},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})])]),default:e.withCtx(()=>[Ze,e.createVNode(s,{modelValue:U.value,"onUpdate:modelValue":n[3]||(n[3]=x=>U.value=x),placeholder:"输入预警价格"},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},Je=K._export_sfc(Ge,[["__scopeId","data-v-79254471"]]),Qe={install(o){o.component("st-klineBasic",Je)}};module.exports=Qe;
|
|
1
|
+
"use strict";require("./base-ef747d02.cjs");const ve=require("./el-dialog-ae8da57b.cjs");require("./el-overlay-f42f765e.cjs");require("./el-input-fc445025.cjs");const xe=require("./el-input-number-25e0cdc0.cjs"),be=require("./el-button-8dd00125.cjs"),he=require("./el-empty-1697ded8.cjs"),ie=require("./el-menu-item-940c40eb.cjs");require("./el-tooltip-0ea8fbf8.cjs");require("./el-popper-f194e471.cjs");const e=require("vue"),_e=require("echarts"),c=require("./dayjs.min-2c20abe6.cjs"),j=require("./index-8901a38c.cjs"),J=require("./el-message-0a3a0f2a.cjs"),K=require("./_plugin-vue_export-helper-f246444f.cjs");require("./el-tag-65658264.cjs");const se=require("./el-select-f416ce28.cjs");require("./el-scrollbar-1c9093bf.cjs");require("./index-8feed26f.cjs");require("./index-bb833443.cjs");require("./index-9780a537.cjs");require("./index-f1c702f6.cjs");require("./vnode-b906ae6d.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-b6bc4c2f.cjs");require("./index-62df8bda.cjs");require("./typescript-b63f8e83.cjs");require("./index-02f7b722.cjs");require("./index-eea0bcb3.cjs");require("./config-provider-87edaad3.cjs");require("./index-4cd86c5e.cjs");require("./debounce-62f5b6e8.cjs");function Ye(o){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const S in o)if(S!=="default"){const h=Object.getOwnPropertyDescriptor(o,S);Object.defineProperty(b,S,h.get?h:{enumerable:!0,get:()=>o[S]})}}return b.default=o,Object.freeze(b)}const ne=Ye(_e);let W=null;const ke=o=>{const b=j.y(o,{handleReq:S=>{j.v()&&(S.headers.token=j.U())},handleRes:S=>{const{data:h}=S;if(h.code===401)return location.origin.includes("localhost")?location.href=`${location.origin}/#/404`:j.K(),!0}});b.get,W=b.post},we=o=>W("/middleLayer/kline/getKlineBasic",{...o,userId:j.V("id")}),De=o=>W("/middleLayer/kline/getKline",o),Me=async o=>W("/alarm/deliversign/addAlarmPrice",{...o,userId:j.V("id")}),Se=async o=>W("/alarm/deliversign/findAlarmPriceByUserId",{...o,userId:j.V("id")}),ue=async o=>W("/alarm/deliversign/updateAlarmPrice",{...o,userId:j.V("id")}),Ve=async o=>W("/alarm/deliversign/deleteAlarmPrice",{...o,userId:j.V("id")}),{round:z}=j.x,Le=(o,b,S,h,v)=>{const{data:t,time:w}=o,{gridTop:_,gridRight:u,gridLeft:Y,maxShowCounts:k,showSubChart:l}=b;return{animation:!1,grid:{top:`${_}px`,right:`${u}px`,bottom:l?"6px":"24px",left:`${Y}px`},dataZoom:[{type:"inside",startValue:S,endValue:h,maxValueSpan:k}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:r=>{const{axisDimension:D,value:y}=r;return D==="x"?l?"":["6","7","8"].includes(v)?c.dayjs(y).format("YYYY-MM-DD"):y:String(z(y))}}},formatter:()=>""},xAxis:{show:!l,type:"category",data:w,splitLine:{show:!1},axisLabel:{formatter:r=>["6","7","8"].includes(v)?c.dayjs(r).format("YYYY-MM-DD"):r}},yAxis:{type:"value",axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}},min:r=>z(r.min),max:r=>z(r.max)},series:[{type:"candlestick",data:t,itemStyle:{color:"transparent",color0:"#00FFFF",borderColor:"#FF0000",borderColor0:"#00FFFF",borderWidth:1}},...o.mainIndicator.map(r=>({name:r.key,type:"line",silent:!0,symbol:"none",data:r.data,lineStyle:{width:r.width||1},itemStyle:{color:r.color}}))],toolbox:{show:!1},brush:{xAxisIndex:"all",brushLink:"all",transformable:!1,outOfBrush:{colorAlpha:2},brushStyle:{color:"rgba(255,255,255,0.1)",borderColor:"rgba(255,255,255,0.4)"}}}},Te=(o,b,S,h,v)=>{const{variety:t,featureId:w,featureType:_}=S,{gridTop:u,gridLeft:Y,gridRight:k}=h;return b.reduce((l,r)=>{const{warnPrice:D}=r,y=o==null?void 0:o.convertToPixel({yAxisIndex:0},D);if(y<=u||y>=(o==null?void 0:o.getHeight()))return l;let E=0;return[...l,{type:"group",name:"warningLine",info:r,draggable:"vertical",children:[{type:"line",info:r,shape:{x1:Y,y1:y,x2:(o==null?void 0:o.getWidth())-k,y2:y},style:{stroke:"#FFF",lineWidth:1,lineDash:[8,4]},z:10},{type:"text",info:r,x:(o==null?void 0:o.getWidth())-k,y:y-5,style:{fill:"#FFF",text:D,stroke:"#000",lineWidth:1,opacity:1},z:10}],ondragstart:V=>{E=V.offsetY},ondrag:V=>{var R;if(V.target&&V.target.childAt(1)){const L=o.convertFromPixel({yAxisIndex:0},y+(V.offsetY-E));(R=V.target.childAt(1))==null||R.animate("style",!1).when(1,{text:z(L,3)}).start()}},ondragend:async V=>{const L=V.offsetY-E;if(L!==0){const N=o==null?void 0:o.convertFromPixel({yAxisIndex:0},L+y),d={id:r.id,warnPrice:z(N,3),featureId:w,featureCode:t,featureType:_};await ue(d),J.ElMessage.success("画线预警修改成功"),v&&v()}}}]},[])},Be={class:"kline-tips"},Ee=e.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(o){return(b,S)=>(e.openBlock(),e.createElementBlock("div",Be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.data,(h,v)=>(e.openBlock(),e.createElementBlock("div",{key:v,class:"kline-tips-item",style:e.normalizeStyle({color:h.color})},e.toDisplayString(h.label)+" "+e.toDisplayString(h.value),5))),128))]))}});const oe=K._export_sfc(Ee,[["__scopeId","data-v-f83b6b36"]]);const Ne={class:"kline-tips"},Fe={__name:"index",props:{data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0}},setup(o){const{round:b,formatValue:S}=j.x,h=o,v=e.computed(()=>{const{data:w,activeIndex:_}=h;if(w.data&&w.data[_]){const u=w.data[_],Y=[{label:"开",value:b(u[0])},{label:"高",value:b(u[3])},{label:"低",value:b(u[2])},{label:"收",value:b(u[1])}];u[4]!==null&&Y.push({label:"额",value:S(u[4])});let k;return u[6]>0?k="red":u[6]<0&&(k="green"),Y.push({label:"涨跌",value:`${b(u[6])}%`,color:k}),Y}return[]}),t=e.computed(()=>{var u;const{data:w,activeIndex:_}=h;return((u=w==null?void 0:w.mainIndicator)==null?void 0:u.map(Y=>({label:Y.key,value:b(Y.data[_]),color:Y.color})))||[]});return(w,_)=>(e.openBlock(),e.createElementBlock("div",Ne,[e.createVNode(oe,{data:v.value},null,8,["data"]),e.createVNode(oe,{data:t.value},null,8,["data"])]))}},qe=K._export_sfc(Fe,[["__scopeId","data-v-64b5c2a3"]]);const je={class:"klineSub"},Re={class:"klineSub-tips"},Ae={key:0,class:"klineSub-tips-select"},Oe={__name:"index",props:{cycle:{type:[String,Number],default:()=>null},data:{type:Object,require:!0},activeIndex:{type:[Number,String],require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0}},emits:["update:modelValue"],setup(o,{expose:b,emit:S}){const{round:h}=j.x;let v,t;const w=S,_=o,u=e.ref(),Y=e.computed({get(){return _.modelValue},set(r){w("update:modelValue",r)}}),k=e.computed(()=>{var y;const{data:r,activeIndex:D}=_;return((y=r==null?void 0:r.subIndicator)==null?void 0:y.map(E=>({label:E.key,color:E.color,value:E.data[D]||"-"})))||[]});e.onMounted(()=>{v=ne.init(u.value);let r=!0;t=new ResizeObserver(()=>{if(r){r=null;return}v.resize()}),t.observe(u.value)}),e.onUnmounted(()=>{v.dispose(),t.disconnect(),t=null});const l=(r,D)=>{const y=r[D],E=D===0?r[D]:r[D-1];return y[0]===y[1]?y[0]>=E[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:y[1]>y[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return b({connect:r=>{ne.connect([r,v])},draw:(r,D)=>{e.nextTick(()=>{const{startValue:y,endValue:E,maxValueSpan:V}=r,{leftYAxisRange:R,rightYAxisRange:L}=_.data.subIndicator[0],N=_.data.subIndicator.map(d=>{if(d.series==="bar")return{name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:d.data.map((O,P)=>d.seriesColor==="kline"?{value:O,itemStyle:l(_.data.data,P)}:d.seriesColor==="value"?{value:O,itemStyle:{color:O>=0?"#FF0000":"#00FFFF"}}:{value:O,itemStyle:{color:d.seriesColor}})};if(d.series==="line")return{xAxisIndex:0,yAxisIndex:d.yAxis==="right"?2:1,name:d.key,type:"line",silent:!0,symbol:"none",data:d.data,lineStyle:{width:1},itemStyle:{color:d.color}}});v.setOption({animation:!1,grid:{left:`${D.gridLeft}px`,top:"10px",right:`${D.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:y,endValue:E,maxValueSpan:V}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:d=>{const{axisDimension:O,value:P}=d;if(O==="x")return["6","7","8"].includes(_.cycle)?c.dayjs(P).format("YYYY-MM-DD"):P;if(d.axisIndex===1)return String(h(P))}}},formatter:()=>""},xAxis:{type:"category",data:_.data.time,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{formatter:d=>["6","7","8"].includes(_.cycle)?c.dayjs(d).format("YYYY-MM-DD"):d}},yAxis:[{position:"right"},{position:"left",min:R==="cover"?d=>d.min:null,max:R==="cover"?d=>d.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:L==="cover"?d=>d.min:null,max:L==="cover"?d=>d.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:N},!0)})}}),(r,D)=>{const y=se.ElOption,E=se.ElSelect;return e.openBlock(),e.createElementBlock("div",je,[e.createElementVNode("div",Re,[k.value.length?(e.openBlock(),e.createElementBlock("div",Ae,[e.createVNode(E,{modelValue:Y.value,"onUpdate:modelValue":D[0]||(D[0]=V=>Y.value=V),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.subIndicatorList,V=>(e.openBlock(),e.createBlock(y,{key:V.value,label:V.label,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0),e.createVNode(oe,{data:k.value},null,8,["data"])]),e.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:u},null,512)])}}},Ie=K._export_sfc(Oe,[["__scopeId","data-v-ab519de5"]]),Pe=e.defineComponent({__name:"index",emits:["closeContextMenuCallBack"],setup(o,{emit:b}){const S=b,h=e.ref(),v=e.ref(),t=e.ref({display:"none",top:"0px",left:"0px"}),w=()=>{t.value.display="none",S("closeContextMenuCallBack"),document.removeEventListener("click",w)},_=u=>{if(u.preventDefault(),t.value.display==="block"){const{offsetX:Y,offsetY:k}=u,{offsetWidth:l,offsetHeight:r}=v.value;if(Y<=l&&k<=r)return}h.value.click(),t.value={display:"block",top:`${u.offsetY}px`,left:`${u.offsetX}px`},e.nextTick(()=>{const Y=h.value.getBoundingClientRect(),k=v.value.getBoundingClientRect();k.left+k.width>=Y.right&&(t.value.left=`${u.offsetX-k.width}px`),k.top+k.height>=Y.bottom&&(console.log("高度超出"),t.value.top=`${u.offsetY-k.height}px`)}),document.addEventListener("click",w)};return(u,Y)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"contextmenuRef",ref:h,class:"contextmenu",onContextmenu:_,onMouseleave:w},[e.renderSlot(u.$slots,"default",{},void 0,!0),t.value.display!=="none"?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"contextmenuContentRef",ref:v,class:"contextmenu-popover",style:e.normalizeStyle(t.value)},[e.renderSlot(u.$slots,"popover",{},void 0,!0)],4)):e.createCommentVNode("",!0)],544))}});const $e=K._export_sfc(Pe,[["__scopeId","data-v-811db6b4"]]);const ce=o=>(e.pushScopeId("data-v-79254471"),o=o(),e.popScopeId(),o),Ce={class:"klineBasic-tips"},We={key:0,class:"klineBasic-sub"},ze={key:1,class:"klineBasic-empty"},Ke={key:2,class:"klineBasic-error"},Ue=ce(()=>e.createElementVNode("div",{class:"klineBasic-error-content"},"加载失败,请刷新重试",-1)),He={style:{"text-align":"center"}},Ze=ce(()=>e.createElementVNode("span",{style:{"margin-right":"10px"}},"预警价格:",-1)),Xe={class:"dialog-footer"},Ge={__name:"index",props:{variety:{type:[String,Number],default:()=>null},varietyName:{type:[String,Number],default:()=>null},featureId:{type:[String,Number],default:()=>null},featureType:{type:[String,Number],default:()=>null},cycle:{type:[String,Number],default:()=>null},mainIndicator:{type:String,default:()=>""},indicatorStore:{type:Object,default:()=>null},startTime:{type:String,default:()=>null},endTime:{type:String,default:()=>null},right:{type:[String,Number],default:1},config:{type:Object,default:()=>({})},env:{type:Object,default:()=>({})},brushRange:{type:[Array,null],default:()=>null}},emits:["change","getFactorData"],setup(o,{expose:b,emit:S}){const h=[{label:"画线预警",key:"drawWarningLine"}];let v=null,t=null,w,_,u=!1,Y=!1;const k=S,l=o,r=e.ref(!1),D=e.ref(!1),y=e.ref(!1),E=e.ref(null),V=e.ref(null),R=e.ref("VOL"),L=e.ref(0),N=e.ref({}),d=e.ref([]),O=e.ref({}),P=e.ref(!1),U=e.ref(""),Q=e.ref([...h]),$=e.computed(()=>({defaultShowCounts:500,addCounts:2e3,maxShowCounts:5e3,loadCheckCounts:500,showSubChart:!0,gridTop:48,gridLeft:80,gridRight:50,showWarningLine:!0,getFactorData:!0,...l.config}));e.watch(()=>{var i,n;return[l.variety,l.cycle,l.mainIndicator,R.value,(i=l.indicatorStore)==null?void 0:i.filterIndicator,(n=l.indicatorStore)==null?void 0:n.customIndicator]},()=>{ee()},{deep:!0}),e.onMounted(()=>{ke(l.env),ee(),window.addEventListener("keydown",ae)}),e.onUnmounted(()=>{t==null||t.off("datazoom"),t==null||t.off("highlight"),t==null||t.off("globalout"),t==null||t.dispose(),v==null||v.dispose(),window.removeEventListener("keydown",ae)});const de=()=>{t||(t=ne.init(E.value),fe(),$.value.showSubChart&&V.value.connect(t),v=j.D(E.value),v.listen(()=>{requestAnimationFrame(()=>{t.resize()})}))},ae=({code:i,ctrlKey:n})=>{if(!(n||r.value))return;const{xAxis:m,dataZoom:f}=t.getOption(),{data:p}=(m==null?void 0:m[0])??{data:[]};let{startValue:a,endValue:s}=(f==null?void 0:f[0])??{};if(p!=null&&p.length){switch(i){case"ArrowUp":{if(s-a<5)return;const M=Math.floor((s-a)/2)+1;a=a+M,s-a<5&&(a=s-4);break}case"ArrowDown":{const M=Math.min(500,s-a);a=a-M-1;break}case"ArrowLeft":{a>0&&(a-=1,s-=1),L.value>0&&(L.value-=1);break}case"ArrowRight":{s<p.length-1&&(a+=1,s+=1),r.value&&L.value<p.length-1&&(L.value+=1);break}}t.dispatchAction({type:"dataZoom",startValue:a,endValue:s}),t.dispatchAction({type:"updateAxisPointer",seriesIndex:0,dataIndex:r.value?L.value:null}),t.dispatchAction({type:"highlight",dataIndex:r.value?L.value:s})}},fe=()=>{t==null||t.on("datazoom",n=>{clearTimeout(_),_=setTimeout(()=>{var f,p,a,s;const{loadCheckCounts:m}=$.value;if((p=(f=t==null?void 0:t.getOption())==null?void 0:f.dataZoom)!=null&&p[0]){const{startValue:M}=(s=(a=t==null?void 0:t.getOption())==null?void 0:a.dataZoom)==null?void 0:s[0];M<m&&u===!1&&Y===!1&&(u=!0,pe("history")),H()}clearTimeout(_)},100)}),t==null||t.on("highlight",n=>{var f,p;let m=n.dataIndex||-1;n.batch&&(m=typeof((f=n==null?void 0:n.batch[0])==null?void 0:f.dataIndex)=="number"?(p=n==null?void 0:n.batch[0])==null?void 0:p.dataIndex:-1),clearTimeout(w),w=setTimeout(()=>{L.value=m,clearTimeout(w)},20)}),t==null||t.on("globalout",()=>{var m,f,p;const n=(p=(f=(m=t==null?void 0:t.getOption())==null?void 0:m.dataZoom)==null?void 0:f[0])==null?void 0:p.endValue;L.value=n});let i=null;t==null||t.on("contextmenu",n=>{i=setTimeout(()=>{n.componentType==="graphic"&&(O.value=n.info,Q.value=[{label:"删除画线",key:"deleteWarningLine"},{label:"修改画线",key:"changeWarningLine"}]),clearTimeout(i),i=null})})},ee=async()=>{var i,n,m,f,p,a;try{if(!l.variety||!l.cycle)return;const{variety:s,featureId:M,cycle:T,indicatorStore:x,mainIndicator:I,right:X,startTime:C,endTime:B}=l,{defaultShowCounts:F,addCounts:g,showWarningLine:te,getFactorData:G}=$.value,q={variety:s,featureId:M,cycle:T,mainIndicatorList:x.getIndicatorParams(I),subIndicator:R.value,right:X,showWarningLine:te,getFactorData:G};C&&B?(q.startTime=C,q.endTime=B):C?(q.startTime=C,q.limit=F+g):B?(q.endTime=B,q.limit=F+g):(q.endTime=c.dayjs().add(1,"hour").format("YYYY-MM-DD HH:mm:ss"),q.limit=F+g);const A=await we(q);if((m=(n=(i=A==null?void 0:A.body)==null?void 0:i.kline)==null?void 0:n.time)!=null&&m.length)D.value=!1,y.value=!1;else{D.value=!0,y.value=!1;return}N.value=(f=A==null?void 0:A.body)==null?void 0:f.kline,d.value=((p=A==null?void 0:A.body)==null?void 0:p.warningLine)||[],re(),H(),G&&k("getFactorData",(a=A==null?void 0:A.body)==null?void 0:a.factor)}catch(s){throw y.value=!0,D.value=!1,new Error(s)}},pe=async i=>{const{variety:n,cycle:m,indicatorStore:f,mainIndicator:p,right:a}=l,{addCounts:s}=$.value,{time:M}=N.value;if(i==="history"){const T=await De({variety:n,cycle:m,endTime:M[0],limit:s,mainIndicatorList:f.getIndicatorParams(p),subIndicator:R.value,right:a});N.value={time:[...T.body.time,...N.value.time.slice(1)],data:[...T.body.data,...N.value.data.slice(1)],mainIndicator:N.value.mainIndicator.map((x,I)=>({...x,data:[...T.body.mainIndicator[I].data,...x.data.slice(1)]})),subIndicator:N.value.subIndicator.map((x,I)=>({...x,data:[...T.body.subIndicator[I].data,...x.data.slice(1)]}))},re(!0),T.body.data.length<s&&(Y=!0),u=!1}},re=(i=!1)=>{var I,X,C;de();const{time:n}=N.value,{gridRight:m,gridLeft:f,defaultShowCounts:p,maxShowCounts:a,showSubChart:s}=$.value;let M=n.length-1-p,T=n.length-1;if(i){const B=t.getOption(),F=(X=(I=B==null?void 0:B.xAxis)==null?void 0:I[0])==null?void 0:X.data,g=(C=B==null?void 0:B.dataZoom)==null?void 0:C[0],te=F[g==null?void 0:g.startValue],G=F[g==null?void 0:g.endValue];M=n.findIndex(q=>q===te),T=n.findIndex(q=>q===G)}const x=Le(N.value,$.value,M,T,l.cycle);if(t.setOption(x,!0),L.value=T,l.brushRange){let B=null,F=null;switch(l.cycle){case"6":{B=n.find(g=>new Date(g).getTime()>=new Date(l.brushRange[0]).getTime()||c.dayjs(g).format("YYYY-MM-DD")===c.dayjs(l.brushRange[0]).format("YYYY-MM-DD")),F=n.findLast(g=>new Date(g).getTime()<=new Date(l.brushRange[1]).getTime()||c.dayjs(g).format("YYYY-MM-DD")===c.dayjs(l.brushRange[1]).format("YYYY-MM-DD"));break}case"7":{B=n.find(g=>c.dayjs(g).day(5).format("YYYY-MM-DD")===c.dayjs(l.brushRange[0]).day(5).format("YYYY-MM-DD")),F=n.findLast(g=>c.dayjs(g).day(5).format("YYYY-MM-DD")===c.dayjs(l.brushRange[1]).day(5).format("YYYY-MM-DD"));break}case"8":{B=n.find(g=>c.dayjs(g).endOf("month").format("YYYY-MM-DD")===c.dayjs(l.brushRange[0]).endOf("month").format("YYYY-MM-DD")),F=n.findLast(g=>c.dayjs(g).endOf("month").format("YYYY-MM-DD")===c.dayjs(l.brushRange[1]).endOf("month").format("YYYY-MM-DD"));break}default:B=n.find(g=>new Date(g).getTime()>=new Date(l.brushRange[0]).getTime()),F=n.findLast(g=>new Date(g).getTime()<=new Date(l.brushRange[1]).getTime())}console.log(B,F),t.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[B,F],xAxisIndex:0}]})}s&&V.value.draw({startValue:M,endValue:T,maxValueSpan:a},{gridLeft:f,gridRight:m}),le()},H=()=>{if(!t)return;const i=t==null?void 0:t.getOption();i&&(t==null||t.setOption({...i,graphic:[...Te(t,d.value,l,$.value,()=>{Z()})]},!0),le())},le=()=>{const{time:i}=N.value;if(l.brushRange&&(i!=null&&i.length)){let n=c.dayjs(l.brushRange[0]).format("YYYY-MM-DD 00:00:00"),m=c.dayjs(l.brushRange[1]).format("YYYY-MM-DD 23:59:59"),f=null,p=null;switch(l.cycle){case"6":{f=i.find(a=>c.dayjs(a).format("YYYY-MM-DD")===c.dayjs(n).format("YYYY-MM-DD")),p=f;break}case"7":{f=i.find(a=>c.dayjs(a).day(5).format("YYYY-MM-DD")===c.dayjs(n).day(5).format("YYYY-MM-DD")),p=i.findLast(a=>c.dayjs(a).day(5).format("YYYY-MM-DD")===c.dayjs(m).day(5).format("YYYY-MM-DD"));break}case"8":{f=i.find(a=>c.dayjs(a).endOf("month").format("YYYY-MM-DD")===c.dayjs(n).endOf("month").format("YYYY-MM-DD")),p=i.findLast(a=>c.dayjs(a).endOf("month").format("YYYY-MM-DD")===c.dayjs(m).endOf("month").format("YYYY-MM-DD"));break}default:f=i.find(a=>{const s=c.dayjs(a).format("YYYY-MM-DD")===c.dayjs(n).format("YYYY-MM-DD"),M=new Date(a).getTime()>=new Date(n).getTime();return s&&M}),p=i.findLast(a=>{const s=c.dayjs(a).format("YYYY-MM-DD")===c.dayjs(m).format("YYYY-MM-DD"),M=new Date(a).getTime()<=new Date(m).getTime();return s&&M})}t.dispatchAction({type:"brush",areas:[{brushType:"lineX",coordRange:[f,p],xAxisIndex:0}]})}},Z=async()=>{const i=await Se({featureId:l.featureId});d.value=(i==null?void 0:i.body)||[],H(),k("change","warningLine",d.value)},ye=async i=>{const{variety:n,varietyName:m,featureId:f,featureType:p}=l;if(i.key==="drawWarningLine"){const a=t==null?void 0:t.getOption(),s=a.tooltip[0];t==null||t.setOption({...a,tooltip:{...s,axisPointer:{...s.axisPointer,lineStyle:{width:0},crossStyle:{width:2},label:{...s.axisPointer.label,backgroundColor:"transparent",formatter:T=>""}}}});const M=async T=>{t==null||t.getZr().off("mousedown",M);const x=t==null?void 0:t.convertFromPixel({yAxisIndex:0},T.offsetY),I=Math.round(x*1e3)/1e3;t==null||t.setOption({...a,tooltip:{...s,axisPointer:{...s.axisPointer,lineStyle:{width:1},crossStyle:{width:1},label:{...s.axisPointer.label,backgroundColor:null}}}}),await Me({featureCode:n,featureName:m,featureId:f,featureType:p,warnPrice:I}),J.ElMessage.success("画线预警成功!"),Z()};t==null||t.getZr().on("mousedown",M)}else i.key==="deleteWarningLine"?(await Ve({id:O.value.id}),J.ElMessage.success("画线预警删除成功"),Z()):i.key==="changeWarningLine"&&(P.value=!0,U.value=O.value.warnPrice)},me=async()=>{const{variety:i,varietyName:n,featureId:m,featureType:f}=l;await ue({id:O.value.id,featureCode:i,featureName:n,featureId:m,featureType:f,warnPrice:U.value}),J.ElMessage.success("画线预警修改成功"),Z()},ge=()=>{Q.value=[...h]};return b({draw:(i,n)=>{i==="warningLine"&&(d.value=n,H())}}),(i,n)=>{var T;const m=ie.ElMenuItem,f=ie.ElMenu,p=he.ElEmpty,a=be.ElButton,s=xe.ElInputNumber,M=ve.ElDialog;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"klineBasic",onMousemove:n[1]||(n[1]=x=>r.value=!0),onMouseout:n[2]||(n[2]=x=>r.value=!1)},[e.createElementVNode("div",Ce,[e.createVNode(qe,{data:N.value,activeIndex:L.value},null,8,["data","activeIndex"])]),e.createElementVNode("div",{class:"klineBasic-main",style:e.normalizeStyle({height:$.value.showSubChart?"70%":"100%"})},[e.createVNode($e,{onCloseContextMenuCallBack:ge},{popover:e.withCtx(()=>[e.createVNode(f,{style:{borderRadius:"4px",overflow:"hidden",background:"#fff",borderRight:0}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,x=>(e.openBlock(),e.createBlock(m,{style:{height:"36px"},key:x.key,index:x.key,onClick:I=>ye(x)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.label),1)]),_:2},1032,["index","onClick"]))),128))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"klineBasicMainRef",ref:E,style:{height:"100%"}},null,512)]),_:1})],4),$.value.showSubChart?(e.openBlock(),e.createElementBlock("div",We,[e.createVNode(Ie,{ref_key:"klineSubRef",ref:V,modelValue:R.value,"onUpdate:modelValue":n[0]||(n[0]=x=>R.value=x),data:N.value,cycle:o.cycle,activeIndex:L.value,subIndicatorList:(T=o.indicatorStore)==null?void 0:T.subIndicatorList},null,8,["modelValue","data","cycle","activeIndex","subIndicatorList"])])):e.createCommentVNode("",!0),D.value?(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(p,{class:"klineBasic-empty-content",description:"暂无数据"})])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("div",Ke,[Ue,e.createElementVNode("div",He,[e.createVNode(a,{onClick:ee},{default:e.withCtx(()=>[e.createTextVNode("刷新")]),_:1})])])):e.createCommentVNode("",!0)],32),e.createVNode(M,{modelValue:P.value,"onUpdate:modelValue":n[5]||(n[5]=x=>P.value=x),title:"画线预警-修改价格",width:"30%","align-center":""},{footer:e.withCtx(()=>[e.createElementVNode("span",Xe,[e.createVNode(a,{onClick:n[4]||(n[4]=x=>P.value=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(a,{type:"primary",onClick:me},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1})])]),default:e.withCtx(()=>[Ze,e.createVNode(s,{modelValue:U.value,"onUpdate:modelValue":n[3]||(n[3]=x=>U.value=x),placeholder:"输入预警价格"},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},Je=K._export_sfc(Ge,[["__scopeId","data-v-79254471"]]),Qe={install(o){o.component("st-klineBasic",Je)}};module.exports=Qe;
|
package/es/KlineBasic.js
CHANGED
|
@@ -1,33 +1,36 @@
|
|
|
1
1
|
import "./base-62a70f61.js";
|
|
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-
|
|
2
|
+
import { E as Ee } from "./el-dialog-98b77ce1.js";
|
|
3
|
+
import "./el-overlay-55b8b63b.js";
|
|
4
|
+
import "./el-input-2714f71f.js";
|
|
5
|
+
import { E as Be } from "./el-input-number-657ec056.js";
|
|
6
|
+
import { E as Oe } from "./el-button-e9ca802c.js";
|
|
7
|
+
import { E as Ie } from "./el-empty-34086220.js";
|
|
8
|
+
import { E as $e, a as Pe } from "./el-menu-item-c2ccd259.js";
|
|
9
9
|
import "./el-tooltip-4ed993c7.js";
|
|
10
|
-
import "./el-popper-
|
|
10
|
+
import "./el-popper-26aebdb6.js";
|
|
11
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 G, createVNode as B, ref as R, onMounted as _e, onUnmounted as we, nextTick as De, createElementVNode as K, withCtx as z, createBlock as ke, createCommentVNode as Z, 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 J, 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-25e15a78.js";
|
|
16
16
|
import { _ as Q } from "./_plugin-vue_export-helper-dad06003.js";
|
|
17
|
-
import "./el-tag-
|
|
18
|
-
import { E as je, a as Ze } from "./el-select-
|
|
19
|
-
import "./el-scrollbar-
|
|
17
|
+
import "./el-tag-7de14b18.js";
|
|
18
|
+
import { E as je, a as Ze } from "./el-select-7b52dfc9.js";
|
|
19
|
+
import "./el-scrollbar-e74f90d9.js";
|
|
20
20
|
import "./index-35129268.js";
|
|
21
|
-
import "./index-
|
|
21
|
+
import "./index-482f09b5.js";
|
|
22
|
+
import "./index-89502796.js";
|
|
22
23
|
import "./index-2e331d74.js";
|
|
23
|
-
import "./vnode-
|
|
24
|
+
import "./vnode-c51c8aa3.js";
|
|
24
25
|
import "./scroll-7d352c1f.js";
|
|
25
|
-
import "./use-global-config-
|
|
26
|
+
import "./use-global-config-51cce73d.js";
|
|
27
|
+
import "./index-fee2efa8.js";
|
|
26
28
|
import "./typescript-7ae59c4c.js";
|
|
29
|
+
import "./index-b9cbb01d.js";
|
|
27
30
|
import "./index-657047bb.js";
|
|
28
|
-
import "./config-provider-
|
|
29
|
-
import "./index-
|
|
30
|
-
import "./debounce-
|
|
31
|
+
import "./config-provider-8863d600.js";
|
|
32
|
+
import "./index-30e29356.js";
|
|
33
|
+
import "./debounce-ccdceb02.js";
|
|
31
34
|
let j = null;
|
|
32
35
|
const Xe = (n) => {
|
|
33
36
|
const k = Ce(n, {
|
|
@@ -1119,11 +1122,11 @@ const Se = (n) => (Ne("data-v-79254471"), n = n(), qe(), n), gt = { class: "klin
|
|
|
1119
1122
|
], 64);
|
|
1120
1123
|
};
|
|
1121
1124
|
}
|
|
1122
|
-
}, kt = /* @__PURE__ */ Q(Dt, [["__scopeId", "data-v-79254471"]]),
|
|
1125
|
+
}, kt = /* @__PURE__ */ Q(Dt, [["__scopeId", "data-v-79254471"]]), an = {
|
|
1123
1126
|
install(n) {
|
|
1124
1127
|
n.component("st-klineBasic", kt);
|
|
1125
1128
|
}
|
|
1126
1129
|
};
|
|
1127
1130
|
export {
|
|
1128
|
-
|
|
1131
|
+
an as default
|
|
1129
1132
|
};
|
package/es/KlineConfig.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("./base-ef747d02.cjs"),D=require("./el-overlay-39e2e96f.cjs"),R=require("./el-button-338a49b7.cjs"),_=require("./el-scrollbar-802d874d.cjs"),F=require("./el-segmented-c2952e4c.cjs");require("./el-tag-a2e99294.cjs");const O=require("./el-select-8337856d.cjs"),g=require("./el-popper-dca2de0d.cjs"),M=require("./el-divider-4713d74c.cjs"),e=require("vue"),$=require("./_plugin-vue_export-helper-f246444f.cjs"),z=require("./index-8feed26f.cjs"),x=require("./validator-f66b0f34.cjs"),K=require("./index-f1c702f6.cjs"),H=require("./index-3a74eae4.cjs");require("./vnode-6d51e502.cjs");require("./scroll-b108dabd.cjs");require("./use-global-config-f3664595.cjs");require("./index-eea0bcb3.cjs");require("./index-e6deec5d.cjs");require("./debounce-0b77a317.cjs");const j=u.buildProps({...D.dialogProps,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},resizable:Boolean,size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),G=D.dialogEmits;function J(n,S){const{width:v,height:c}=_.useWindowSize(),b=e.computed(()=>["ltr","rtl"].includes(n.direction)),C=e.computed(()=>["ltr","ttb"].includes(n.direction)?1:-1),s=e.computed(()=>b.value?v.value:c.value),l=e.computed(()=>u.clamp(f.value+C.value*h.value,4,s.value)),f=e.ref(0),h=e.ref(0),y=e.ref(!1),I=e.ref(!1);let N=[],T=[];const m=()=>{var p;const V=(p=S.value)==null?void 0:p.closest('[aria-modal="true"]');return V?b.value?V.offsetWidth:V.offsetHeight:100};e.watch(()=>[n.size,n.resizable],()=>{I.value=!1,f.value=0,h.value=0,i()});const a=p=>{n.resizable&&(I.value||(f.value=m(),I.value=!0),N=[p.pageX,p.pageY],y.value=!0,T.push(_.useEventListener(window,"mouseup",i),_.useEventListener(window,"mousemove",B)))},B=p=>{const{pageX:V,pageY:t}=p,d=V-N[0],P=t-N[1];h.value=b.value?d:P},i=()=>{N=[],f.value=l.value,h.value=0,y.value=!1,T.forEach(p=>p==null?void 0:p()),T=[]},k=_.useEventListener(S,"mousedown",a);return e.onBeforeUnmount(()=>{k(),i()}),{size:e.computed(()=>I.value?`${l.value}px`:u.addUnit(n.size)),isResizing:y,isHorizontal:b}}const W=e.defineComponent({name:"ElDrawer",inheritAttrs:!1}),X=e.defineComponent({...W,props:j,emits:G,setup(n,{expose:S}){const v=n,c=e.useSlots();K.useDeprecated({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},e.computed(()=>!!c.title));const b=e.ref(),C=e.ref(),s=e.ref(),l=u.useNamespace("drawer"),{t:f}=H.useLocale(),{afterEnter:h,afterLeave:y,beforeLeave:I,visible:N,rendered:T,titleId:m,bodyId:a,zIndex:B,onModalClick:i,onOpenAutoFocus:k,onCloseAutoFocus:p,onFocusoutPrevented:V,onCloseRequested:t,handleClose:d}=D.useDialog(v,b),{isHorizontal:P,size:o,isResizing:E}=J(v,s);return S({handleClose:d,afterEnter:h,afterLeave:y}),(r,A)=>(e.openBlock(),e.createBlock(e.unref(g.ElTeleport),{to:r.appendTo,disabled:r.appendTo!=="body"?!1:!r.appendToBody},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:e.unref(l).b("fade"),onAfterEnter:e.unref(h),onAfterLeave:e.unref(y),onBeforeLeave:e.unref(I),persisted:""},{default:e.withCtx(()=>{var q;return[e.withDirectives(e.createVNode(e.unref(D.ElOverlay),{mask:r.modal,"overlay-class":[e.unref(l).is("drawer"),(q=r.modalClass)!=null?q:""],"z-index":e.unref(B),onClick:e.unref(i)},{default:e.withCtx(()=>[e.createVNode(e.unref(g.ElFocusTrap),{loop:"",trapped:e.unref(N),"focus-trap-el":b.value,"focus-start-el":C.value,onFocusAfterTrapped:e.unref(k),onFocusAfterReleased:e.unref(p),onFocusoutPrevented:e.unref(V),onReleaseRequested:e.unref(t)},{default:e.withCtx(()=>[e.createElementVNode("div",e.mergeProps({ref_key:"drawerRef",ref:b,"aria-modal":"true","aria-label":r.title||void 0,"aria-labelledby":r.title?void 0:e.unref(m),"aria-describedby":e.unref(a)},r.$attrs,{class:[e.unref(l).b(),r.direction,e.unref(N)&&"open",e.unref(l).is("dragging",e.unref(E))],style:{[e.unref(P)?"width":"height"]:e.unref(o)},role:"dialog",onClick:e.withModifiers(()=>{},["stop"])}),[e.createElementVNode("span",{ref_key:"focusStartRef",ref:C,class:e.normalizeClass(e.unref(l).e("sr-focus")),tabindex:"-1"},null,2),r.withHeader?(e.openBlock(),e.createElementBlock("header",{key:0,class:e.normalizeClass([e.unref(l).e("header"),r.headerClass])},[r.$slots.title?e.renderSlot(r.$slots,"title",{key:1},()=>[e.createCommentVNode(" DEPRECATED SLOT ")]):e.renderSlot(r.$slots,"header",{key:0,close:e.unref(d),titleId:e.unref(m),titleClass:e.unref(l).e("title")},()=>[e.createElementVNode("span",{id:e.unref(m),role:"heading","aria-level":r.headerAriaLevel,class:e.normalizeClass(e.unref(l).e("title"))},e.toDisplayString(r.title),11,["id","aria-level"])]),r.showClose?(e.openBlock(),e.createElementBlock("button",{key:2,"aria-label":e.unref(f)("el.drawer.close"),class:e.normalizeClass(e.unref(l).e("close-btn")),type:"button",onClick:e.unref(d)},[e.createVNode(e.unref(z.ElIcon),{class:e.normalizeClass(e.unref(l).e("close"))},{default:e.withCtx(()=>[e.createVNode(e.unref(z.close_default))]),_:1},8,["class"])],10,["aria-label","onClick"])):e.createCommentVNode("v-if",!0)],2)):e.createCommentVNode("v-if",!0),e.unref(T)?(e.openBlock(),e.createElementBlock("div",{key:1,id:e.unref(a),class:e.normalizeClass([e.unref(l).e("body"),r.bodyClass])},[e.renderSlot(r.$slots,"default")],10,["id"])):e.createCommentVNode("v-if",!0),r.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass([e.unref(l).e("footer"),r.footerClass])},[e.renderSlot(r.$slots,"footer")],2)):e.createCommentVNode("v-if",!0),r.resizable?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"draggerRef",ref:s,style:e.normalizeStyle({zIndex:e.unref(B)}),class:e.normalizeClass(e.unref(l).e("dragger"))},null,6)):e.createCommentVNode("v-if",!0)],16,["aria-label","aria-labelledby","aria-describedby","onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[e.vShow,e.unref(N)]])]}),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var Y=u._export_sfc(X,[["__file","drawer.vue"]]);const Q=u.withInstall(Y),Z=u.buildProps({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:x.isValidComponentSize},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:_.iconPropType},activeActionIcon:{type:_.iconPropType},activeIcon:{type:_.iconPropType},inactiveIcon:{type:_.iconPropType},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:u.definePropType(Function)},id:String,tabindex:{type:[String,Number]},...g.useAriaProps(["ariaLabel"])}),ee={[g.UPDATE_MODEL_EVENT]:n=>u.isBoolean(n)||u.isString(n)||u.isNumber(n),[g.CHANGE_EVENT]:n=>u.isBoolean(n)||u.isString(n)||u.isNumber(n),[g.INPUT_EVENT]:n=>u.isBoolean(n)||u.isString(n)||u.isNumber(n)},U="ElSwitch",te=e.defineComponent({name:U}),le=e.defineComponent({...te,props:Z,emits:ee,setup(n,{expose:S,emit:v}){const c=n,{formItem:b}=_.useFormItem(),C=_.useFormSize(),s=u.useNamespace("switch"),{inputId:l}=_.useFormItemInputId(c,{formItemContext:b}),f=_.useFormDisabled(e.computed(()=>c.loading)),h=e.ref(c.modelValue!==!1),y=e.ref(),I=e.ref(),N=e.computed(()=>[s.b(),s.m(C.value),s.is("disabled",f.value),s.is("checked",i.value)]),T=e.computed(()=>[s.e("label"),s.em("label","left"),s.is("active",!i.value)]),m=e.computed(()=>[s.e("label"),s.em("label","right"),s.is("active",i.value)]),a=e.computed(()=>({width:u.addUnit(c.width)}));e.watch(()=>c.modelValue,()=>{h.value=!0});const B=e.computed(()=>h.value?c.modelValue:!1),i=e.computed(()=>B.value===c.activeValue);[c.activeValue,c.inactiveValue].includes(B.value)||(v(g.UPDATE_MODEL_EVENT,c.inactiveValue),v(g.CHANGE_EVENT,c.inactiveValue),v(g.INPUT_EVENT,c.inactiveValue)),e.watch(i,t=>{var d;y.value.checked=t,c.validateEvent&&((d=b==null?void 0:b.validate)==null||d.call(b,"change").catch(P=>g.debugWarn()))});const k=()=>{const t=i.value?c.inactiveValue:c.activeValue;v(g.UPDATE_MODEL_EVENT,t),v(g.CHANGE_EVENT,t),v(g.INPUT_EVENT,t),e.nextTick(()=>{y.value.checked=i.value})},p=()=>{if(f.value)return;const{beforeChange:t}=c;if(!t){k();return}const d=t();[u.isPromise(d),u.isBoolean(d)].includes(!0)||g.throwError(U,"beforeChange must return type `Promise<boolean>` or `boolean`"),u.isPromise(d)?d.then(o=>{o&&k()}).catch(o=>{}):d&&k()},V=()=>{var t,d;(d=(t=y.value)==null?void 0:t.focus)==null||d.call(t)};return e.onMounted(()=>{y.value.checked=i.value}),S({focus:V,checked:i}),(t,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(N)),onClick:e.withModifiers(p,["prevent"])},[e.createElementVNode("input",{id:e.unref(l),ref_key:"input",ref:y,class:e.normalizeClass(e.unref(s).e("input")),type:"checkbox",role:"switch","aria-checked":e.unref(i),"aria-disabled":e.unref(f),"aria-label":t.ariaLabel,name:t.name,"true-value":t.activeValue,"false-value":t.inactiveValue,disabled:e.unref(f),tabindex:t.tabindex,onChange:k,onKeydown:e.withKeys(p,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!t.inlinePrompt&&(t.inactiveIcon||t.inactiveText)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(T))},[t.inactiveIcon?(e.openBlock(),e.createBlock(e.unref(z.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.inactiveIcon)))]),_:1})):e.createCommentVNode("v-if",!0),!t.inactiveIcon&&t.inactiveText?(e.openBlock(),e.createElementBlock("span",{key:1,"aria-hidden":e.unref(i)},e.toDisplayString(t.inactiveText),9,["aria-hidden"])):e.createCommentVNode("v-if",!0)],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("span",{ref_key:"core",ref:I,class:e.normalizeClass(e.unref(s).e("core")),style:e.normalizeStyle(e.unref(a))},[t.inlinePrompt?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(s).e("inner"))},[t.activeIcon||t.inactiveIcon?(e.openBlock(),e.createBlock(e.unref(z.ElIcon),{key:0,class:e.normalizeClass(e.unref(s).is("icon"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(i)?t.activeIcon:t.inactiveIcon)))]),_:1},8,["class"])):t.activeText||t.inactiveText?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(s).is("text")),"aria-hidden":!e.unref(i)},e.toDisplayString(e.unref(i)?t.activeText:t.inactiveText),11,["aria-hidden"])):e.createCommentVNode("v-if",!0)],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(s).e("action"))},[t.loading?(e.openBlock(),e.createBlock(e.unref(z.ElIcon),{key:0,class:e.normalizeClass(e.unref(s).is("loading"))},{default:e.withCtx(()=>[e.createVNode(e.unref(z.loading_default))]),_:1},8,["class"])):e.unref(i)?e.renderSlot(t.$slots,"active-action",{key:1},()=>[t.activeActionIcon?(e.openBlock(),e.createBlock(e.unref(z.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.activeActionIcon)))]),_:1})):e.createCommentVNode("v-if",!0)]):e.unref(i)?e.createCommentVNode("v-if",!0):e.renderSlot(t.$slots,"inactive-action",{key:2},()=>[t.inactiveActionIcon?(e.openBlock(),e.createBlock(e.unref(z.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.inactiveActionIcon)))]),_:1})):e.createCommentVNode("v-if",!0)])],2)],6),!t.inlinePrompt&&(t.activeIcon||t.activeText)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(m))},[t.activeIcon?(e.openBlock(),e.createBlock(e.unref(z.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.activeIcon)))]),_:1})):e.createCommentVNode("v-if",!0),!t.activeIcon&&t.activeText?(e.openBlock(),e.createElementBlock("span",{key:1,"aria-hidden":!e.unref(i)},e.toDisplayString(t.activeText),9,["aria-hidden"])):e.createCommentVNode("v-if",!0)],2)):e.createCommentVNode("v-if",!0)],10,["onClick"]))}});var oe=u._export_sfc(le,[["__file","switch.vue"]]);const ae=u.withInstall(oe);const ne=[{label:"买卖",value:0},{label:"开平",value:1}],L=()=>({mainIndicator:"MA",sellBuy:1,singelCycle:"6",multiCycleNum:6,multiCycleList:["1","2","3","4","5","6"],pageType:1,enable_tradeLogBrush:!0,enable_showScreenTimeRange:!0,enable_showScreenMaxPrice:!0,enable_dbClickOpenSingel:!0,enable_subChart:!0,enable_sliderChart:!0}),re=(n,S)=>{var v;return((v=S.find(c=>c.value===n))==null?void 0:v.label)??"-"};const w=n=>(e.pushScopeId("data-v-da9cf1c8"),n=n(),e.popScopeId(),n),se={class:"kline-config element-dark"},ie={class:"setting-item"},ce=w(()=>e.createElementVNode("span",{class:"label"},"主图指标: ",-1)),ue={class:"setting-item"},de=w(()=>e.createElementVNode("span",{class:"label"},"交易点位: ",-1)),me={class:"setting-item"},pe=w(()=>e.createElementVNode("span",{class:"label"},"单周期: ",-1)),fe={class:"setting-item"},ve=w(()=>e.createElementVNode("span",{class:"label"},"多周期: ",-1)),Ve={class:"mode"},be={class:"cycleName"},ge={class:"content"},ye={class:"setting-item"},he=w(()=>e.createElementVNode("span",{class:"label"},"默认展示: ",-1)),ke={class:"setting-item"},Ce=w(()=>e.createElementVNode("span",{class:"label"},"高亮交易范围: ",-1)),Ne={class:"setting-item"},Ee=w(()=>e.createElementVNode("span",{class:"label"},"展示当屏时间: ",-1)),_e={class:"setting-item"},Be=w(()=>e.createElementVNode("span",{class:"label"},"展示当屏最高价: ",-1)),we={class:"setting-item"},Se=w(()=>e.createElementVNode("span",{class:"label"},"多周期双击图表切换至单周期: ",-1)),Ie={class:"setting-item"},Te=w(()=>e.createElementVNode("span",{class:"label"},"开启副图: ",-1)),ze={class:"setting-item"},Pe=w(()=>e.createElementVNode("span",{class:"label"},"开启拖拽轴: ",-1)),Le={class:"setting-footer"},De={__name:"index",props:{indicatorStore:{type:Object,default:()=>({})},origin:{type:String,default:"server"},cycleOptions:{type:Array,default:()=>[]}},emits:"callBack",setup(n,{expose:S,emit:v}){const{request:c}=e.inject("stConfig"),b=v,C=n,s=e.ref(!1),l=e.reactive({}),f=e.ref([]),h=e.ref([]),y=()=>{Object.assign(l,L())},I=async()=>{const m=JSON.stringify(l);C.origin==="server"?await c.post("/common/qt/updateUserConfig",{appId:1,json:m}):localStorage.setItem("userKlineConfig",m),b("callBack",m),s.value=!1},N=async()=>{if(C.origin==="server"){const{body:m}=await c.post("/common/qt/getUserConfig",{appId:1});Object.assign(l,L(),m?JSON.parse(m):{})}else{const m=localStorage.getItem("userKlineConfig");Object.assign(l,L(),m?JSON.parse(m):{})}},T=async()=>{if(C.origin==="server"){const{body:m}=await c.post("/common/qt/getDict",{dictIds:[1002]});f.value=m[1002].map(a=>({label:a.dictName,value:a.dictCode}))}else f.value=C.cycleOptions};return e.onMounted(()=>{T(),h.value=C.indicatorStore.mainIndicatorList??[]}),S({open:async()=>{await N(),s.value=!0},getDefaultUserKlineConfig:L}),(m,a)=>{const B=M.ElDivider,i=O.ElOption,k=O.ElSelect,p=F.ElSegmented,V=ae,t=g.ElScrollbar,d=R.ElButton,P=Q;return e.openBlock(),e.createElementBlock("div",se,[e.createVNode(P,{modelValue:s.value,"onUpdate:modelValue":a[11]||(a[11]=o=>s.value=o),title:"K线自定义配置",size:320},{default:e.withCtx(()=>[e.createVNode(t,{class:"setting-main"},{default:e.withCtx(()=>[e.createVNode(B,{style:{"margin-top":"8px"}},{default:e.withCtx(()=>[e.createTextVNode("偏好设置")]),_:1}),e.createElementVNode("div",ie,[ce,e.createVNode(k,{modelValue:l.mainIndicator,"onUpdate:modelValue":a[0]||(a[0]=o=>l.mainIndicator=o),"popper-class":"element-dark"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,E)=>(e.openBlock(),e.createBlock(i,{key:E,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",ue,[de,e.createVNode(k,{modelValue:l.sellBuy,"onUpdate:modelValue":a[1]||(a[1]=o=>l.sellBuy=o),"popper-class":"element-dark"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ne),(o,E)=>(e.openBlock(),e.createBlock(i,{key:E,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",me,[pe,e.createVNode(k,{modelValue:l.singelCycle,"onUpdate:modelValue":a[2]||(a[2]=o=>l.singelCycle=o),"popper-class":"element-dark"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(o,E)=>(e.openBlock(),e.createBlock(i,{key:E,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",fe,[ve,e.createVNode(p,{size:"small",modelValue:l.multiCycleNum,"onUpdate:modelValue":a[3]||(a[3]=o=>l.multiCycleNum=o),options:[{label:"二图",value:2},{label:"四图",value:4},{label:"六图",value:6}],style:{height:"26px"}},null,8,["modelValue"])]),e.createElementVNode("div",{class:e.normalizeClass(`setting-multi-box grid-${l.multiCycleNum}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.multiCycleList.slice(0,l.multiCycleNum),(o,E)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",be,[e.createElementVNode("span",null,e.toDisplayString(e.unref(re)(l.multiCycleList[E],f.value)),1),e.createVNode(k,{modelValue:l.multiCycleList[E],"onUpdate:modelValue":r=>l.multiCycleList[E]=r,"popper-class":"element-dark"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(r,A)=>(e.openBlock(),e.createBlock(i,{key:A,label:r.label,value:r.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),e.createElementVNode("span",ge,e.toDisplayString(E+1)+"号位K线",1)]))),256))],2),e.createElementVNode("div",ye,[he,e.createVNode(p,{size:"small",modelValue:l.pageType,"onUpdate:modelValue":a[4]||(a[4]=o=>l.pageType=o),options:[{label:"单周期",value:1},{label:"多周期",value:2}],style:{height:"26px"}},null,8,["modelValue"])]),e.createVNode(B,{style:{"margin-top":"44px"}},{default:e.withCtx(()=>[e.createTextVNode("功能配置")]),_:1}),e.createElementVNode("div",ke,[Ce,e.createVNode(V,{modelValue:l.enable_tradeLogBrush,"onUpdate:modelValue":a[5]||(a[5]=o=>l.enable_tradeLogBrush=o)},null,8,["modelValue"])]),e.createElementVNode("div",Ne,[Ee,e.createVNode(V,{modelValue:l.enable_showScreenTimeRange,"onUpdate:modelValue":a[6]||(a[6]=o=>l.enable_showScreenTimeRange=o)},null,8,["modelValue"])]),e.createElementVNode("div",_e,[Be,e.createVNode(V,{modelValue:l.enable_showScreenMaxPrice,"onUpdate:modelValue":a[7]||(a[7]=o=>l.enable_showScreenMaxPrice=o)},null,8,["modelValue"])]),e.createElementVNode("div",we,[Se,e.createVNode(V,{modelValue:l.enable_dbClickOpenSingel,"onUpdate:modelValue":a[8]||(a[8]=o=>l.enable_dbClickOpenSingel=o)},null,8,["modelValue"])]),e.createVNode(B,{style:{"margin-top":"44px"}},{default:e.withCtx(()=>[e.createTextVNode("组件开关")]),_:1}),e.createElementVNode("div",Ie,[Te,e.createVNode(V,{modelValue:l.enable_subChart,"onUpdate:modelValue":a[9]||(a[9]=o=>l.enable_subChart=o)},null,8,["modelValue"])]),e.createElementVNode("div",ze,[Pe,e.createVNode(V,{modelValue:l.enable_sliderChart,"onUpdate:modelValue":a[10]||(a[10]=o=>l.enable_sliderChart=o)},null,8,["modelValue"])])]),_:1}),e.createElementVNode("div",Le,[e.createVNode(d,{onClick:y},{default:e.withCtx(()=>[e.createTextVNode(" 恢复默认 ")]),_:1}),e.createVNode(d,{type:"primary",onClick:I},{default:e.withCtx(()=>[e.createTextVNode(" 保存配置 ")]),_:1})])]),_:1},8,["modelValue"])])}}},Ae=$._export_sfc(De,[["__scopeId","data-v-da9cf1c8"]]),qe={install(n){n.component("st-klineConfig",Ae)}};module.exports=qe;
|
|
1
|
+
"use strict";const u=require("./base-ef747d02.cjs"),D=require("./el-overlay-f42f765e.cjs"),R=require("./el-button-8dd00125.cjs"),_=require("./el-scrollbar-1c9093bf.cjs"),F=require("./el-segmented-51f6d786.cjs");require("./el-tag-65658264.cjs");const O=require("./el-select-f416ce28.cjs"),g=require("./el-popper-f194e471.cjs"),M=require("./el-divider-4713d74c.cjs"),e=require("vue"),$=require("./_plugin-vue_export-helper-f246444f.cjs"),z=require("./index-8feed26f.cjs"),x=require("./validator-ed9fb862.cjs"),K=require("./index-f1c702f6.cjs"),H=require("./index-bb833443.cjs");require("./vnode-b906ae6d.cjs");require("./scroll-b108dabd.cjs");require("./index-9780a537.cjs");require("./use-global-config-b6bc4c2f.cjs");require("./index-62df8bda.cjs");require("./index-eea0bcb3.cjs");require("./index-4cd86c5e.cjs");require("./index-02f7b722.cjs");require("./debounce-62f5b6e8.cjs");const j=u.buildProps({...D.dialogProps,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},resizable:Boolean,size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),G=D.dialogEmits;function J(n,S){const{width:v,height:c}=_.useWindowSize(),b=e.computed(()=>["ltr","rtl"].includes(n.direction)),C=e.computed(()=>["ltr","ttb"].includes(n.direction)?1:-1),s=e.computed(()=>b.value?v.value:c.value),l=e.computed(()=>u.clamp(f.value+C.value*h.value,4,s.value)),f=e.ref(0),h=e.ref(0),y=e.ref(!1),I=e.ref(!1);let N=[],T=[];const m=()=>{var p;const V=(p=S.value)==null?void 0:p.closest('[aria-modal="true"]');return V?b.value?V.offsetWidth:V.offsetHeight:100};e.watch(()=>[n.size,n.resizable],()=>{I.value=!1,f.value=0,h.value=0,i()});const a=p=>{n.resizable&&(I.value||(f.value=m(),I.value=!0),N=[p.pageX,p.pageY],y.value=!0,T.push(_.useEventListener(window,"mouseup",i),_.useEventListener(window,"mousemove",B)))},B=p=>{const{pageX:V,pageY:t}=p,d=V-N[0],P=t-N[1];h.value=b.value?d:P},i=()=>{N=[],f.value=l.value,h.value=0,y.value=!1,T.forEach(p=>p==null?void 0:p()),T=[]},k=_.useEventListener(S,"mousedown",a);return e.onBeforeUnmount(()=>{k(),i()}),{size:e.computed(()=>I.value?`${l.value}px`:u.addUnit(n.size)),isResizing:y,isHorizontal:b}}const W=e.defineComponent({name:"ElDrawer",inheritAttrs:!1}),X=e.defineComponent({...W,props:j,emits:G,setup(n,{expose:S}){const v=n,c=e.useSlots();K.useDeprecated({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},e.computed(()=>!!c.title));const b=e.ref(),C=e.ref(),s=e.ref(),l=u.useNamespace("drawer"),{t:f}=H.useLocale(),{afterEnter:h,afterLeave:y,beforeLeave:I,visible:N,rendered:T,titleId:m,bodyId:a,zIndex:B,onModalClick:i,onOpenAutoFocus:k,onCloseAutoFocus:p,onFocusoutPrevented:V,onCloseRequested:t,handleClose:d}=D.useDialog(v,b),{isHorizontal:P,size:o,isResizing:E}=J(v,s);return S({handleClose:d,afterEnter:h,afterLeave:y}),(r,q)=>(e.openBlock(),e.createBlock(e.unref(g.ElTeleport),{to:r.appendTo,disabled:r.appendTo!=="body"?!1:!r.appendToBody},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:e.unref(l).b("fade"),onAfterEnter:e.unref(h),onAfterLeave:e.unref(y),onBeforeLeave:e.unref(I),persisted:""},{default:e.withCtx(()=>{var A;return[e.withDirectives(e.createVNode(e.unref(D.ElOverlay),{mask:r.modal,"overlay-class":[e.unref(l).is("drawer"),(A=r.modalClass)!=null?A:""],"z-index":e.unref(B),onClick:e.unref(i)},{default:e.withCtx(()=>[e.createVNode(e.unref(g.ElFocusTrap),{loop:"",trapped:e.unref(N),"focus-trap-el":b.value,"focus-start-el":C.value,onFocusAfterTrapped:e.unref(k),onFocusAfterReleased:e.unref(p),onFocusoutPrevented:e.unref(V),onReleaseRequested:e.unref(t)},{default:e.withCtx(()=>[e.createElementVNode("div",e.mergeProps({ref_key:"drawerRef",ref:b,"aria-modal":"true","aria-label":r.title||void 0,"aria-labelledby":r.title?void 0:e.unref(m),"aria-describedby":e.unref(a)},r.$attrs,{class:[e.unref(l).b(),r.direction,e.unref(N)&&"open",e.unref(l).is("dragging",e.unref(E))],style:{[e.unref(P)?"width":"height"]:e.unref(o)},role:"dialog",onClick:e.withModifiers(()=>{},["stop"])}),[e.createElementVNode("span",{ref_key:"focusStartRef",ref:C,class:e.normalizeClass(e.unref(l).e("sr-focus")),tabindex:"-1"},null,2),r.withHeader?(e.openBlock(),e.createElementBlock("header",{key:0,class:e.normalizeClass([e.unref(l).e("header"),r.headerClass])},[r.$slots.title?e.renderSlot(r.$slots,"title",{key:1},()=>[e.createCommentVNode(" DEPRECATED SLOT ")]):e.renderSlot(r.$slots,"header",{key:0,close:e.unref(d),titleId:e.unref(m),titleClass:e.unref(l).e("title")},()=>[e.createElementVNode("span",{id:e.unref(m),role:"heading","aria-level":r.headerAriaLevel,class:e.normalizeClass(e.unref(l).e("title"))},e.toDisplayString(r.title),11,["id","aria-level"])]),r.showClose?(e.openBlock(),e.createElementBlock("button",{key:2,"aria-label":e.unref(f)("el.drawer.close"),class:e.normalizeClass(e.unref(l).e("close-btn")),type:"button",onClick:e.unref(d)},[e.createVNode(e.unref(z.ElIcon),{class:e.normalizeClass(e.unref(l).e("close"))},{default:e.withCtx(()=>[e.createVNode(e.unref(z.close_default))]),_:1},8,["class"])],10,["aria-label","onClick"])):e.createCommentVNode("v-if",!0)],2)):e.createCommentVNode("v-if",!0),e.unref(T)?(e.openBlock(),e.createElementBlock("div",{key:1,id:e.unref(a),class:e.normalizeClass([e.unref(l).e("body"),r.bodyClass])},[e.renderSlot(r.$slots,"default")],10,["id"])):e.createCommentVNode("v-if",!0),r.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass([e.unref(l).e("footer"),r.footerClass])},[e.renderSlot(r.$slots,"footer")],2)):e.createCommentVNode("v-if",!0),r.resizable?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"draggerRef",ref:s,style:e.normalizeStyle({zIndex:e.unref(B)}),class:e.normalizeClass(e.unref(l).e("dragger"))},null,6)):e.createCommentVNode("v-if",!0)],16,["aria-label","aria-labelledby","aria-describedby","onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[e.vShow,e.unref(N)]])]}),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var Y=u._export_sfc(X,[["__file","drawer.vue"]]);const Q=u.withInstall(Y),Z=u.buildProps({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:x.isValidComponentSize},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:_.iconPropType},activeActionIcon:{type:_.iconPropType},activeIcon:{type:_.iconPropType},inactiveIcon:{type:_.iconPropType},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:u.definePropType(Function)},id:String,tabindex:{type:[String,Number]},...g.useAriaProps(["ariaLabel"])}),ee={[g.UPDATE_MODEL_EVENT]:n=>u.isBoolean(n)||u.isString(n)||u.isNumber(n),[g.CHANGE_EVENT]:n=>u.isBoolean(n)||u.isString(n)||u.isNumber(n),[g.INPUT_EVENT]:n=>u.isBoolean(n)||u.isString(n)||u.isNumber(n)},U="ElSwitch",te=e.defineComponent({name:U}),le=e.defineComponent({...te,props:Z,emits:ee,setup(n,{expose:S,emit:v}){const c=n,{formItem:b}=_.useFormItem(),C=_.useFormSize(),s=u.useNamespace("switch"),{inputId:l}=_.useFormItemInputId(c,{formItemContext:b}),f=_.useFormDisabled(e.computed(()=>c.loading)),h=e.ref(c.modelValue!==!1),y=e.ref(),I=e.ref(),N=e.computed(()=>[s.b(),s.m(C.value),s.is("disabled",f.value),s.is("checked",i.value)]),T=e.computed(()=>[s.e("label"),s.em("label","left"),s.is("active",!i.value)]),m=e.computed(()=>[s.e("label"),s.em("label","right"),s.is("active",i.value)]),a=e.computed(()=>({width:u.addUnit(c.width)}));e.watch(()=>c.modelValue,()=>{h.value=!0});const B=e.computed(()=>h.value?c.modelValue:!1),i=e.computed(()=>B.value===c.activeValue);[c.activeValue,c.inactiveValue].includes(B.value)||(v(g.UPDATE_MODEL_EVENT,c.inactiveValue),v(g.CHANGE_EVENT,c.inactiveValue),v(g.INPUT_EVENT,c.inactiveValue)),e.watch(i,t=>{var d;y.value.checked=t,c.validateEvent&&((d=b==null?void 0:b.validate)==null||d.call(b,"change").catch(P=>g.debugWarn()))});const k=()=>{const t=i.value?c.inactiveValue:c.activeValue;v(g.UPDATE_MODEL_EVENT,t),v(g.CHANGE_EVENT,t),v(g.INPUT_EVENT,t),e.nextTick(()=>{y.value.checked=i.value})},p=()=>{if(f.value)return;const{beforeChange:t}=c;if(!t){k();return}const d=t();[u.isPromise(d),u.isBoolean(d)].includes(!0)||g.throwError(U,"beforeChange must return type `Promise<boolean>` or `boolean`"),u.isPromise(d)?d.then(o=>{o&&k()}).catch(o=>{}):d&&k()},V=()=>{var t,d;(d=(t=y.value)==null?void 0:t.focus)==null||d.call(t)};return e.onMounted(()=>{y.value.checked=i.value}),S({focus:V,checked:i}),(t,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(N)),onClick:e.withModifiers(p,["prevent"])},[e.createElementVNode("input",{id:e.unref(l),ref_key:"input",ref:y,class:e.normalizeClass(e.unref(s).e("input")),type:"checkbox",role:"switch","aria-checked":e.unref(i),"aria-disabled":e.unref(f),"aria-label":t.ariaLabel,name:t.name,"true-value":t.activeValue,"false-value":t.inactiveValue,disabled:e.unref(f),tabindex:t.tabindex,onChange:k,onKeydown:e.withKeys(p,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!t.inlinePrompt&&(t.inactiveIcon||t.inactiveText)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(T))},[t.inactiveIcon?(e.openBlock(),e.createBlock(e.unref(z.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.inactiveIcon)))]),_:1})):e.createCommentVNode("v-if",!0),!t.inactiveIcon&&t.inactiveText?(e.openBlock(),e.createElementBlock("span",{key:1,"aria-hidden":e.unref(i)},e.toDisplayString(t.inactiveText),9,["aria-hidden"])):e.createCommentVNode("v-if",!0)],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("span",{ref_key:"core",ref:I,class:e.normalizeClass(e.unref(s).e("core")),style:e.normalizeStyle(e.unref(a))},[t.inlinePrompt?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(s).e("inner"))},[t.activeIcon||t.inactiveIcon?(e.openBlock(),e.createBlock(e.unref(z.ElIcon),{key:0,class:e.normalizeClass(e.unref(s).is("icon"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(i)?t.activeIcon:t.inactiveIcon)))]),_:1},8,["class"])):t.activeText||t.inactiveText?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(s).is("text")),"aria-hidden":!e.unref(i)},e.toDisplayString(e.unref(i)?t.activeText:t.inactiveText),11,["aria-hidden"])):e.createCommentVNode("v-if",!0)],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(s).e("action"))},[t.loading?(e.openBlock(),e.createBlock(e.unref(z.ElIcon),{key:0,class:e.normalizeClass(e.unref(s).is("loading"))},{default:e.withCtx(()=>[e.createVNode(e.unref(z.loading_default))]),_:1},8,["class"])):e.unref(i)?e.renderSlot(t.$slots,"active-action",{key:1},()=>[t.activeActionIcon?(e.openBlock(),e.createBlock(e.unref(z.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.activeActionIcon)))]),_:1})):e.createCommentVNode("v-if",!0)]):e.unref(i)?e.createCommentVNode("v-if",!0):e.renderSlot(t.$slots,"inactive-action",{key:2},()=>[t.inactiveActionIcon?(e.openBlock(),e.createBlock(e.unref(z.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.inactiveActionIcon)))]),_:1})):e.createCommentVNode("v-if",!0)])],2)],6),!t.inlinePrompt&&(t.activeIcon||t.activeText)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(m))},[t.activeIcon?(e.openBlock(),e.createBlock(e.unref(z.ElIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.activeIcon)))]),_:1})):e.createCommentVNode("v-if",!0),!t.activeIcon&&t.activeText?(e.openBlock(),e.createElementBlock("span",{key:1,"aria-hidden":!e.unref(i)},e.toDisplayString(t.activeText),9,["aria-hidden"])):e.createCommentVNode("v-if",!0)],2)):e.createCommentVNode("v-if",!0)],10,["onClick"]))}});var oe=u._export_sfc(le,[["__file","switch.vue"]]);const ae=u.withInstall(oe);const ne=[{label:"买卖",value:0},{label:"开平",value:1}],L=()=>({mainIndicator:"MA",sellBuy:1,singelCycle:"6",multiCycleNum:6,multiCycleList:["1","2","3","4","5","6"],pageType:1,enable_tradeLogBrush:!0,enable_showScreenTimeRange:!0,enable_showScreenMaxPrice:!0,enable_dbClickOpenSingel:!0,enable_subChart:!0,enable_sliderChart:!0}),re=(n,S)=>{var v;return((v=S.find(c=>c.value===n))==null?void 0:v.label)??"-"};const w=n=>(e.pushScopeId("data-v-da9cf1c8"),n=n(),e.popScopeId(),n),se={class:"kline-config element-dark"},ie={class:"setting-item"},ce=w(()=>e.createElementVNode("span",{class:"label"},"主图指标: ",-1)),ue={class:"setting-item"},de=w(()=>e.createElementVNode("span",{class:"label"},"交易点位: ",-1)),me={class:"setting-item"},pe=w(()=>e.createElementVNode("span",{class:"label"},"单周期: ",-1)),fe={class:"setting-item"},ve=w(()=>e.createElementVNode("span",{class:"label"},"多周期: ",-1)),Ve={class:"mode"},be={class:"cycleName"},ge={class:"content"},ye={class:"setting-item"},he=w(()=>e.createElementVNode("span",{class:"label"},"默认展示: ",-1)),ke={class:"setting-item"},Ce=w(()=>e.createElementVNode("span",{class:"label"},"高亮交易范围: ",-1)),Ne={class:"setting-item"},Ee=w(()=>e.createElementVNode("span",{class:"label"},"展示当屏时间: ",-1)),_e={class:"setting-item"},Be=w(()=>e.createElementVNode("span",{class:"label"},"展示当屏最高价: ",-1)),we={class:"setting-item"},Se=w(()=>e.createElementVNode("span",{class:"label"},"多周期双击图表切换至单周期: ",-1)),Ie={class:"setting-item"},Te=w(()=>e.createElementVNode("span",{class:"label"},"开启副图: ",-1)),ze={class:"setting-item"},Pe=w(()=>e.createElementVNode("span",{class:"label"},"开启拖拽轴: ",-1)),Le={class:"setting-footer"},De={__name:"index",props:{indicatorStore:{type:Object,default:()=>({})},origin:{type:String,default:"server"},cycleOptions:{type:Array,default:()=>[]}},emits:"callBack",setup(n,{expose:S,emit:v}){const{request:c}=e.inject("stConfig"),b=v,C=n,s=e.ref(!1),l=e.reactive({}),f=e.ref([]),h=e.ref([]),y=()=>{Object.assign(l,L())},I=async()=>{const m=JSON.stringify(l);C.origin==="server"?await c.post("/common/qt/updateUserConfig",{appId:1,json:m}):localStorage.setItem("userKlineConfig",m),b("callBack",m),s.value=!1},N=async()=>{if(C.origin==="server"){const{body:m}=await c.post("/common/qt/getUserConfig",{appId:1});Object.assign(l,L(),m?JSON.parse(m):{})}else{const m=localStorage.getItem("userKlineConfig");Object.assign(l,L(),m?JSON.parse(m):{})}},T=async()=>{if(C.origin==="server"){const{body:m}=await c.post("/common/qt/getDict",{dictIds:[1002]});f.value=m[1002].map(a=>({label:a.dictName,value:a.dictCode}))}else f.value=C.cycleOptions};return e.onMounted(()=>{T(),h.value=C.indicatorStore.mainIndicatorList??[]}),S({open:async()=>{await N(),s.value=!0},getDefaultUserKlineConfig:L}),(m,a)=>{const B=M.ElDivider,i=O.ElOption,k=O.ElSelect,p=F.ElSegmented,V=ae,t=g.ElScrollbar,d=R.ElButton,P=Q;return e.openBlock(),e.createElementBlock("div",se,[e.createVNode(P,{modelValue:s.value,"onUpdate:modelValue":a[11]||(a[11]=o=>s.value=o),title:"K线自定义配置",size:320},{default:e.withCtx(()=>[e.createVNode(t,{class:"setting-main"},{default:e.withCtx(()=>[e.createVNode(B,{style:{"margin-top":"8px"}},{default:e.withCtx(()=>[e.createTextVNode("偏好设置")]),_:1}),e.createElementVNode("div",ie,[ce,e.createVNode(k,{modelValue:l.mainIndicator,"onUpdate:modelValue":a[0]||(a[0]=o=>l.mainIndicator=o),"popper-class":"element-dark"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(o,E)=>(e.openBlock(),e.createBlock(i,{key:E,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",ue,[de,e.createVNode(k,{modelValue:l.sellBuy,"onUpdate:modelValue":a[1]||(a[1]=o=>l.sellBuy=o),"popper-class":"element-dark"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ne),(o,E)=>(e.openBlock(),e.createBlock(i,{key:E,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",me,[pe,e.createVNode(k,{modelValue:l.singelCycle,"onUpdate:modelValue":a[2]||(a[2]=o=>l.singelCycle=o),"popper-class":"element-dark"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(o,E)=>(e.openBlock(),e.createBlock(i,{key:E,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),e.createElementVNode("div",fe,[ve,e.createVNode(p,{size:"small",modelValue:l.multiCycleNum,"onUpdate:modelValue":a[3]||(a[3]=o=>l.multiCycleNum=o),options:[{label:"二图",value:2},{label:"四图",value:4},{label:"六图",value:6}],style:{height:"26px"}},null,8,["modelValue"])]),e.createElementVNode("div",{class:e.normalizeClass(`setting-multi-box grid-${l.multiCycleNum}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.multiCycleList.slice(0,l.multiCycleNum),(o,E)=>(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",be,[e.createElementVNode("span",null,e.toDisplayString(e.unref(re)(l.multiCycleList[E],f.value)),1),e.createVNode(k,{modelValue:l.multiCycleList[E],"onUpdate:modelValue":r=>l.multiCycleList[E]=r,"popper-class":"element-dark"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(r,q)=>(e.openBlock(),e.createBlock(i,{key:q,label:r.label,value:r.value},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),e.createElementVNode("span",ge,e.toDisplayString(E+1)+"号位K线",1)]))),256))],2),e.createElementVNode("div",ye,[he,e.createVNode(p,{size:"small",modelValue:l.pageType,"onUpdate:modelValue":a[4]||(a[4]=o=>l.pageType=o),options:[{label:"单周期",value:1},{label:"多周期",value:2}],style:{height:"26px"}},null,8,["modelValue"])]),e.createVNode(B,{style:{"margin-top":"44px"}},{default:e.withCtx(()=>[e.createTextVNode("功能配置")]),_:1}),e.createElementVNode("div",ke,[Ce,e.createVNode(V,{modelValue:l.enable_tradeLogBrush,"onUpdate:modelValue":a[5]||(a[5]=o=>l.enable_tradeLogBrush=o)},null,8,["modelValue"])]),e.createElementVNode("div",Ne,[Ee,e.createVNode(V,{modelValue:l.enable_showScreenTimeRange,"onUpdate:modelValue":a[6]||(a[6]=o=>l.enable_showScreenTimeRange=o)},null,8,["modelValue"])]),e.createElementVNode("div",_e,[Be,e.createVNode(V,{modelValue:l.enable_showScreenMaxPrice,"onUpdate:modelValue":a[7]||(a[7]=o=>l.enable_showScreenMaxPrice=o)},null,8,["modelValue"])]),e.createElementVNode("div",we,[Se,e.createVNode(V,{modelValue:l.enable_dbClickOpenSingel,"onUpdate:modelValue":a[8]||(a[8]=o=>l.enable_dbClickOpenSingel=o)},null,8,["modelValue"])]),e.createVNode(B,{style:{"margin-top":"44px"}},{default:e.withCtx(()=>[e.createTextVNode("组件开关")]),_:1}),e.createElementVNode("div",Ie,[Te,e.createVNode(V,{modelValue:l.enable_subChart,"onUpdate:modelValue":a[9]||(a[9]=o=>l.enable_subChart=o)},null,8,["modelValue"])]),e.createElementVNode("div",ze,[Pe,e.createVNode(V,{modelValue:l.enable_sliderChart,"onUpdate:modelValue":a[10]||(a[10]=o=>l.enable_sliderChart=o)},null,8,["modelValue"])])]),_:1}),e.createElementVNode("div",Le,[e.createVNode(d,{onClick:y},{default:e.withCtx(()=>[e.createTextVNode(" 恢复默认 ")]),_:1}),e.createVNode(d,{type:"primary",onClick:I},{default:e.withCtx(()=>[e.createTextVNode(" 保存配置 ")]),_:1})])]),_:1},8,["modelValue"])])}}},qe=$._export_sfc(De,[["__scopeId","data-v-da9cf1c8"]]),Ae={install(n){n.component("st-klineConfig",qe)}};module.exports=Ae;
|
package/es/KlineConfig.js
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import { b as ne, m as fe, n as ie, u as re, _ as ue, w as de, e as be, o as X, c as G, p as Q, q as oe } from "./base-62a70f61.js";
|
|
2
|
-
import { d as ge, a as ye, u as he, E as _e } from "./el-overlay-
|
|
3
|
-
import { E as Ce } from "./el-button-
|
|
4
|
-
import { b as we, c as Z, i as J, d as ke, e as Ve, f as Se, g as Ie } from "./el-scrollbar-
|
|
5
|
-
import { E as Ee } from "./el-segmented-
|
|
6
|
-
import "./el-tag-
|
|
7
|
-
import { E as Te, a as ze } from "./el-select-
|
|
8
|
-
import { c as Be, e as Ne, u as Ae, U as x, C as ee, I as le, d as Pe, b as Le, g as Oe } from "./el-popper-
|
|
2
|
+
import { d as ge, a as ye, u as he, E as _e } from "./el-overlay-55b8b63b.js";
|
|
3
|
+
import { E as Ce } from "./el-button-e9ca802c.js";
|
|
4
|
+
import { b as we, c as Z, i as J, d as ke, e as Ve, f as Se, g as Ie } from "./el-scrollbar-e74f90d9.js";
|
|
5
|
+
import { E as Ee } from "./el-segmented-85c9467d.js";
|
|
6
|
+
import "./el-tag-7de14b18.js";
|
|
7
|
+
import { E as Te, a as ze } from "./el-select-7b52dfc9.js";
|
|
8
|
+
import { c as Be, e as Ne, u as Ae, U as x, C as ee, I as le, d as Pe, b as Le, g as Oe } from "./el-popper-26aebdb6.js";
|
|
9
9
|
import { E as Ue } from "./el-divider-2f300113.js";
|
|
10
10
|
import { computed as T, ref as z, watch as ae, onBeforeUnmount as Re, defineComponent as Y, useSlots as De, openBlock as s, createBlock as k, unref as e, withCtx as m, createVNode as p, Transition as Fe, withDirectives as $e, createElementVNode as n, mergeProps as Me, withModifiers as ce, normalizeClass as b, createElementBlock as g, renderSlot as $, toDisplayString as M, createCommentVNode as _, normalizeStyle as pe, vShow as Ke, onMounted as me, withKeys as qe, resolveDynamicComponent as K, nextTick as je, inject as He, reactive as Je, createTextVNode as q, Fragment as j, renderList as H, pushScopeId as We, popScopeId as Xe } from "vue";
|
|
11
11
|
import { _ as Ye } from "./_plugin-vue_export-helper-dad06003.js";
|
|
12
12
|
import { E as F, c as Ge, l as Qe } from "./index-35129268.js";
|
|
13
|
-
import { i as Ze } from "./validator-
|
|
13
|
+
import { i as Ze } from "./validator-fe13c731.js";
|
|
14
14
|
import { u as xe } from "./index-2e331d74.js";
|
|
15
|
-
import { u as el } from "./index-
|
|
16
|
-
import "./vnode-
|
|
15
|
+
import { u as el } from "./index-482f09b5.js";
|
|
16
|
+
import "./vnode-c51c8aa3.js";
|
|
17
17
|
import "./scroll-7d352c1f.js";
|
|
18
|
-
import "./
|
|
18
|
+
import "./index-89502796.js";
|
|
19
|
+
import "./use-global-config-51cce73d.js";
|
|
20
|
+
import "./index-fee2efa8.js";
|
|
19
21
|
import "./index-657047bb.js";
|
|
20
|
-
import "./index-
|
|
21
|
-
import "./
|
|
22
|
+
import "./index-30e29356.js";
|
|
23
|
+
import "./index-b9cbb01d.js";
|
|
24
|
+
import "./debounce-ccdceb02.js";
|
|
22
25
|
const ll = ne({
|
|
23
26
|
...ge,
|
|
24
27
|
direction: {
|
|
@@ -762,11 +765,11 @@ const L = (i) => (We("data-v-da9cf1c8"), i = i(), Xe(), i), bl = { class: "kline
|
|
|
762
765
|
]);
|
|
763
766
|
};
|
|
764
767
|
}
|
|
765
|
-
}, jl = /* @__PURE__ */ Ye(ql, [["__scopeId", "data-v-da9cf1c8"]]),
|
|
768
|
+
}, jl = /* @__PURE__ */ Ye(ql, [["__scopeId", "data-v-da9cf1c8"]]), fa = {
|
|
766
769
|
install(i) {
|
|
767
770
|
i.component("st-klineConfig", jl);
|
|
768
771
|
}
|
|
769
772
|
};
|
|
770
773
|
export {
|
|
771
|
-
|
|
774
|
+
fa as default
|
|
772
775
|
};
|
package/es/KlineNew.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),C=require("./index.esm-94a95a2a.cjs"),L=require("./_plugin-vue_export-helper-f246444f.cjs"),z=require("./index-8901a38c.cjs");require("./base-ef747d02.cjs");require("./el-tag-a2e99294.cjs");const R=require("./el-select-8337856d.cjs");require("./el-scrollbar-802d874d.cjs");require("./el-popper-dca2de0d.cjs");const $=require("echarts");require("./index-3a74eae4.cjs");require("./index-e6deec5d.cjs");require("./index-8feed26f.cjs");require("./vnode-6d51e502.cjs");require("./scroll-b108dabd.cjs");require("./debounce-0b77a317.cjs");function N(D){const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(D){for(const S in D)if(S!=="default"){const g=Object.getOwnPropertyDescriptor(D,S);Object.defineProperty(x,S,g.get?g:{enumerable:!0,get:()=>D[S]})}}return x.default=D,Object.freeze(x)}const E=N($),M=t.defineComponent({__name:"index",setup(D,{expose:x}){let S=!1,g=!0,y=[];const w=(h,u)=>h.length>u?h.slice(h.length-u):h;return x({initTalib:async()=>{if(!S)S=!0,await C.init("./talib.wasm"),g=!1,y.forEach(h=>{h()});else if(g)return new Promise(h=>{y.push(h)})},handleKeyDown:(h,u)=>{let{startValue:r,endValue:d,maxIndex:f}=u;if(h.code==="ArrowLeft"){if(r===0)return;r=r-1,d=d-1}else if(h.code==="ArrowRight"){if(d===f)return;r=r+1,d=d+1}else if(h.code==="ArrowUp"){if(d-r<5)return;const p=Math.floor((d-r)/2)+1;r=r+p,d-r<5&&(r=d-4)}else if(h.code==="ArrowDown"){const p=Math.min(500,d-r);r=r-p-1}return{startValue:r,endValue:d}},getDataZoomInfoByTime:h=>{const{showStartTime:u,showEndTime:r,xAxisData:d,maxShowDays:f}=h;let p=-1,e=-1,i={};return d.forEach((a,n)=>{const l=a.split(" ")[0];i[l]=i[l]||0,i[l]+=1,new Date(a)>=new Date(u)&&p===-1&&(p=n),new Date(a)<=new Date(r)&&(e=n)}),{startValue:p,endValue:e,maxValueSpan:Math.max(...Object.values(i))*f}},formatDataBySlide:h=>{const{originDrawData:u,addData:r,startTime:d,endTime:f}=h,{mainIndicator:p,mainIndicatorList:e,subIndicator:i,subIndicatorList:a,config:n,timeRange:l}=h,{loadAddCount:b,preLoadCount:F}=n;let m=[],v=[],V=[],k=[];d&&f?(m=r.filter(s=>new Date(s[0])>=new Date(d)&&new Date(s[0])<=new Date(f)),k=[...r]):f?(m=[...r.filter((s,o)=>o>=r.length-b&&new Date(l[0])<=new Date(s[0])&&new Date(s[0])<=new Date(l[1])),...u.originData],k=[...r,...u.originData]):d&&(m=[...u.originData,...r.filter((s,o)=>o>=F&&new Date(l[0])<=new Date(s[0])&&new Date(s[0])<=new Date(l[1]))],k=m),m.forEach((s,o)=>{v.push([s[1],s[4],s[3],s[2],o===0?0:m[o-1][4],s[6]]),V.push(s[0])});let c=[],_=[];const I={time:[],open:[],close:[],high:[],low:[],originData:k};let B=null,q=null;return k.forEach((s,o)=>{I.time.push(s[0]),I.open.push(s[1]),I.close.push(s[4]),I.high.push(s[2]),I.low.push(s[3]),s[0]===m[0][0]&&(B=o),s[0]===m[m.length-1][0]&&(q=o+1)}),c=e.find(({value:s})=>s===p).config.map(s=>{const{calculationFn:o}=s,A={time:[],open:[],close:[],high:[],low:[],originData:[]};return{...s,data:o?o(C.talib,I,A).slice(B,q):[]}}),_=a.find(({value:s})=>s===i).config.reduce((s,o)=>{const{source:A,calculationFn:T}=o;return A==="calculation"?[...s,{...o,data:T?T(C.talib,I).slice(B,q):[]}]:s},[]),{originData:m,candlestickData:v,mainIndicatorData:c,subIndicatorData:_,xAxisData:V,startTime:m[0][0],endTime:m[m.length-1][0],length:m.length}},formatDataByCount:h=>{const{originDrawData:u,addData:r,mainIndicator:d,mainIndicatorList:f,subIndicator:p,subIndicatorList:e,config:i}=h;let a={};const{addCount:n,preLoadCount:l}=i,b=[],F=[],m=[],v=[],V=[];let k=[],c=[];const _=r.filter((o,A)=>(b.push(o[0]),F.push(o[1]),m.push(o[4]),v.push(o[2]),V.push(o[3]),k.push(o[0]),c.push([o[1],o[4],o[3],o[2],A===0?0:r[A-1][4],o[6]]),r.length>=n+l-1?A>=l:!0));k=w(k,_.length),c=w(c,_.length);const I={time:b,open:F,close:m,high:v,low:V,originData:r},q=f.find(o=>o.value===d).config.map(o=>({...o,data:w(o.calculationFn?o.calculationFn(C.talib,I,{time:[],open:[],close:[],high:[],low:[],originData:[]}):[],k.length)}));let s=[];return p&&e&&(s=e.find(A=>A.value===p).config.reduce((A,T)=>T.source==="calculation"?[...A,{...T,data:w(T.calculationFn?T.calculationFn(C.talib,I):[],k.length)}]:A,[])),u.length?a={originData:[..._,...u.originData],xAxisData:[...k,...u.xAxisData],candlestickData:[...c,...u.candlestickData],mainIndicatorData:u.mainIndicatorData.map((o,A)=>({...o,data:[...q[A].data,...o.data]})),subIndicatorData:u.subIndicatorData.map((o,A)=>({...o,data:[...s[A].data,...o.data]}))}:a={originData:_,xAxisData:k,candlestickData:c,mainIndicatorData:q,subIndicatorData:s},a.length=a.xAxisData.length,a.startTime=a.xAxisData[0],a.endTime=a.xAxisData[a.length-1],a},fn:()=>{}}),(h,u)=>null}}),j={class:"kline-tips"},P=t.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(D){return(x,S)=>(t.openBlock(),t.createElementBlock("div",j,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.data,(g,y)=>(t.openBlock(),t.createElementBlock("div",{key:y,class:"kline-tips-item",style:t.normalizeStyle({color:g.color})},t.toDisplayString(g.label)+" "+t.toDisplayString(g.value),5))),128))]))}});const O=L._export_sfc(P,[["__scopeId","data-v-2a02e841"]]),K={class:"kline-tips"},U=t.defineComponent({__name:"index",props:{drawData:{type:Object,require:!0},candlestickData:{type:Array,default:()=>null},mainIndicatorData:{type:Array,default:()=>null},activeIndex:{type:Number,require:!0}},setup(D){const{round:x,multiply:S,divide:g,subtract:y,formatValue:w}=z.x,h=D,u=t.computed(()=>{const{drawData:d,activeIndex:f,candlestickData:p}=h;if(p!=null&&p.length&&p[f]){let e;return p[f][6]>0?e="red":p[f][6]<0&&(e="green"),[{label:"开",value:x(p[f][0])},{label:"高",value:x(p[f][3])},{label:"低",value:x(p[f][2])},{label:"收",value:x(p[f][1])},{label:"额",value:w(p[f][4])},{label:"涨跌",value:`${x(p[f][6])}%`,color:e}]}else if(d.candlestickData&&d.candlestickData[f]){const e=d.candlestickData[f],i=[{label:"开",value:x(e[0])},{label:"高",value:x(e[3])},{label:"低",value:x(e[2])},{label:"收",value:x(e[1])}];e[5]!==void 0&&i.push({label:"额",value:w(e[5])});const a=x(S(g(y(e[1],e[4]),Math.abs(e[4])),100));let n;return a>0?n="red":a<0&&(n="green"),i.push({label:"涨跌",value:`${a}%`,color:n}),i}return[]}),r=t.computed(()=>{var p;const{drawData:d,activeIndex:f}=h;return((p=d==null?void 0:d.mainIndicatorData)==null?void 0:p.map(e=>({label:e.key,value:x(e.data[f]),color:e.color})))||[]});return(d,f)=>(t.openBlock(),t.createElementBlock("div",K,[t.createVNode(O,{data:u.value},null,8,["data"]),t.createVNode(O,{data:r.value},null,8,["data"])]))}});const Z=L._export_sfc(U,[["__scopeId","data-v-234f3f41"]]),Y={class:"klineSub"},H={class:"klineSub-tips"},G={key:0,class:"klineSub-tips-select"},J=t.defineComponent({__name:"index",props:{drawData:{type:Object,require:!0},activeIndex:{type:Number,require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0},config:{type:Object,require:!0}},emits:["update:modelValue"],setup(D,{expose:x,emit:S}){const{round:g}=z.x;let y,w;const h=S,u=D,r=t.ref(),d=t.computed({get(){return u.modelValue},set(e){h("update:modelValue",e)}}),f=t.computed(()=>{const{drawData:e,activeIndex:i}=u,a=u.subIndicatorList.find(n=>n.value===d.value);return e.originData&&e.originData[i]?a.config.map(n=>{var b,F;let l="-";return n.source==="origin"?l=e.originData[i][n.dataIndex]||"-":n.source==="calculation"&&(l=(((F=(b=e.subIndicatorData)==null?void 0:b.find(v=>v.key===n.key))==null?void 0:F.data)||[])[i]),{label:n.key,color:n.color,value:l==="-"?l:g(l)}}):[]});t.onMounted(()=>{y=E.init(r.value);let e=!0;w=new ResizeObserver(()=>{if(e){e=null;return}y.resize()}),w.observe(r.value)}),t.onUnmounted(()=>{y.dispose(),w.disconnect(),w=null});const p=(e,i)=>{const a=e[i],n=i===0?e[i]:e[i-1];return a[0]===a[1]?a[0]>=n[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:a[1]>a[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return x({connect:e=>{E.connect([e,y])},draw:e=>{t.nextTick(()=>{var k;const{startValue:i,endValue:a,maxValueSpan:n}=e,{xAxisData:l,subIndicatorData:b,candlestickData:F,originData:m}=u.drawData,v=u.subIndicatorList.find(c=>c.value===d.value),V=[];if(v.series==="bar"){let c=[];v.source==="origin"?c=m.map(_=>_[v.dataIndex]):c=((k=b==null?void 0:b.find(_=>_.key===v.dataIndex))==null?void 0:k.data)||[],V.push({name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:c.map((_,I)=>v.color==="kline"?{value:_,itemStyle:p(F,I)}:v.color==="value"?{value:_,itemStyle:{color:_>=0?"#FF0000":"#00FFFF"}}:{value:_,itemStyle:{color:v.color}})})}b.forEach(c=>{if(c.series==="line"){let _=[];c.source==="origin"?_=m.map(I=>I[c.dataIndex]):c.source==="calculation"&&(_=c.data),V.push({xAxisIndex:0,yAxisIndex:c.yAxis==="right"?2:1,name:c.key,type:"line",silent:!0,symbol:"none",data:_,lineStyle:{width:1},itemStyle:{color:c.color}})}}),y.setOption({animation:!1,grid:{left:`${u.config.gridLeft}px`,top:"10px",right:`${u.config.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:i,endValue:a,maxValueSpan:n}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:c=>{const{axisDimension:_,value:I}=c;if(_==="x")return I;if(c.axisIndex===1)return String(g(I))}}},formatter:()=>""},xAxis:{type:"category",data:l,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!0,formatter:c=>c}},yAxis:[{position:"right"},{position:"left",min:v.leftYAxisRange==="cover"?c=>c.min:null,max:v.leftYAxisRange==="cover"?c=>c.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:v.rightYAxisRange==="cover"?c=>c.min:null,max:v.rightYAxisRange==="cover"?c=>c.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:V},!0)})}}),(e,i)=>{const a=R.ElOption,n=R.ElSelect;return t.openBlock(),t.createElementBlock("div",Y,[t.createElementVNode("div",H,[f.value.length?(t.openBlock(),t.createElementBlock("div",G,[t.createVNode(n,{modelValue:d.value,"onUpdate:modelValue":i[0]||(i[0]=l=>d.value=l),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.subIndicatorList,l=>(t.openBlock(),t.createBlock(a,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),t.createVNode(O,{data:f.value},null,8,["data"])]),t.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:r},null,512)])}}});const Q=L._export_sfc(J,[["__scopeId","data-v-0a2f256e"]]),W=t.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]}},emits:["change"],setup(D,{expose:x,emit:S}){let g,y,w=null;const h=S,u=D,r=t.ref();t.watch(()=>u.data,()=>{p()},{deep:!0}),t.onMounted(()=>{g=E.init(r.value),d(),p();let e=!0;y=new ResizeObserver(()=>{if(e){e=null;return}g.resize()}),y.observe(r.value)}),t.onUnmounted(()=>{g.off("datazoom"),g.dispose(),y.disconnect(),y=null});const d=()=>{g.on("datazoom",e=>{e.dataZoomId&&(clearTimeout(w),w=setTimeout(()=>{const{data:i}=u,{start:a,end:n}=e,l=Math.floor(a*i.length/100),b=n===100?i.length-1:Math.floor(n*i.length/100);f(l,b),clearTimeout(w)},100))})},f=(e,i)=>{const a=u.data;if(a.length===0)return;const n=a[e][0].split(" ")[0],l=a[i][0].split(" ")[0];h("change",{startTime:`${n} 00:00:00`,endTime:`${l} 24:00:00`})},p=()=>{const{data:e}=u;if(e.length===0)return;const i=e.map(n=>n[0].split(" ")[0]),a=e.map(n=>n[1]);g.setOption({grid:{height:0,left:"80px",right:"80px"},xAxis:{type:"category",data:i,show:!1},yAxis:{type:"value"},series:[{data:a,type:"line"}]},!0)};return x({resetSlide:(e,i,a)=>{let n=-1,l=-1;u.data.forEach((b,F)=>{n===-1&&b[0]===e?n=F:n===-1&&new Date(b[0])>new Date(e)&&(n=F-1),(l===-1&&b[0]===i||l===-1&&new Date(b[0])>new Date(i))&&(l=F)}),l=l===-1?u.data.length-1:l,g.setOption({dataZoom:[{show:!0,startValue:n,endValue:l,maxValueSpan:a,textStyle:{color:"#ccc"}},{type:"inside",startValue:n,endValue:l,maxValueSpan:a}]})},resize:()=>{g==null||g.resize()}}),(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"klineSlide",ref_key:"slideChartRef",ref:r},null,512))}});const X=L._export_sfc(W,[["__scopeId","data-v-5008746a"]]),ee={install(D){D.component("st-klineUtils",M),D.component("st-klineSub",Q),D.component("st-klineTips",Z),D.component("st-klineSlide",X)}};module.exports=ee;
|
|
1
|
+
"use strict";const t=require("vue"),C=require("./index.esm-94a95a2a.cjs"),L=require("./_plugin-vue_export-helper-f246444f.cjs"),z=require("./index-8901a38c.cjs");require("./base-ef747d02.cjs");require("./el-tag-65658264.cjs");const R=require("./el-select-f416ce28.cjs");require("./el-scrollbar-1c9093bf.cjs");require("./el-popper-f194e471.cjs");const $=require("echarts");require("./index-62df8bda.cjs");require("./index-9780a537.cjs");require("./index-bb833443.cjs");require("./index-4cd86c5e.cjs");require("./index-8feed26f.cjs");require("./index-02f7b722.cjs");require("./scroll-b108dabd.cjs");require("./debounce-62f5b6e8.cjs");require("./vnode-b906ae6d.cjs");function N(D){const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(D){for(const S in D)if(S!=="default"){const g=Object.getOwnPropertyDescriptor(D,S);Object.defineProperty(x,S,g.get?g:{enumerable:!0,get:()=>D[S]})}}return x.default=D,Object.freeze(x)}const E=N($),M=t.defineComponent({__name:"index",setup(D,{expose:x}){let S=!1,g=!0,y=[];const w=(h,u)=>h.length>u?h.slice(h.length-u):h;return x({initTalib:async()=>{if(!S)S=!0,await C.init("./talib.wasm"),g=!1,y.forEach(h=>{h()});else if(g)return new Promise(h=>{y.push(h)})},handleKeyDown:(h,u)=>{let{startValue:r,endValue:d,maxIndex:f}=u;if(h.code==="ArrowLeft"){if(r===0)return;r=r-1,d=d-1}else if(h.code==="ArrowRight"){if(d===f)return;r=r+1,d=d+1}else if(h.code==="ArrowUp"){if(d-r<5)return;const p=Math.floor((d-r)/2)+1;r=r+p,d-r<5&&(r=d-4)}else if(h.code==="ArrowDown"){const p=Math.min(500,d-r);r=r-p-1}return{startValue:r,endValue:d}},getDataZoomInfoByTime:h=>{const{showStartTime:u,showEndTime:r,xAxisData:d,maxShowDays:f}=h;let p=-1,e=-1,i={};return d.forEach((a,n)=>{const l=a.split(" ")[0];i[l]=i[l]||0,i[l]+=1,new Date(a)>=new Date(u)&&p===-1&&(p=n),new Date(a)<=new Date(r)&&(e=n)}),{startValue:p,endValue:e,maxValueSpan:Math.max(...Object.values(i))*f}},formatDataBySlide:h=>{const{originDrawData:u,addData:r,startTime:d,endTime:f}=h,{mainIndicator:p,mainIndicatorList:e,subIndicator:i,subIndicatorList:a,config:n,timeRange:l}=h,{loadAddCount:b,preLoadCount:F}=n;let m=[],v=[],q=[],k=[];d&&f?(m=r.filter(s=>new Date(s[0])>=new Date(d)&&new Date(s[0])<=new Date(f)),k=[...r]):f?(m=[...r.filter((s,o)=>o>=r.length-b&&new Date(l[0])<=new Date(s[0])&&new Date(s[0])<=new Date(l[1])),...u.originData],k=[...r,...u.originData]):d&&(m=[...u.originData,...r.filter((s,o)=>o>=F&&new Date(l[0])<=new Date(s[0])&&new Date(s[0])<=new Date(l[1]))],k=m),m.forEach((s,o)=>{v.push([s[1],s[4],s[3],s[2],o===0?0:m[o-1][4],s[6]]),q.push(s[0])});let c=[],_=[];const I={time:[],open:[],close:[],high:[],low:[],originData:k};let B=null,T=null;return k.forEach((s,o)=>{I.time.push(s[0]),I.open.push(s[1]),I.close.push(s[4]),I.high.push(s[2]),I.low.push(s[3]),s[0]===m[0][0]&&(B=o),s[0]===m[m.length-1][0]&&(T=o+1)}),c=e.find(({value:s})=>s===p).config.map(s=>{const{calculationFn:o}=s,A={time:[],open:[],close:[],high:[],low:[],originData:[]};return{...s,data:o?o(C.talib,I,A).slice(B,T):[]}}),_=a.find(({value:s})=>s===i).config.reduce((s,o)=>{const{source:A,calculationFn:V}=o;return A==="calculation"?[...s,{...o,data:V?V(C.talib,I).slice(B,T):[]}]:s},[]),{originData:m,candlestickData:v,mainIndicatorData:c,subIndicatorData:_,xAxisData:q,startTime:m[0][0],endTime:m[m.length-1][0],length:m.length}},formatDataByCount:h=>{const{originDrawData:u,addData:r,mainIndicator:d,mainIndicatorList:f,subIndicator:p,subIndicatorList:e,config:i}=h;let a={};const{addCount:n,preLoadCount:l}=i,b=[],F=[],m=[],v=[],q=[];let k=[],c=[];const _=r.filter((o,A)=>(b.push(o[0]),F.push(o[1]),m.push(o[4]),v.push(o[2]),q.push(o[3]),k.push(o[0]),c.push([o[1],o[4],o[3],o[2],A===0?0:r[A-1][4],o[6]]),r.length>=n+l-1?A>=l:!0));k=w(k,_.length),c=w(c,_.length);const I={time:b,open:F,close:m,high:v,low:q,originData:r},T=f.find(o=>o.value===d).config.map(o=>({...o,data:w(o.calculationFn?o.calculationFn(C.talib,I,{time:[],open:[],close:[],high:[],low:[],originData:[]}):[],k.length)}));let s=[];return p&&e&&(s=e.find(A=>A.value===p).config.reduce((A,V)=>V.source==="calculation"?[...A,{...V,data:w(V.calculationFn?V.calculationFn(C.talib,I):[],k.length)}]:A,[])),u.length?a={originData:[..._,...u.originData],xAxisData:[...k,...u.xAxisData],candlestickData:[...c,...u.candlestickData],mainIndicatorData:u.mainIndicatorData.map((o,A)=>({...o,data:[...T[A].data,...o.data]})),subIndicatorData:u.subIndicatorData.map((o,A)=>({...o,data:[...s[A].data,...o.data]}))}:a={originData:_,xAxisData:k,candlestickData:c,mainIndicatorData:T,subIndicatorData:s},a.length=a.xAxisData.length,a.startTime=a.xAxisData[0],a.endTime=a.xAxisData[a.length-1],a},fn:()=>{}}),(h,u)=>null}}),j={class:"kline-tips"},P=t.defineComponent({__name:"index",props:{data:{type:Array,require:!0}},setup(D){return(x,S)=>(t.openBlock(),t.createElementBlock("div",j,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.data,(g,y)=>(t.openBlock(),t.createElementBlock("div",{key:y,class:"kline-tips-item",style:t.normalizeStyle({color:g.color})},t.toDisplayString(g.label)+" "+t.toDisplayString(g.value),5))),128))]))}});const O=L._export_sfc(P,[["__scopeId","data-v-2a02e841"]]),K={class:"kline-tips"},U=t.defineComponent({__name:"index",props:{drawData:{type:Object,require:!0},candlestickData:{type:Array,default:()=>null},mainIndicatorData:{type:Array,default:()=>null},activeIndex:{type:Number,require:!0}},setup(D){const{round:x,multiply:S,divide:g,subtract:y,formatValue:w}=z.x,h=D,u=t.computed(()=>{const{drawData:d,activeIndex:f,candlestickData:p}=h;if(p!=null&&p.length&&p[f]){let e;return p[f][6]>0?e="red":p[f][6]<0&&(e="green"),[{label:"开",value:x(p[f][0])},{label:"高",value:x(p[f][3])},{label:"低",value:x(p[f][2])},{label:"收",value:x(p[f][1])},{label:"额",value:w(p[f][4])},{label:"涨跌",value:`${x(p[f][6])}%`,color:e}]}else if(d.candlestickData&&d.candlestickData[f]){const e=d.candlestickData[f],i=[{label:"开",value:x(e[0])},{label:"高",value:x(e[3])},{label:"低",value:x(e[2])},{label:"收",value:x(e[1])}];e[5]!==void 0&&i.push({label:"额",value:w(e[5])});const a=x(S(g(y(e[1],e[4]),Math.abs(e[4])),100));let n;return a>0?n="red":a<0&&(n="green"),i.push({label:"涨跌",value:`${a}%`,color:n}),i}return[]}),r=t.computed(()=>{var p;const{drawData:d,activeIndex:f}=h;return((p=d==null?void 0:d.mainIndicatorData)==null?void 0:p.map(e=>({label:e.key,value:x(e.data[f]),color:e.color})))||[]});return(d,f)=>(t.openBlock(),t.createElementBlock("div",K,[t.createVNode(O,{data:u.value},null,8,["data"]),t.createVNode(O,{data:r.value},null,8,["data"])]))}});const Z=L._export_sfc(U,[["__scopeId","data-v-234f3f41"]]),Y={class:"klineSub"},H={class:"klineSub-tips"},G={key:0,class:"klineSub-tips-select"},J=t.defineComponent({__name:"index",props:{drawData:{type:Object,require:!0},activeIndex:{type:Number,require:!0},modelValue:{type:String,required:!0},subIndicatorList:{type:Array,required:!0},config:{type:Object,require:!0}},emits:["update:modelValue"],setup(D,{expose:x,emit:S}){const{round:g}=z.x;let y,w;const h=S,u=D,r=t.ref(),d=t.computed({get(){return u.modelValue},set(e){h("update:modelValue",e)}}),f=t.computed(()=>{const{drawData:e,activeIndex:i}=u,a=u.subIndicatorList.find(n=>n.value===d.value);return e.originData&&e.originData[i]?a.config.map(n=>{var b,F;let l="-";return n.source==="origin"?l=e.originData[i][n.dataIndex]||"-":n.source==="calculation"&&(l=(((F=(b=e.subIndicatorData)==null?void 0:b.find(v=>v.key===n.key))==null?void 0:F.data)||[])[i]),{label:n.key,color:n.color,value:l==="-"?l:g(l)}}):[]});t.onMounted(()=>{y=E.init(r.value);let e=!0;w=new ResizeObserver(()=>{if(e){e=null;return}y.resize()}),w.observe(r.value)}),t.onUnmounted(()=>{y.dispose(),w.disconnect(),w=null});const p=(e,i)=>{const a=e[i],n=i===0?e[i]:e[i-1];return a[0]===a[1]?a[0]>=n[1]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}:a[1]>a[0]?{color:"transparent",borderColor:"#FF0000"}:{color:"#00FFFF"}};return x({connect:e=>{E.connect([e,y])},draw:e=>{t.nextTick(()=>{var k;const{startValue:i,endValue:a,maxValueSpan:n}=e,{xAxisData:l,subIndicatorData:b,candlestickData:F,originData:m}=u.drawData,v=u.subIndicatorList.find(c=>c.value===d.value),q=[];if(v.series==="bar"){let c=[];v.source==="origin"?c=m.map(_=>_[v.dataIndex]):c=((k=b==null?void 0:b.find(_=>_.key===v.dataIndex))==null?void 0:k.data)||[],q.push({name:"subMain",xAxisIndex:0,yAxisIndex:1,type:"bar",silent:!0,symbol:"none",data:c.map((_,I)=>v.color==="kline"?{value:_,itemStyle:p(F,I)}:v.color==="value"?{value:_,itemStyle:{color:_>=0?"#FF0000":"#00FFFF"}}:{value:_,itemStyle:{color:v.color}})})}b.forEach(c=>{if(c.series==="line"){let _=[];c.source==="origin"?_=m.map(I=>I[c.dataIndex]):c.source==="calculation"&&(_=c.data),q.push({xAxisIndex:0,yAxisIndex:c.yAxis==="right"?2:1,name:c.key,type:"line",silent:!0,symbol:"none",data:_,lineStyle:{width:1},itemStyle:{color:c.color}})}}),y.setOption({animation:!1,grid:{left:`${u.config.gridLeft}px`,top:"10px",right:`${u.config.gridRight}px`,bottom:"20px"},dataZoom:[{type:"inside",startValue:i,endValue:a,maxValueSpan:n}],tooltip:{trigger:"axis",appendToBody:!0,confine:!0,axisPointer:{type:"cross",label:{rich:{},formatter:c=>{const{axisDimension:_,value:I}=c;if(_==="x")return I;if(c.axisIndex===1)return String(g(I))}}},formatter:()=>""},xAxis:{type:"category",data:l,axisLine:{show:!0},splitLine:{show:!1},axisLabel:{show:!0,formatter:c=>c}},yAxis:[{position:"right"},{position:"left",min:v.leftYAxisRange==="cover"?c=>c.min:null,max:v.leftYAxisRange==="cover"?c=>c.max:null,splitNumber:1,axisLine:{show:!0},splitLine:{show:!0,lineStyle:{type:"dotted",color:"#333"}}},{position:"right",min:v.rightYAxisRange==="cover"?c=>c.min:null,max:v.rightYAxisRange==="cover"?c=>c.max:null,splitNumber:1,axisLine:{show:!1},splitLine:{show:!1},axisLabel:{show:!1}}],series:q},!0)})}}),(e,i)=>{const a=R.ElOption,n=R.ElSelect;return t.openBlock(),t.createElementBlock("div",Y,[t.createElementVNode("div",H,[f.value.length?(t.openBlock(),t.createElementBlock("div",G,[t.createVNode(n,{modelValue:d.value,"onUpdate:modelValue":i[0]||(i[0]=l=>d.value=l),size:"small","popper-class":"element-dark",class:"element-dark subIndicator"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.subIndicatorList,l=>(t.openBlock(),t.createBlock(a,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),t.createVNode(O,{data:f.value},null,8,["data"])]),t.createElementVNode("div",{class:"klineSub-chart",ref_key:"subChartRef",ref:r},null,512)])}}});const Q=L._export_sfc(J,[["__scopeId","data-v-0a2f256e"]]),W=t.defineComponent({__name:"index",props:{data:{type:Array,default:()=>[]}},emits:["change"],setup(D,{expose:x,emit:S}){let g,y,w=null;const h=S,u=D,r=t.ref();t.watch(()=>u.data,()=>{p()},{deep:!0}),t.onMounted(()=>{g=E.init(r.value),d(),p();let e=!0;y=new ResizeObserver(()=>{if(e){e=null;return}g.resize()}),y.observe(r.value)}),t.onUnmounted(()=>{g.off("datazoom"),g.dispose(),y.disconnect(),y=null});const d=()=>{g.on("datazoom",e=>{e.dataZoomId&&(clearTimeout(w),w=setTimeout(()=>{const{data:i}=u,{start:a,end:n}=e,l=Math.floor(a*i.length/100),b=n===100?i.length-1:Math.floor(n*i.length/100);f(l,b),clearTimeout(w)},100))})},f=(e,i)=>{const a=u.data;if(a.length===0)return;const n=a[e][0].split(" ")[0],l=a[i][0].split(" ")[0];h("change",{startTime:`${n} 00:00:00`,endTime:`${l} 24:00:00`})},p=()=>{const{data:e}=u;if(e.length===0)return;const i=e.map(n=>n[0].split(" ")[0]),a=e.map(n=>n[1]);g.setOption({grid:{height:0,left:"80px",right:"80px"},xAxis:{type:"category",data:i,show:!1},yAxis:{type:"value"},series:[{data:a,type:"line"}]},!0)};return x({resetSlide:(e,i,a)=>{let n=-1,l=-1;u.data.forEach((b,F)=>{n===-1&&b[0]===e?n=F:n===-1&&new Date(b[0])>new Date(e)&&(n=F-1),(l===-1&&b[0]===i||l===-1&&new Date(b[0])>new Date(i))&&(l=F)}),l=l===-1?u.data.length-1:l,g.setOption({dataZoom:[{show:!0,startValue:n,endValue:l,maxValueSpan:a,textStyle:{color:"#ccc"}},{type:"inside",startValue:n,endValue:l,maxValueSpan:a}]})},resize:()=>{g==null||g.resize()}}),(e,i)=>(t.openBlock(),t.createElementBlock("div",{class:"klineSlide",ref_key:"slideChartRef",ref:r},null,512))}});const X=L._export_sfc(W,[["__scopeId","data-v-5008746a"]]),ee={install(D){D.component("st-klineUtils",M),D.component("st-klineSub",Q),D.component("st-klineTips",Z),D.component("st-klineSlide",X)}};module.exports=ee;
|
package/es/KlineNew.js
CHANGED
|
@@ -3,17 +3,20 @@ import { i as te, t as z } from "./index.esm-8d9a2abe.js";
|
|
|
3
3
|
import { _ as q } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
4
|
import { x as G } from "./index-7ed0999e.js";
|
|
5
5
|
import "./base-62a70f61.js";
|
|
6
|
-
import "./el-tag-
|
|
7
|
-
import { E as ae, a as ne } from "./el-select-
|
|
8
|
-
import "./el-scrollbar-
|
|
9
|
-
import "./el-popper-
|
|
6
|
+
import "./el-tag-7de14b18.js";
|
|
7
|
+
import { E as ae, a as ne } from "./el-select-7b52dfc9.js";
|
|
8
|
+
import "./el-scrollbar-e74f90d9.js";
|
|
9
|
+
import "./el-popper-26aebdb6.js";
|
|
10
10
|
import * as B from "echarts";
|
|
11
|
-
import "./index-
|
|
12
|
-
import "./index-
|
|
11
|
+
import "./index-fee2efa8.js";
|
|
12
|
+
import "./index-89502796.js";
|
|
13
|
+
import "./index-482f09b5.js";
|
|
14
|
+
import "./index-30e29356.js";
|
|
13
15
|
import "./index-35129268.js";
|
|
14
|
-
import "./
|
|
16
|
+
import "./index-b9cbb01d.js";
|
|
15
17
|
import "./scroll-7d352c1f.js";
|
|
16
|
-
import "./debounce-
|
|
18
|
+
import "./debounce-ccdceb02.js";
|
|
19
|
+
import "./vnode-c51c8aa3.js";
|
|
17
20
|
const oe = /* @__PURE__ */ R({
|
|
18
21
|
__name: "index",
|
|
19
22
|
setup(k, { expose: D }) {
|
|
@@ -631,11 +634,11 @@ const he = /* @__PURE__ */ q(fe, [["__scopeId", "data-v-0a2f256e"]]), me = /* @_
|
|
|
631
634
|
}, null, 512));
|
|
632
635
|
}
|
|
633
636
|
});
|
|
634
|
-
const ge = /* @__PURE__ */ q(me, [["__scopeId", "data-v-5008746a"]]),
|
|
637
|
+
const ge = /* @__PURE__ */ q(me, [["__scopeId", "data-v-5008746a"]]), ze = {
|
|
635
638
|
install(k) {
|
|
636
639
|
k.component("st-klineUtils", oe), k.component("st-klineSub", he), k.component("st-klineTips", ce), k.component("st-klineSlide", ge);
|
|
637
640
|
}
|
|
638
641
|
};
|
|
639
642
|
export {
|
|
640
|
-
|
|
643
|
+
ze as default
|
|
641
644
|
};
|