st-comp 0.0.148 → 0.0.150

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.
Files changed (150) hide show
  1. package/components.d.ts +3 -0
  2. package/es/ChartLayout.cjs +1 -1
  3. package/es/ChartLayout.js +5 -4
  4. package/es/Dialog.cjs +1 -1
  5. package/es/Dialog.js +28 -24
  6. package/es/FactorWarning.cjs +1 -1
  7. package/es/FactorWarning.js +577 -631
  8. package/es/Kline.cjs +1 -0
  9. package/es/Kline.js +1903 -0
  10. package/es/KlineBasic.cjs +1 -1
  11. package/es/KlineBasic.js +677 -1428
  12. package/es/KlineNew.cjs +1 -3
  13. package/es/KlineNew.js +316 -2740
  14. package/es/Pagination.cjs +1 -1
  15. package/es/Pagination.js +60 -58
  16. package/es/PasswordPrompt.cjs +1 -0
  17. package/es/PasswordPrompt.js +13 -0
  18. package/es/Table.cjs +1 -1
  19. package/es/Table.js +102 -98
  20. package/es/User.cjs +1 -1
  21. package/es/User.js +397 -373
  22. package/es/VarietySearch.cjs +1 -1
  23. package/es/VarietySearch.js +2395 -1
  24. package/es/VirtualTable.cjs +5 -5
  25. package/es/VirtualTable.js +154 -151
  26. package/es/_initCloneObject-47814efa.cjs +1 -0
  27. package/es/{_initCloneObject-ec5c9523.js → _initCloneObject-e3d8a9ab.js} +13 -13
  28. package/es/base-0ca7c43a.cjs +5 -0
  29. package/es/base-19787dfb.js +303 -0
  30. package/es/{castArray-c770910d.js → castArray-8405000b.js} +1 -1
  31. package/es/castArray-a78ae889.cjs +1 -0
  32. package/es/{config-provider-feed0e8a.js → config-provider-0f6672af.js} +3 -3
  33. package/es/{config-provider-c87e277f.cjs → config-provider-cfbb9cd8.cjs} +1 -1
  34. package/es/{debounce-c64fb3b5.js → debounce-6cb0781f.js} +29 -29
  35. package/es/debounce-cf26af24.cjs +1 -0
  36. package/es/{dropdown-c9272ca3.js → dropdown-17b3ef6a.js} +4 -4
  37. package/es/{dropdown-6bdb3cf4.cjs → dropdown-790d31ea.cjs} +1 -1
  38. package/es/el-button-0bf1d532.js +236 -0
  39. package/es/el-button-62966947.cjs +1 -0
  40. package/es/el-checkbox-group-45247bbf.cjs +1 -0
  41. package/es/el-checkbox-group-d53bc316.js +67 -0
  42. package/es/el-empty-2ece1134.cjs +1 -0
  43. package/es/{el-empty-89a523ed.js → el-empty-bd5343a7.js} +10 -9
  44. package/es/{el-form-item-55d36086.js → el-form-item-05c0e335.js} +82 -81
  45. package/es/el-form-item-47e255d4.cjs +12 -0
  46. package/es/{el-input-cb528574.js → el-input-1e309239.js} +46 -45
  47. package/es/el-input-6a3805c5.cjs +1 -0
  48. package/es/{el-input-number-ce30bfa8.js → el-input-number-60ebc58f.js} +50 -48
  49. package/es/el-input-number-96ff2e47.cjs +1 -0
  50. package/es/el-menu-item-4c9eb7ad.cjs +1 -0
  51. package/es/el-menu-item-6c6236a1.js +772 -0
  52. package/es/{el-message-d51d032b.js → el-message-7d927756.js} +56 -55
  53. package/es/el-message-d5ed7a4f.cjs +1 -0
  54. package/es/el-overlay-26bf0945.js +521 -0
  55. package/es/el-overlay-41994f67.cjs +1 -0
  56. package/es/el-popover-17e2e66c.js +140 -0
  57. package/es/el-popover-7bd8a7c3.cjs +1 -0
  58. package/es/el-popper-7adbf1c6.cjs +1 -0
  59. package/es/{el-popper-f4b01f85.js → el-popper-b6527ae2.js} +217 -216
  60. package/es/{el-scrollbar-e8e93751.js → el-scrollbar-29bcab5f.js} +22 -22
  61. package/es/el-scrollbar-ac525239.cjs +1 -0
  62. package/es/el-select-31f8ac8a.cjs +1 -0
  63. package/es/{el-select-e71af2e6.js → el-select-7395562b.js} +42 -40
  64. package/es/el-table-column-47d80736.js +3804 -0
  65. package/es/el-table-column-bdc46568.cjs +14 -0
  66. package/es/{el-tag-d65768f4.js → el-tag-7414e0c7.js} +59 -58
  67. package/es/el-tag-9732314f.cjs +1 -0
  68. package/es/{index-da646183.cjs → index-1d85ba4b.cjs} +1 -1
  69. package/es/{index-92ba4292.js → index-273822d1.js} +26 -25
  70. package/es/index-2f958e56.cjs +3 -0
  71. package/es/index-375e8de4.cjs +5 -0
  72. package/es/{index-121e2861.js → index-621b092b.js} +3 -3
  73. package/es/index-657047bb.js +513 -0
  74. package/es/{index-18416440.cjs → index-65b4113e.cjs} +1 -1
  75. package/es/index-70372cdb.js +519 -0
  76. package/es/{use-form-common-props-4d37077d.js → index-72151b24.js} +151 -312
  77. package/es/index-9e6e8d03.cjs +1 -0
  78. package/es/index-ab96bbf4.js +156 -0
  79. package/es/index-afc88a4b.cjs +1 -0
  80. package/es/index-c066fe0d.js +82 -0
  81. package/es/index-ce3223db.cjs +1 -0
  82. package/es/{index-709675d5.js → index-dc22ffe4.js} +18 -18
  83. package/es/index-eea0bcb3.cjs +1 -0
  84. package/es/index.esm-8d9a2abe.js +2432 -0
  85. package/es/index.esm-94a95a2a.cjs +3 -0
  86. package/es/{raf-f55e0daa.js → raf-a532c514.js} +1 -1
  87. package/es/{raf-2d77cbbe.cjs → raf-f46caea0.cjs} +1 -1
  88. package/es/{scroll-c8ac196e.cjs → scroll-339681d4.cjs} +1 -1
  89. package/es/{scroll-ca84f80a.js → scroll-d787d648.js} +1 -1
  90. package/es/style.css +1 -1
  91. package/es/use-form-common-props-5ff2f51b.js +171 -0
  92. package/es/use-form-common-props-74a96df2.cjs +2 -0
  93. package/es/vnode-6a0c7411.js +14 -0
  94. package/es/vnode-b15eb11b.cjs +1 -0
  95. package/es/{zh-cn-414d7f0c.cjs → zh-cn-36f34912.cjs} +1 -1
  96. package/es/{zh-cn-23c8e0d1.js → zh-cn-f37255ae.js} +2 -2
  97. package/lib/bundle.js +1 -1
  98. package/lib/bundle.umd.cjs +206 -206
  99. package/lib/{index-ffeb163e.js → index-d0cb2fa2.js} +33754 -31705
  100. package/lib/{python-0ec8f68c.js → python-050ba5a4.js} +1 -1
  101. package/lib/style.css +1 -1
  102. package/package.json +1 -1
  103. package/packages/Kline/components/Contextmenu/index.vue +110 -0
  104. package/packages/Kline/components/Tips/index.vue +40 -0
  105. package/packages/Kline/componentsNew/KlineSlide/index.vue +155 -0
  106. package/packages/Kline/componentsNew/KlineSub/index.vue +297 -0
  107. package/packages/Kline/componentsNew/KlineTips/index.vue +66 -0
  108. package/packages/Kline/componentsNew/KlineUtils/index.vue +84 -0
  109. package/packages/Kline/componentsNew/Tips/index.vue +33 -0
  110. package/packages/Kline/formatKlineData.ts +109 -0
  111. package/packages/Kline/images/buy.svg +1 -0
  112. package/packages/Kline/images/pen.png +0 -0
  113. package/packages/Kline/images/sell.svg +1 -0
  114. package/packages/Kline/images/t.svg +1 -0
  115. package/packages/Kline/index.ts +16 -0
  116. package/packages/Kline/index.vue +891 -0
  117. package/packages/Kline/option.ts +539 -0
  118. package/packages/Kline/type.d.ts +219 -0
  119. package/packages/Kline/utils.ts +682 -0
  120. package/packages/PasswordPrompt/index.ts +8 -0
  121. package/packages/PasswordPrompt/index.vue +266 -0
  122. package/packages/User/index.vue +97 -58
  123. package/packages/index.ts +4 -0
  124. package/src/pages/Kline/index.vue +12 -0
  125. package/src/pages/PasswordPrompt/index.vue +12 -0
  126. package/src/router/routes.ts +10 -0
  127. package/es/_initCloneObject-476b02ce.cjs +0 -1
  128. package/es/base-6ccc8fc2.cjs +0 -9
  129. package/es/base-950bac7e.js +0 -816
  130. package/es/castArray-374558a5.cjs +0 -1
  131. package/es/debounce-a6b4f91b.cjs +0 -1
  132. package/es/el-button-b8f71c7d.cjs +0 -1
  133. package/es/el-button-d7b6eebd.js +0 -745
  134. package/es/el-empty-12eece57.cjs +0 -1
  135. package/es/el-form-item-ebbf096d.cjs +0 -12
  136. package/es/el-input-2c7e70a3.cjs +0 -1
  137. package/es/el-input-number-8e168e83.cjs +0 -1
  138. package/es/el-message-612c2346.cjs +0 -1
  139. package/es/el-overlay-07414277.js +0 -526
  140. package/es/el-overlay-fb255b83.cjs +0 -1
  141. package/es/el-popper-8360bd91.cjs +0 -1
  142. package/es/el-scrollbar-271142ad.cjs +0 -1
  143. package/es/el-select-2e71d4af.cjs +0 -1
  144. package/es/el-table-column-9fe79f05.cjs +0 -14
  145. package/es/el-table-column-dc562f14.js +0 -3933
  146. package/es/el-tag-930e7b32.cjs +0 -1
  147. package/es/index-0ed86daf.cjs +0 -3
  148. package/es/index-674d2fd7.cjs +0 -1
  149. package/es/index-aece600c.js +0 -81
  150. package/es/use-form-common-props-c1960844.cjs +0 -2
@@ -0,0 +1,219 @@
1
+ import type { ElementEvent, ECElementEvent } from 'echarts'
2
+
3
+ /**
4
+ * @description: K线单条数据类型
5
+ * [时间,开,高,低,收,成交量,成交额]
6
+ */
7
+ export type KlineDataItem = [string, number, number, number, number, number, number]
8
+
9
+ /**
10
+ * @description: K线数据类型
11
+ * [[时间,开,高,低,收,成交量,成交额], ...]
12
+ */
13
+ export type KlineDataType = KlineDataItem[]
14
+
15
+ /**
16
+ * @description: K线组件默认配置类型
17
+ */
18
+ export interface InConfig {
19
+ totalBarCount: number // k线总条数
20
+ defaultShowBarCount: number // k线默认展示条数
21
+ preBarCount: number // k线预加载条数,用于计算指标线
22
+ maxValueSpan: number // k线一屏最大数量
23
+ gridLeft: number // k线组件 grid.left
24
+ gridTop: number // k线组件 grid.top
25
+ gridRight: number // k线组件 grid.right
26
+ gridBottom: number // k线组件 grid.bottom
27
+ warningConfig: any // 预警线配置
28
+ positionConfig: any // 持仓线配置
29
+ conditionConfig: any // 条件单配置
30
+ tipsConfig: any // Tips展示配置
31
+ dynamicLoadConfig: any // 动态加载历史/后续K线配置
32
+ zoomLock: boolean // 是否禁用滚轮缩放K线
33
+ isOpenDS: boolean // 是否开启收盘价分布统计功能
34
+ }
35
+
36
+ //----------------额外画线数据相关TS类型---------------------
37
+
38
+ /**
39
+ * @description: 额外画线-基础customConfig
40
+ * @example
41
+ * draggable?: boolean 是否支持拖拽[默认值:false]
42
+ */
43
+ interface LineCustomConfigType {
44
+ draggable?: boolean
45
+ }
46
+
47
+ /**
48
+ * @description: 额外画线-预警线customConfig
49
+ * @example
50
+ * draggable?: boolean 是否支持拖拽[默认值:false]
51
+ * lineColor?: string 主线颜色
52
+ * textColor?: string 主线文本颜色
53
+ */
54
+ export interface WarningConfigType extends LineCustomConfigType {
55
+ lineColor?: string
56
+ textColor?: string
57
+ }
58
+
59
+ /**
60
+ * @description: 额外画线-持仓线customConfig
61
+ * @example
62
+ * draggable?: boolean 是否支持拖拽[默认值:false]
63
+ * lineColor?: string 主线颜色
64
+ * textColor?: string 主线文本颜色
65
+ */
66
+ export interface PositionConfigType extends LineCustomConfigType {
67
+ lineColor?: string
68
+ textColor?: string
69
+ }
70
+
71
+ /**
72
+ * @description: 额外画线-条件单customConfig
73
+ * @example
74
+ * draggable?: boolean 是否支持拖拽[默认值:false]
75
+ * lineColor?: string 主线颜色
76
+ * textColor?: string 主线文本颜色
77
+ * profitLineColor?: string 止盈线颜色
78
+ * profitTextColor?: string 止盈线文本颜色
79
+ * lossLineColor?: string 止损线颜色
80
+ * lossTextColor?: string 止损线文本颜色
81
+ */
82
+ export interface ConditionConfigType extends LineCustomConfigType {
83
+ lineColor?: string
84
+ textColor?: string
85
+ profitLineColor?: string
86
+ profitTextColor?: string
87
+ lossLineColor?: string
88
+ lossTextColor?: string
89
+ }
90
+
91
+ /**
92
+ * @description: 预警线数据类型data
93
+ * @example
94
+ * value: number 主线Y值,
95
+ * text: string 主线文本,
96
+ * info: any 自定义数据信息,
97
+ * config: WarningConfigType 自定义配置
98
+ */
99
+ export interface WarningDataItem {
100
+ value: number
101
+ text: string
102
+ info: any
103
+ config: WarningConfigType
104
+ }
105
+
106
+ /**
107
+ * @description: 持仓线数据类型data
108
+ * @example
109
+ * value: number 主线Y值,
110
+ * text: string 主线文本,
111
+ * info: any 自定义数据信息,
112
+ * config: PositionConfigType 自定义配置
113
+ */
114
+ export interface PositionDataItem {
115
+ value: number
116
+ text: string
117
+ info: any
118
+ config: PositionConfigType
119
+ }
120
+
121
+ /**
122
+ * @description: 条件单数据类型data
123
+ * @example
124
+ * value: number 主线Y值,
125
+ * text: string 主线文本,
126
+ * profitValue: number 盈利线Y值,
127
+ * profitText: string 盈利线文本,
128
+ * lossValue: number 亏损线Y值,
129
+ * lossText: string 亏损线文本,
130
+ * info: any 自定义数据信息,
131
+ * config: ConditionConfigType 自定义配置
132
+ */
133
+ export interface ConditionDataItem {
134
+ value: number
135
+ text: string
136
+ profitValue: number
137
+ profitText: string
138
+ lossValue: number
139
+ lossText: string
140
+ info: any
141
+ config: ConditionConfigType
142
+ }
143
+
144
+ /**
145
+ * @description: 额外画线-graphic事件
146
+ * @example
147
+ * onmouseover?: (params: ElementEvent) => void
148
+ * onmouseout?: (params: ElementEvent) => void
149
+ * ondragstart?: (params: ElementEvent) => void
150
+ * ondragend?: (params: ElementEvent, yAxisValue: number) => void
151
+ * ononcontextmenu?: (params: ECElementEvent, menuData: MenuDataType) => void
152
+ */
153
+ export interface GraphicEvent {
154
+ onmouseover?: (params: ElementEvent, info: any) => void
155
+ onmouseout?: (params: ElementEvent, info: any) => void
156
+ ondragstart?: (params: ElementEvent, info: any) => void
157
+ ondragend?: (params: ElementEvent, info: any, yAxisValue: number) => void
158
+ ononcontextmenu?: (params: ECElementEvent, info: any, menuData: MenuDataType) => void
159
+ }
160
+
161
+ // 额外画线-单条数据
162
+ interface LineDataItem extends GraphicEvent {
163
+ key: 'warning' | 'position' | 'condition'
164
+ data: WarningDataItem[] | PositionDataItem[] | ConditionDataItem[]
165
+ }
166
+
167
+ // 额外画线
168
+ export type LineDataType = LineDataItem[]
169
+
170
+ //----------------指标线计算相关TS类型-----------------------
171
+
172
+ /**
173
+ * @description: 指标线配置类型
174
+ * @example
175
+ * config: Array 内含哪些指标
176
+ * label: 指标名称
177
+ * mergeFreq: 需要合并的K线周期
178
+ * showFreq: 哪些周期里展示
179
+ * value: 指标名称
180
+ */
181
+ export interface IndicatorConfigType {
182
+ config: Array<{
183
+ key: string
184
+ color: string
185
+ calculationFn: Function
186
+ }>
187
+ label: string
188
+ mergeFreq: undefined | string
189
+ showFreq: undefined | string[]
190
+ value: string
191
+ }
192
+
193
+ /**
194
+ * @description: 指标线计算-指标数据
195
+ */
196
+ export interface InFormatKlinendicatorData {
197
+ key: string
198
+ color: string
199
+ data: number[]
200
+ }
201
+
202
+ /**
203
+ * @description: 指标线计算-返回的格式化数据
204
+ */
205
+ export interface InFormatKlineData {
206
+ originData: KlineDataType
207
+ kLine: [number, number, number, number][]
208
+ time: string[]
209
+ indicator: InFormatKlinendicatorData[]
210
+ }
211
+
212
+ //----------------右键悬浮菜单相关TS类型----------------------
213
+
214
+ export interface MenuDataItem {
215
+ label: string
216
+ callBack?: Function
217
+ }
218
+
219
+ export type MenuDataType = MenuDataItem[]