st-comp 0.0.277 → 0.0.279

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 (319) hide show
  1. package/README.md +19 -19
  2. package/es/ChartLayout.cjs +1 -1
  3. package/es/ChartLayout.js +1 -1
  4. package/es/ConfigProvider.cjs +1 -1
  5. package/es/ConfigProvider.js +3 -3
  6. package/es/Contextmenu.cjs +1 -1
  7. package/es/Contextmenu.js +7 -7
  8. package/es/CustomFunction.cjs +2 -2
  9. package/es/CustomFunction.js +514 -308
  10. package/es/FactorWarning.cjs +1 -1
  11. package/es/FactorWarning.js +37 -37
  12. package/es/HeatMap.cjs +1 -1
  13. package/es/HeatMap.js +7 -7
  14. package/es/Kline.cjs +1 -1
  15. package/es/Kline.js +18 -18
  16. package/es/KlineBasic.cjs +1 -1
  17. package/es/KlineBasic.js +93 -93
  18. package/es/KlineConfig.cjs +1 -1
  19. package/es/KlineConfig.js +17 -17
  20. package/es/KlineNew.cjs +1 -1
  21. package/es/KlineNew.js +14 -14
  22. package/es/KlinePlus.cjs +4 -4
  23. package/es/KlinePlus.js +760 -656
  24. package/es/LinearLegend.cjs +1 -1
  25. package/es/LinearLegend.js +1 -1
  26. package/es/Map.cjs +1 -1
  27. package/es/Map.js +1 -1
  28. package/es/MonacoEditor.cjs +1 -1
  29. package/es/MonacoEditor.js +18 -18
  30. package/es/Pagination.cjs +1 -1
  31. package/es/Pagination.js +76 -76
  32. package/es/PasswordPrompt.cjs +1 -1
  33. package/es/PasswordPrompt.js +2 -2
  34. package/es/Pie.cjs +2 -2
  35. package/es/Pie.js +14 -14
  36. package/es/Table.cjs +1 -1
  37. package/es/Table.js +22 -22
  38. package/es/TreeMap.cjs +1 -1
  39. package/es/TreeMap.js +4 -4
  40. package/es/User.cjs +1 -1
  41. package/es/User.js +73 -73
  42. package/es/VarSelectDialog.cjs +2 -2
  43. package/es/VarSelectDialog.js +21 -21
  44. package/es/VarietyAiHelper.cjs +4 -4
  45. package/es/VarietyAiHelper.js +139 -138
  46. package/es/VarietyAutoComplete.cjs +1 -1
  47. package/es/VarietyAutoComplete.js +16 -16
  48. package/es/VarietySearch.cjs +4 -4
  49. package/es/VarietySearch.js +861 -857
  50. package/es/{VarietySelect-6a166293.js → VarietySelect-41daac7b.js} +10 -10
  51. package/es/{VarietySelect-610903f0.cjs → VarietySelect-d58eee29.cjs} +1 -1
  52. package/es/VarietyTextCopy.cjs +2 -2
  53. package/es/VarietyTextCopy.js +25 -25
  54. package/es/VirtualTable.cjs +1 -1
  55. package/es/VirtualTable.js +6 -6
  56. package/es/{_initCloneObject-152b4f4e.js → _initCloneObject-5e73c9c8.js} +2 -2
  57. package/es/{_initCloneObject-76e116d0.cjs → _initCloneObject-a5832933.cjs} +1 -1
  58. package/es/aiTools-229609fb.cjs +2 -0
  59. package/es/aiTools-ce2f9281.js +115 -0
  60. package/es/aiTools.js +179 -176
  61. package/es/{config-provider-4c784baf.cjs → config-provider-06ea6b42.cjs} +1 -1
  62. package/es/{config-provider-7a3aca55.js → config-provider-88b637a8.js} +3 -3
  63. package/es/{dropdown-987c47fb.cjs → dropdown-4ce4c3e2.cjs} +1 -1
  64. package/es/{dropdown-01e09205.js → dropdown-72fbc15d.js} +2 -2
  65. package/es/{el-autocomplete-342ae823.js → el-autocomplete-6cafcdf1.js} +5 -5
  66. package/es/{el-autocomplete-16f66b34.cjs → el-autocomplete-e0857c5b.cjs} +1 -1
  67. package/es/{el-button-13dc915f.cjs → el-button-613e0bb2.cjs} +1 -1
  68. package/es/{el-button-314171a0.js → el-button-94d3de38.js} +3 -3
  69. package/es/{el-checkbox-5899681f.js → el-checkbox-6d4cb393.js} +3 -3
  70. package/es/{el-checkbox-bdf64663.cjs → el-checkbox-e90762df.cjs} +1 -1
  71. package/es/{el-dialog-0ef95df6.cjs → el-dialog-02942e22.cjs} +1 -1
  72. package/es/{el-dialog-86a3eec2.js → el-dialog-5e30161f.js} +4 -4
  73. package/es/{el-form-item-77ef6784.cjs → el-form-item-44f060d8.cjs} +1 -1
  74. package/es/{el-form-item-cda4d93c.js → el-form-item-9e8969ea.js} +5 -5
  75. package/es/{el-input-fa1445ad.js → el-input-342b2def.js} +13 -13
  76. package/es/{el-input-89222943.cjs → el-input-9a9a7f7f.cjs} +1 -1
  77. package/es/{el-input-number-d3338e5e.cjs → el-input-number-65c847d6.cjs} +1 -1
  78. package/es/{el-input-number-8f6dbf74.js → el-input-number-c22b803a.js} +35 -35
  79. package/es/{el-loading-84dde1a8.cjs → el-loading-8179b497.cjs} +1 -1
  80. package/es/{el-loading-9b671203.js → el-loading-bcc51e3d.js} +1 -1
  81. package/es/{el-menu-item-535fef90.js → el-menu-item-339baf6d.js} +21 -21
  82. package/es/{el-menu-item-4531fd0e.cjs → el-menu-item-83186444.cjs} +1 -1
  83. package/es/{el-message-box-621ed2f1.js → el-message-box-035b699c.js} +9 -9
  84. package/es/{el-message-box-f5717070.cjs → el-message-box-c62d3217.cjs} +1 -1
  85. package/es/{el-overlay-23de4324.js → el-overlay-3e17604b.js} +3 -3
  86. package/es/{el-overlay-151708cb.cjs → el-overlay-8f1da9e8.cjs} +1 -1
  87. package/es/{el-popconfirm-b8aa490e.cjs → el-popconfirm-4e32ec1b.cjs} +1 -1
  88. package/es/{el-popconfirm-bcff0aa5.js → el-popconfirm-f8a86e2c.js} +4 -4
  89. package/es/{el-popper-43ec37f4.cjs → el-popper-a4f3ae4d.cjs} +1 -1
  90. package/es/{el-popper-03988662.js → el-popper-fbd0dcea.js} +1 -1
  91. package/es/{el-segmented-db3a86be.js → el-segmented-56bd58a8.js} +2 -2
  92. package/es/{el-segmented-79a1367c.cjs → el-segmented-833ac177.cjs} +1 -1
  93. package/es/{el-select-4bd0010d.js → el-select-44fa547d.js} +8 -8
  94. package/es/{el-select-ec04e7ce.cjs → el-select-70806166.cjs} +1 -1
  95. package/es/{el-table-column-35e47229.cjs → el-table-column-3e2cdfca.cjs} +1 -1
  96. package/es/{el-table-column-7af2bec7.js → el-table-column-b74a857d.js} +9 -9
  97. package/es/{el-tag-bef9e83d.js → el-tag-66c83156.js} +2 -2
  98. package/es/{el-tag-5d5608e0.cjs → el-tag-9c2f329f.cjs} +1 -1
  99. package/es/{el-text-f998902c.js → el-text-034bd3f4.js} +1 -1
  100. package/es/{el-text-abf10fdf.cjs → el-text-6b2374bb.cjs} +1 -1
  101. package/es/index-00f6ca75.cjs +1 -0
  102. package/es/{index-a00e0534.cjs → index-185792a7.cjs} +1 -1
  103. package/es/{index-d1b554ac.js → index-1e2a38ab.js} +2 -2
  104. package/es/{index-0986e373.cjs → index-3153c1db.cjs} +1 -1
  105. package/es/{index-936e7dec.js → index-44a382a5.js} +2 -2
  106. package/es/{index-ce21e2ce.js → index-5216d5f5.js} +5 -5
  107. package/es/{index-7ed0999e.js → index-53cc4e43.js} +720 -716
  108. package/es/{index-cfcd60ca.cjs → index-5c0dd943.cjs} +1 -1
  109. package/es/{index-cfd00899.cjs → index-870b6c9d.cjs} +1 -1
  110. package/es/{index-a83ec4b7.js → index-8c2d7e05.js} +1 -1
  111. package/es/{index-8901a38c.cjs → index-94131fd7.cjs} +30 -30
  112. package/es/{index-db846633.cjs → index-9d16cea8.cjs} +1 -1
  113. package/es/{index-f3f6ee27.js → index-a33b2fb8.js} +178 -178
  114. package/es/{index-2d7ac156.cjs → index-a9246d17.cjs} +17 -17
  115. package/es/{index-60c69dd1.cjs → index-ac8dc53d.cjs} +1 -1
  116. package/es/{index-102edf6c.js → index-c5f2d372.js} +2 -2
  117. package/es/{index-6290ae0f.js → index-c6584658.js} +2 -2
  118. package/es/{index-5c44d71a.js → index-eb96e074.js} +149 -119
  119. package/es/{index-5ed42e9c.js → index-f034b910.js} +2 -2
  120. package/es/{index-c58e90e9.cjs → index-f58b2920.cjs} +1 -1
  121. package/es/{python-6cc6ec1b.js → python-8a1664e6.js} +18 -18
  122. package/es/{python-71f59893.cjs → python-a3db9620.cjs} +1 -1
  123. package/es/style.css +1 -1
  124. package/es/{use-form-common-props-02be4928.cjs → use-form-common-props-ac666630.cjs} +1 -1
  125. package/es/{use-form-common-props-76a09d89.js → use-form-common-props-ed72e914.js} +11 -11
  126. package/es/{use-global-config-31b3ec57.cjs → use-global-config-23472471.cjs} +1 -1
  127. package/es/{use-global-config-0f43458b.js → use-global-config-ee406d58.js} +2 -2
  128. package/es/{validator-ea292506.cjs → validator-366dbf39.cjs} +1 -1
  129. package/es/{validator-0e037618.js → validator-c60a8956.js} +1 -1
  130. package/es/{zh-cn-1227eb8a.js → zh-cn-b59a0910.js} +1 -1
  131. package/es/{zh-cn-0edc7234.cjs → zh-cn-c21d12d8.cjs} +1 -1
  132. package/lib/aiTools.js +179 -176
  133. package/lib/bundle.js +1 -1
  134. package/lib/bundle.umd.cjs +230 -230
  135. package/lib/{index-2a269748.js → index-62fa175a.js} +30149 -29800
  136. package/lib/{python-41da18e5.js → python-4a48fa39.js} +1 -1
  137. package/lib/style.css +1 -1
  138. package/package.json +53 -44
  139. package/auto-imports.d.ts +0 -13
  140. package/components.d.ts +0 -59
  141. package/es/aiTools-a3b095f6.js +0 -113
  142. package/es/aiTools-f36136a4.cjs +0 -2
  143. package/es/index-476c4459.cjs +0 -1
  144. package/index.html +0 -13
  145. package/packages/ChartLayout/index.ts +0 -8
  146. package/packages/ChartLayout/index.vue +0 -63
  147. package/packages/ConfigProvider/index.ts +0 -8
  148. package/packages/ConfigProvider/index.vue +0 -66
  149. package/packages/Contextmenu/index.ts +0 -8
  150. package/packages/Contextmenu/index.vue +0 -134
  151. package/packages/CustomFunction/components/ManageDialog.vue +0 -706
  152. package/packages/CustomFunction/index.ts +0 -8
  153. package/packages/CustomFunction/index.vue +0 -200
  154. package/packages/FactorWarning/index.ts +0 -8
  155. package/packages/FactorWarning/index.vue +0 -754
  156. package/packages/FactorWarning/tools.js +0 -10
  157. package/packages/HeatMap/index.ts +0 -8
  158. package/packages/HeatMap/index.vue +0 -141
  159. package/packages/Kline/components/Contextmenu/index.vue +0 -110
  160. package/packages/Kline/components/Tips/index.vue +0 -40
  161. package/packages/Kline/componentsNew/KlineSlide/index.vue +0 -155
  162. package/packages/Kline/componentsNew/KlineSub/index.vue +0 -297
  163. package/packages/Kline/componentsNew/KlineTips/index.vue +0 -66
  164. package/packages/Kline/componentsNew/KlineUtils/index.vue +0 -84
  165. package/packages/Kline/componentsNew/Tips/index.vue +0 -33
  166. package/packages/Kline/formatKlineData.ts +0 -109
  167. package/packages/Kline/images/buy.svg +0 -1
  168. package/packages/Kline/images/pen.png +0 -0
  169. package/packages/Kline/images/sell.svg +0 -1
  170. package/packages/Kline/images/t.svg +0 -1
  171. package/packages/Kline/index.ts +0 -16
  172. package/packages/Kline/index.vue +0 -891
  173. package/packages/Kline/option.ts +0 -539
  174. package/packages/Kline/type.d.ts +0 -219
  175. package/packages/Kline/utils.ts +0 -682
  176. package/packages/KlineBasic/api.js +0 -58
  177. package/packages/KlineBasic/components/AverageTips/index.vue +0 -33
  178. package/packages/KlineBasic/components/Contextmenu/index.vue +0 -105
  179. package/packages/KlineBasic/components/KlineSub/index.vue +0 -332
  180. package/packages/KlineBasic/components/KlineTips/index.vue +0 -99
  181. package/packages/KlineBasic/components/Tips/index.vue +0 -56
  182. package/packages/KlineBasic/index.ts +0 -8
  183. package/packages/KlineBasic/index.vue +0 -839
  184. package/packages/KlineBasic/utils.js +0 -258
  185. package/packages/KlineConfig/config.js +0 -46
  186. package/packages/KlineConfig/index.ts +0 -8
  187. package/packages/KlineConfig/index.vue +0 -356
  188. package/packages/KlineNew/components/KlineSlide/index.vue +0 -156
  189. package/packages/KlineNew/components/KlineSub/index.vue +0 -335
  190. package/packages/KlineNew/components/KlineTips/index.vue +0 -96
  191. package/packages/KlineNew/components/KlineUtils/index.vue +0 -341
  192. package/packages/KlineNew/components/Tips/index.vue +0 -33
  193. package/packages/KlineNew/index.ts +0 -14
  194. package/packages/KlinePlus/components/SliderChart.vue +0 -208
  195. package/packages/KlinePlus/components/Tips.vue +0 -36
  196. package/packages/KlinePlus/images/buy.svg +0 -1
  197. package/packages/KlinePlus/images/sell.svg +0 -1
  198. package/packages/KlinePlus/images/t.svg +0 -1
  199. package/packages/KlinePlus/index.ts +0 -8
  200. package/packages/KlinePlus/index.vue +0 -1067
  201. package/packages/KlinePlus/utils.js +0 -771
  202. package/packages/LinearLegend/index.ts +0 -8
  203. package/packages/LinearLegend/index.vue +0 -112
  204. package/packages/Map/China.json +0 -1
  205. package/packages/Map/index.ts +0 -8
  206. package/packages/Map/index.vue +0 -147
  207. package/packages/MonacoEditor/index.ts +0 -8
  208. package/packages/MonacoEditor/index.vue +0 -1141
  209. package/packages/MonacoEditor/tools.js +0 -18
  210. package/packages/Pagination/index.ts +0 -8
  211. package/packages/Pagination/index.vue +0 -87
  212. package/packages/PasswordPrompt/index.ts +0 -8
  213. package/packages/PasswordPrompt/index.vue +0 -267
  214. package/packages/Pie/index.ts +0 -8
  215. package/packages/Pie/index.vue +0 -148
  216. package/packages/Table/components/Button/index.vue +0 -61
  217. package/packages/Table/components/Formatter/index.vue +0 -26
  218. package/packages/Table/index.d.ts +0 -0
  219. package/packages/Table/index.ts +0 -8
  220. package/packages/Table/index.vue +0 -133
  221. package/packages/TreeMap/index.ts +0 -8
  222. package/packages/TreeMap/index.vue +0 -186
  223. package/packages/User/components/EditInfoDialog/Mobile.vue +0 -214
  224. package/packages/User/components/EditInfoDialog/index.vue +0 -161
  225. package/packages/User/components/EditPasswordDialog.vue +0 -168
  226. package/packages/User/components/SetPasswordDialog.vue +0 -160
  227. package/packages/User/index.ts +0 -8
  228. package/packages/User/index.vue +0 -117
  229. package/packages/VarSelectDialog/Mock.js +0 -495
  230. package/packages/VarSelectDialog/VarietySelect.vue +0 -78
  231. package/packages/VarSelectDialog/index.ts +0 -8
  232. package/packages/VarSelectDialog/index.vue +0 -323
  233. package/packages/VarietyAiHelper/images/like.png +0 -0
  234. package/packages/VarietyAiHelper/images/like_no.png +0 -0
  235. package/packages/VarietyAiHelper/index.ts +0 -8
  236. package/packages/VarietyAiHelper/index.vue +0 -910
  237. package/packages/VarietyAutoComplete/index.ts +0 -8
  238. package/packages/VarietyAutoComplete/index.vue +0 -89
  239. package/packages/VarietySearch/components/AddTag/index.vue +0 -268
  240. package/packages/VarietySearch/components/CommonIndicator/IndicatorTags.vue +0 -52
  241. package/packages/VarietySearch/components/CommonIndicator/index.vue +0 -697
  242. package/packages/VarietySearch/components/CommonIndicator/tools.js +0 -260
  243. package/packages/VarietySearch/components/CompositeOrder/index.vue +0 -260
  244. package/packages/VarietySearch/components/FactorScreen/FactorDescription.vue +0 -70
  245. package/packages/VarietySearch/components/FactorScreen/index.vue +0 -1158
  246. package/packages/VarietySearch/components/FactorScreen/tools.js +0 -34
  247. package/packages/VarietySearch/config.js +0 -539
  248. package/packages/VarietySearch/index.ts +0 -8
  249. package/packages/VarietySearch/index.vue +0 -688
  250. package/packages/VarietyTextCopy/index.ts +0 -8
  251. package/packages/VarietyTextCopy/index.vue +0 -136
  252. package/packages/VirtualTable/index.ts +0 -8
  253. package/packages/VirtualTable/index.vue +0 -241
  254. package/packages/index.ts +0 -59
  255. package/public/aiTools.js +0 -176
  256. package/public/talib.wasm +0 -0
  257. package/public/vite.svg +0 -1
  258. package/src/App.vue +0 -140
  259. package/src/assets/vue.svg +0 -1
  260. package/src/components/Dialog/index.vue +0 -16
  261. package/src/components/Kline/index.vue +0 -21
  262. package/src/components/Table/index.vue +0 -27
  263. package/src/main.ts +0 -17
  264. package/src/pages/ChartLayout/index.vue +0 -22
  265. package/src/pages/ConfigProvider/index.vue +0 -9
  266. package/src/pages/Contextmenu/index.vue +0 -46
  267. package/src/pages/CustomFunction/index.vue +0 -13
  268. package/src/pages/FactorWarning/index.vue +0 -203
  269. package/src/pages/HeatMap/index.vue +0 -128
  270. package/src/pages/Kline/index.vue +0 -12
  271. package/src/pages/KlineBasic/api.js +0 -48
  272. package/src/pages/KlineBasic/index.vue +0 -366
  273. package/src/pages/KlineBasic/indicator.js +0 -114
  274. package/src/pages/KlineConfig/index.vue +0 -20
  275. package/src/pages/KlineNew/components/KlineAction/components/ContextMenu/index.vue +0 -91
  276. package/src/pages/KlineNew/components/KlineAction/components/YearChart/index.vue +0 -532
  277. package/src/pages/KlineNew/components/KlineAction/images/pen.png +0 -0
  278. package/src/pages/KlineNew/components/KlineAction/index.vue +0 -716
  279. package/src/pages/KlineNew/components/KlineAction/mockApi/index.js +0 -13
  280. package/src/pages/KlineNew/components/KlineAction/utils.js +0 -571
  281. package/src/pages/KlineNew/components/KlineBasic/index.vue +0 -336
  282. package/src/pages/KlineNew/components/KlineBasic/utils.js +0 -46
  283. package/src/pages/KlineNew/components/KlineNew/index.vue +0 -316
  284. package/src/pages/KlineNew/components/KlineNew/utils.js +0 -31
  285. package/src/pages/KlineNew/components/KlineSlide/index.vue +0 -448
  286. package/src/pages/KlineNew/components/KlineSlide/utils.js +0 -78
  287. package/src/pages/KlineNew/components/KlineSlideNew/index.vue +0 -430
  288. package/src/pages/KlineNew/components/KlineSlideNew/utils.js +0 -78
  289. package/src/pages/KlineNew/index.vue +0 -92
  290. package/src/pages/KlinePlus/KlineDialog/MultiCycle.vue +0 -312
  291. package/src/pages/KlinePlus/KlineDialog/api.js +0 -108
  292. package/src/pages/KlinePlus/KlineDialog/index.vue +0 -582
  293. package/src/pages/KlinePlus/KlineDialog/indicator.js +0 -109
  294. package/src/pages/KlinePlus/KlineDialog/tools.js +0 -86
  295. package/src/pages/KlinePlus/index.vue +0 -30
  296. package/src/pages/KlinePlus/tradeLogMock.js +0 -1927
  297. package/src/pages/LinearLegend/index.vue +0 -92
  298. package/src/pages/Map/index.vue +0 -62
  299. package/src/pages/MonacoEditor/index.vue +0 -63
  300. package/src/pages/Pagination/index.vue +0 -24
  301. package/src/pages/PasswordPrompt/index.vue +0 -12
  302. package/src/pages/Pie/index.vue +0 -36
  303. package/src/pages/Table/index.vue +0 -117
  304. package/src/pages/TreeMap/index.vue +0 -542
  305. package/src/pages/User/index.vue +0 -24
  306. package/src/pages/VarSelectDialog/index.vue +0 -16
  307. package/src/pages/VarietyAiHelper/index.vue +0 -20
  308. package/src/pages/VarietyAutoComplete/index.vue +0 -19
  309. package/src/pages/VarietySearch/api.js +0 -70
  310. package/src/pages/VarietySearch/index.vue +0 -467
  311. package/src/pages/VarietyTextCopy/index.vue +0 -24
  312. package/src/pages/VirtualTable/demo.json +0 -6377
  313. package/src/pages/VirtualTable/index.vue +0 -79
  314. package/src/router/index.ts +0 -9
  315. package/src/router/routes.ts +0 -132
  316. package/src/style.css +0 -79
  317. package/src/vite-env.d.ts +0 -9
  318. package/tsconfig.json +0 -30
  319. package/tsconfig.node.json +0 -10
@@ -1,839 +0,0 @@
1
- <script setup>
2
- import dayjs from "dayjs";
3
- import * as echarts from "echarts";
4
- import { onMounted, onUnmounted, ref, watch, computed, nextTick } from "vue";
5
- import { initRequestByEnv, getKlineBasic, getKline, getWarningLine, addWarningLine, updateWarningLine, deleteWarningLine } from "./api";
6
- import { addResizeListener, debounce } from "st-func";
7
- import { getMainOptions, getWarningLineOptions } from "./utils";
8
- import KlineTips from "./components/KlineTips/index.vue";
9
- import KlineSub from "./components/KlineSub/index.vue";
10
- import Contextmenu from "./components/Contextmenu/index.vue";
11
-
12
- const defaultMenuData = [{ label: "画线预警", key: "drawWarningLine" }];
13
-
14
- let resizeRo = null; // dom元素监听事件
15
- let mainChartIns = null; // 主图实例
16
- let renderFrameId = null; // 渲染帧ID
17
- let drawLineFrameId = null; // 绘线帧ID
18
- let brushFrameId = null; // 区域框选帧ID
19
-
20
- let isLoadHistory = false; // 是否正在加载历史数据
21
- let isloadAllHistory = false; // 是否加载完全部历史数据
22
-
23
- const emit = defineEmits(["change", "getFactorData"]);
24
-
25
- const props = defineProps({
26
- variety: {
27
- type: [String, Number],
28
- default: () => null,
29
- },
30
- varietyName: {
31
- type: [String, Number],
32
- default: () => null,
33
- },
34
- featureId: {
35
- type: [String, Number],
36
- default: () => null,
37
- },
38
- featureType: {
39
- type: [String, Number],
40
- default: () => null,
41
- },
42
- cycle: {
43
- type: [String, Number],
44
- default: () => null,
45
- },
46
- mainIndicator: {
47
- type: String,
48
- default: () => "",
49
- },
50
- indicatorStore: {
51
- type: Object,
52
- default: () => null,
53
- },
54
- startTime: {
55
- type: String,
56
- default: () => null,
57
- },
58
- endTime: {
59
- type: String,
60
- default: () => null,
61
- },
62
- right: {
63
- type: [String, Number],
64
- default: 1,
65
- },
66
- config: {
67
- type: Object,
68
- default: () => ({}),
69
- },
70
- env: {
71
- type: Object,
72
- default: () => ({}),
73
- },
74
- brushRange: {
75
- type: [Array, null],
76
- default: () => null,
77
- },
78
- });
79
-
80
- const isHover = ref(false);
81
- const isEmpty = ref(false);
82
- const isError = ref(false);
83
-
84
- const klineBasicMainRef = ref(null);
85
- const klineSubRef = ref(null);
86
- const subIndicator = ref("VOL");
87
- const activeIndex = ref(0);
88
-
89
- const chartData = ref({});
90
- const warningLineData = ref([]);
91
- const warningItem = ref({});
92
- const warningLineChangeVisible = ref(false);
93
- const warningLineChangeValue = ref("");
94
-
95
- const menuData = ref([...defaultMenuData]);
96
-
97
- const config = computed(() => {
98
- return {
99
- defaultShowCounts: 500,
100
- addCounts: 2000,
101
- maxShowCounts: 5000,
102
- loadCheckCounts: 500,
103
- gridTop: 48,
104
- gridLeft: 80,
105
- gridRight: 50,
106
- showSubChart: true,
107
- showWarningLine: true,
108
- getFactorData: true,
109
- ...props.config,
110
- };
111
- });
112
-
113
- // 初始化图表
114
- const initChart = () => {
115
- if (mainChartIns) return;
116
- mainChartIns = echarts.init(klineBasicMainRef.value);
117
- addEventListener();
118
- if (config.value.showSubChart) {
119
- klineSubRef.value.connect(mainChartIns);
120
- }
121
- resizeRo = addResizeListener(klineBasicMainRef.value);
122
- resizeRo.listen(() => {
123
- requestAnimationFrame(() => {
124
- mainChartIns?.resize();
125
- drawLine(); // resize后重绘预警线
126
- });
127
- });
128
- };
129
- // 隐藏loading
130
- const hideLoading = () => {
131
- if (mainChartIns && !mainChartIns.isDisposed()) {
132
- mainChartIns.hideLoading();
133
- }
134
- };
135
-
136
- // 图表渲染: 全部
137
- const scheduleRender = (keepDataZoom = false) => {
138
- // 取消正在进行的渲染
139
- if (renderFrameId) {
140
- cancelAnimationFrame(renderFrameId);
141
- renderFrameId = null;
142
- }
143
- // 第一帧:渲染主图
144
- renderFrameId = requestAnimationFrame(() => {
145
- drawMain(keepDataZoom);
146
- // 第二帧:渲染副图
147
- renderFrameId = requestAnimationFrame(() => {
148
- drawSub();
149
- // 第三帧:渲染预警线
150
- renderFrameId = requestAnimationFrame(() => {
151
- drawLine();
152
- renderFrameId = null;
153
- });
154
- });
155
- });
156
- };
157
- // 图表渲染: 主图
158
- const drawMain = (keepDataZoom = false) => {
159
- if (!mainChartIns || mainChartIns.isDisposed()) return;
160
-
161
- const { time } = chartData.value;
162
- const { defaultShowCounts } = config.value;
163
-
164
- let startValue = time.length - 1 - defaultShowCounts;
165
- let endValue = time.length - 1;
166
-
167
- // 保持缩放位置
168
- if (keepDataZoom && mainChartIns) {
169
- const originOption = mainChartIns.getOption();
170
- const originTime = originOption?.xAxis?.[0]?.data;
171
- const originDataZoom = originOption?.dataZoom?.[0];
172
-
173
- if (originTime?.length && originDataZoom) {
174
- const originStartTime = originTime[originDataZoom.startValue];
175
- const originEndTime = originTime[originDataZoom.endValue];
176
- if (originStartTime && originEndTime) {
177
- // startValue: 从前往后找第一个 >= 原始开始时间的索引
178
- const foundStartIndex = time.findIndex((item) => new Date(item).getTime() >= new Date(originStartTime).getTime());
179
- // endValue: 从后往前找最后一个 <= 原始结束时间的索引
180
- const foundEndIndex = time.findLastIndex((item) => new Date(item).getTime() <= new Date(originEndTime).getTime());
181
- // 使用找到的索引,如果没找到则使用默认值
182
- startValue = foundStartIndex !== -1 ? foundStartIndex : 0;
183
- endValue = foundEndIndex !== -1 ? foundEndIndex : time.length - 1;
184
- // 确保 startValue 不大于 endValue
185
- if (startValue > endValue) {
186
- // 如果范围异常,以结束索引为准,向前取一定数量
187
- startValue = Math.max(0, endValue - Math.min(100, time.length - 1));
188
- }
189
- }
190
- }
191
- }
192
- const options = getMainOptions(chartData.value, config.value, startValue, endValue, props.cycle);
193
-
194
- requestAnimationFrame(() => {
195
- mainChartIns?.setOption(options, true);
196
- activeIndex.value = endValue;
197
-
198
- // 下一帧绘制brush
199
- requestAnimationFrame(() => {
200
- drawBrush();
201
- });
202
- });
203
- };
204
- // 图表渲染: 副图
205
- const drawSub = () => {
206
- if (!config.value.showSubChart || !klineSubRef.value) return;
207
-
208
- const { time } = chartData.value;
209
- const { gridLeft, gridRight, maxShowCounts, defaultShowCounts } = config.value;
210
- let startValue = time.length - 1 - defaultShowCounts;
211
- let endValue = time.length - 1;
212
-
213
- // 从主图获取当前的dataZoom位置
214
- if (mainChartIns && !mainChartIns.isDisposed()) {
215
- const option = mainChartIns.getOption();
216
- if (option?.dataZoom?.[0]) {
217
- const { startValue: cacheStart, endValue: cacheEnd } = option.dataZoom[0];
218
- if (cacheStart !== undefined && cacheEnd !== undefined) {
219
- startValue = cacheStart;
220
- endValue = cacheEnd;
221
- }
222
- }
223
- }
224
-
225
- requestAnimationFrame(() => {
226
- klineSubRef.value?.draw({ startValue, endValue, maxValueSpan: maxShowCounts }, { gridLeft, gridRight });
227
- });
228
- };
229
- // 图表渲染: 预警线
230
- const drawLine = () => {
231
- if (!mainChartIns) return;
232
-
233
- // 取消正在进行的绘线
234
- if (drawLineFrameId) {
235
- cancelAnimationFrame(drawLineFrameId);
236
- drawLineFrameId = null;
237
- }
238
-
239
- drawLineFrameId = requestAnimationFrame(() => {
240
- const mainChartOption = mainChartIns?.getOption();
241
- if (!mainChartOption) return;
242
- const width = mainChartIns?.getWidth();
243
- const height = mainChartIns?.getHeight();
244
- if (!width || !height) return;
245
-
246
- mainChartIns?.setOption(
247
- {
248
- graphic: getWarningLineOptions(mainChartIns, warningLineData.value, props, config.value, () => {
249
- updateWarningLineAndDraw();
250
- }),
251
- },
252
- {
253
- notMerge: false,
254
- replaceMerge: ["graphic"],
255
- lazyUpdate: true,
256
- },
257
- );
258
- drawLineFrameId = null;
259
- });
260
- };
261
- // 图表渲染: 区域框选
262
- const drawBrush = () => {
263
- if (brushFrameId) {
264
- cancelAnimationFrame(brushFrameId);
265
- }
266
-
267
- brushFrameId = requestAnimationFrame(() => {
268
- const { time } = chartData.value;
269
- if (!props.brushRange || !time?.length || !mainChartIns) return;
270
-
271
- let startTime = dayjs(props.brushRange[0]).format("YYYY-MM-DD 00:00:00");
272
- let endTime = dayjs(props.brushRange[1]).format("YYYY-MM-DD 23:59:59");
273
- let brushStartTime = null;
274
- let brushEndTime = null;
275
-
276
- switch (String(props.cycle)) {
277
- case "6": {
278
- brushStartTime = time.find((item) => dayjs(item).format("YYYY-MM-DD") === dayjs(startTime).format("YYYY-MM-DD"));
279
- brushEndTime = brushStartTime;
280
- break;
281
- }
282
- case "7": {
283
- brushStartTime = time.find((item) => dayjs(item).day(5).format("YYYY-MM-DD") === dayjs(startTime).day(5).format("YYYY-MM-DD"));
284
- brushEndTime = time.findLast((item) => dayjs(item).day(5).format("YYYY-MM-DD") === dayjs(endTime).day(5).format("YYYY-MM-DD"));
285
- break;
286
- }
287
- case "8": {
288
- brushStartTime = time.find((item) => dayjs(item).endOf("month").format("YYYY-MM-DD") === dayjs(startTime).endOf("month").format("YYYY-MM-DD"));
289
- brushEndTime = time.findLast((item) => dayjs(item).endOf("month").format("YYYY-MM-DD") === dayjs(endTime).endOf("month").format("YYYY-MM-DD"));
290
- break;
291
- }
292
- default: {
293
- brushStartTime = time.find((item) => {
294
- const condition1 = dayjs(item).format("YYYY-MM-DD") === dayjs(startTime).format("YYYY-MM-DD");
295
- const condition2 = new Date(item).getTime() >= new Date(startTime).getTime();
296
- return condition1 && condition2;
297
- });
298
- brushEndTime = time.findLast((item) => {
299
- const condition1 = dayjs(item).format("YYYY-MM-DD") === dayjs(endTime).format("YYYY-MM-DD");
300
- const condition2 = new Date(item).getTime() <= new Date(endTime).getTime();
301
- return condition1 && condition2;
302
- });
303
- }
304
- }
305
-
306
- if (brushStartTime && brushEndTime) {
307
- mainChartIns.dispatchAction({
308
- type: "brush",
309
- areas: [
310
- {
311
- brushType: "lineX",
312
- coordRange: [brushStartTime, brushEndTime],
313
- xAxisIndex: 0,
314
- },
315
- ],
316
- });
317
- }
318
- brushFrameId = null;
319
- });
320
- };
321
-
322
- // 获取主数据
323
- const getMainData = async () => {
324
- try {
325
- if (!props.variety || !props.cycle) return;
326
-
327
- const { variety, featureId, cycle, indicatorStore, mainIndicator, right, startTime, endTime } = props;
328
- const { defaultShowCounts, addCounts, showWarningLine, getFactorData } = config.value;
329
-
330
- // 显示loading
331
- initChart();
332
-
333
- if (mainChartIns && !mainChartIns.isDisposed()) {
334
- mainChartIns.showLoading({
335
- text: "加载中...",
336
- color: "#409eff",
337
- textColor: "#fff",
338
- maskColor: "rgba(0, 0, 0, 0.7)",
339
- zlevel: 0,
340
- });
341
- }
342
-
343
- const params = {
344
- variety,
345
- featureId,
346
- cycle,
347
- mainIndicatorList: indicatorStore.getIndicatorParams(mainIndicator),
348
- subIndicator: subIndicator.value,
349
- right,
350
- showWarningLine,
351
- getFactorData,
352
- };
353
-
354
- if (startTime && endTime) {
355
- params.startTime = startTime;
356
- params.endTime = endTime;
357
- } else if (startTime) {
358
- params.startTime = startTime;
359
- params.limit = addCounts;
360
- } else if (endTime) {
361
- params.endTime = endTime;
362
- params.limit = addCounts;
363
- } else {
364
- params.endTime = dayjs().add(1, "hour").format("YYYY-MM-DD HH:mm:ss");
365
- params.limit = addCounts;
366
- }
367
-
368
- const res = await getKlineBasic(params);
369
-
370
- if (!res?.body?.kline?.time?.length) {
371
- isEmpty.value = true;
372
- isError.value = false;
373
- hideLoading();
374
- return;
375
- }
376
-
377
- isEmpty.value = false;
378
- isError.value = false;
379
- chartData.value = res?.body?.kline;
380
- warningLineData.value = res?.body?.warningLine || [];
381
-
382
- // 使用RAF链式渲染
383
- await nextTick();
384
- scheduleRender(false);
385
-
386
- if (getFactorData) {
387
- emit("getFactorData", res?.body?.factor);
388
- }
389
-
390
- hideLoading();
391
- } catch (err) {
392
- hideLoading();
393
- isError.value = true;
394
- isEmpty.value = false;
395
- throw new Error(err);
396
- }
397
- };
398
- // 加载历史数据
399
- const getMoreData = async (type) => {
400
- const { variety, cycle, indicatorStore, mainIndicator, right } = props;
401
- const { addCounts } = config.value;
402
- const { time } = chartData.value;
403
-
404
- if (type === "history") {
405
- const res = await getKline({
406
- variety,
407
- cycle,
408
- endTime: time[0],
409
- limit: addCounts,
410
- mainIndicatorList: indicatorStore.getIndicatorParams(mainIndicator),
411
- subIndicator: subIndicator.value,
412
- right,
413
- });
414
- // 合并数据
415
- chartData.value = {
416
- time: [...res.body.time, ...chartData.value.time.slice(1)],
417
- data: [...res.body.data, ...chartData.value.data.slice(1)],
418
- mainIndicator: chartData.value.mainIndicator.map((item, index) => ({
419
- ...item,
420
- data: [...(res.body.mainIndicator[index]?.data ?? []), ...item.data.slice(1)],
421
- })),
422
- subIndicator: chartData.value.subIndicator.map((item, index) => ({
423
- ...item,
424
- data: [...(res.body.subIndicator[index]?.data ?? []), ...item.data.slice(1)],
425
- })),
426
- };
427
- console.log("触发了加载更多数据");
428
- // 使用RAF链式渲染,保持当前缩放位置
429
- await nextTick();
430
- scheduleRender(true);
431
- if (res.body.data.length < addCounts) {
432
- isloadAllHistory = true;
433
- console.log("历史数据已经全部加载完毕");
434
- }
435
- isLoadHistory = false;
436
- }
437
- };
438
- // 键盘事件
439
- const handleKeyDownEvent = ({ code, ctrlKey }) => {
440
- if (!(ctrlKey || isHover.value)) return;
441
- const { xAxis, dataZoom } = mainChartIns.getOption();
442
- const { data: xAxisData } = xAxis?.[0] ?? { data: [] };
443
- let { startValue, endValue } = dataZoom?.[0] ?? {};
444
- if (!xAxisData?.length) return;
445
-
446
- switch (code) {
447
- case "ArrowUp": {
448
- if (endValue - startValue < 5) return;
449
- const diff = Math.floor((endValue - startValue) / 2) + 1;
450
- startValue = startValue + diff;
451
- if (endValue - startValue < 5) startValue = endValue - 4;
452
- break;
453
- }
454
- case "ArrowDown": {
455
- const diff = Math.min(500, endValue - startValue);
456
- startValue = startValue - diff - 1;
457
- break;
458
- }
459
- case "ArrowLeft": {
460
- if (startValue > 0) {
461
- startValue -= 1;
462
- endValue -= 1;
463
- }
464
- if (activeIndex.value > 0) {
465
- activeIndex.value -= 1;
466
- }
467
- break;
468
- }
469
- case "ArrowRight": {
470
- if (endValue < xAxisData.length - 1) {
471
- startValue += 1;
472
- endValue += 1;
473
- }
474
- if (isHover.value && activeIndex.value < xAxisData.length - 1) {
475
- activeIndex.value += 1;
476
- }
477
- break;
478
- }
479
- }
480
-
481
- requestAnimationFrame(() => {
482
- mainChartIns.dispatchAction({ type: "dataZoom", startValue, endValue });
483
- mainChartIns.dispatchAction({
484
- type: "updateAxisPointer",
485
- seriesIndex: 0,
486
- dataIndex: isHover.value ? activeIndex.value : null,
487
- });
488
- mainChartIns.dispatchAction({
489
- type: "highlight",
490
- dataIndex: isHover.value ? activeIndex.value : endValue,
491
- });
492
- });
493
- };
494
- // 图表事件
495
- const addEventListener = () => {
496
- mainChartIns?.on(
497
- "datazoom",
498
- debounce((params) => {
499
- const { loadCheckCounts } = config.value;
500
- if (mainChartIns?.getOption()?.dataZoom?.[0]) {
501
- const { startValue } = mainChartIns?.getOption()?.dataZoom?.[0];
502
- if (startValue < loadCheckCounts && !isLoadHistory && !isloadAllHistory) {
503
- isLoadHistory = true;
504
- getMoreData("history");
505
- }
506
- drawLine(); // 使用RAF优化的绘线
507
- }
508
- }, 100),
509
- );
510
-
511
- mainChartIns?.on(
512
- "highlight",
513
- debounce((data) => {
514
- let index = data.dataIndex || -1;
515
- if (data.batch) {
516
- index = typeof data?.batch[0]?.dataIndex === "number" ? data?.batch[0]?.dataIndex : -1;
517
- }
518
- activeIndex.value = index;
519
- }, 20),
520
- );
521
-
522
- mainChartIns?.on(
523
- "globalout",
524
- debounce(() => {
525
- if (mainChartIns) {
526
- const index = mainChartIns?.getOption()?.dataZoom?.[0]?.endValue;
527
- activeIndex.value = index;
528
- }
529
- }, 30),
530
- );
531
-
532
- mainChartIns?.on(
533
- "contextmenu",
534
- debounce((params) => {
535
- if (params.componentType === "graphic") {
536
- warningItem.value = params.info;
537
- menuData.value = [
538
- { label: "删除画线", key: "deleteWarningLine" },
539
- { label: "修改画线", key: "changeWarningLine" },
540
- ];
541
- }
542
- }, 0),
543
- );
544
- };
545
-
546
- // 预警线相关辅助函数
547
- const updateWarningLineAndDraw = async () => {
548
- const res = await getWarningLine({ featureId: props.featureId });
549
- warningLineData.value = res?.body || [];
550
- drawLine();
551
- emit("change", "warningLine", warningLineData.value);
552
- };
553
- const menuClick = async (item) => {
554
- const { variety, varietyName, featureId, featureType } = props;
555
-
556
- if (item.key === "drawWarningLine") {
557
- const mainChartOption = mainChartIns?.getOption();
558
- const oldTooltip = mainChartOption.tooltip[0];
559
-
560
- mainChartIns?.setOption({
561
- ...mainChartOption,
562
- tooltip: {
563
- ...oldTooltip,
564
- axisPointer: {
565
- ...oldTooltip.axisPointer,
566
- lineStyle: { width: 0 },
567
- crossStyle: { width: 2 },
568
- label: {
569
- ...oldTooltip.axisPointer.label,
570
- backgroundColor: "transparent",
571
- formatter: () => "",
572
- },
573
- },
574
- },
575
- });
576
-
577
- const handleClick = async (el) => {
578
- mainChartIns?.getZr().off("mousedown", handleClick);
579
- const yAxisValue = mainChartIns?.convertFromPixel({ yAxisIndex: 0 }, el.offsetY);
580
- const newWarnPrice = Math.round(yAxisValue * 1000) / 1000;
581
-
582
- mainChartIns?.setOption({
583
- ...mainChartOption,
584
- tooltip: {
585
- ...oldTooltip,
586
- axisPointer: {
587
- ...oldTooltip.axisPointer,
588
- lineStyle: { width: 1 },
589
- crossStyle: { width: 1 },
590
- label: {
591
- ...oldTooltip.axisPointer.label,
592
- backgroundColor: null,
593
- },
594
- },
595
- },
596
- });
597
-
598
- await addWarningLine({
599
- featureCode: variety,
600
- featureName: varietyName,
601
- featureId,
602
- featureType,
603
- warnPrice: newWarnPrice,
604
- });
605
- ElMessage.success("画线预警成功!");
606
- updateWarningLineAndDraw();
607
- };
608
-
609
- mainChartIns?.getZr().on("mousedown", handleClick);
610
- } else if (item.key === "deleteWarningLine") {
611
- await deleteWarningLine({ id: warningItem.value.id });
612
- ElMessage.success("画线预警删除成功");
613
- updateWarningLineAndDraw();
614
- } else if (item.key === "changeWarningLine") {
615
- warningLineChangeVisible.value = true;
616
- warningLineChangeValue.value = warningItem.value.warnPrice;
617
- }
618
- };
619
- const changeWarningLine = async () => {
620
- const { variety, varietyName, featureId, featureType } = props;
621
- await updateWarningLine({
622
- id: warningItem.value.id,
623
- featureCode: variety,
624
- featureName: varietyName,
625
- featureId,
626
- featureType,
627
- warnPrice: warningLineChangeValue.value,
628
- });
629
- ElMessage.success("画线预警修改成功");
630
- updateWarningLineAndDraw();
631
- };
632
- const closeContextMenuCallBack = () => {
633
- menuData.value = [...defaultMenuData];
634
- };
635
-
636
- onMounted(() => {
637
- initRequestByEnv(props.env);
638
- getMainData();
639
- window.addEventListener("keydown", handleKeyDownEvent);
640
- });
641
- watch(
642
- () => [props.variety, props.cycle, props.mainIndicator, subIndicator.value, props.indicatorStore?.filterIndicator, props.indicatorStore?.customIndicator],
643
- () => {
644
- // 重置加载状态
645
- isLoadHistory = false;
646
- isloadAllHistory = false;
647
- getMainData();
648
- },
649
- { deep: true },
650
- );
651
- onUnmounted(() => {
652
- // 取消所有动画帧
653
- if (renderFrameId) {
654
- cancelAnimationFrame(renderFrameId);
655
- renderFrameId = null;
656
- }
657
- if (drawLineFrameId) {
658
- cancelAnimationFrame(drawLineFrameId);
659
- drawLineFrameId = null;
660
- }
661
- mainChartIns?.off("datazoom");
662
- mainChartIns?.off("highlight");
663
- mainChartIns?.off("globalout");
664
- mainChartIns?.dispose();
665
- resizeRo?.dispose();
666
- window.removeEventListener("keydown", handleKeyDownEvent);
667
- });
668
- defineExpose({
669
- draw: (type, data) => {
670
- if (type === "warningLine") {
671
- warningLineData.value = data;
672
- drawLine();
673
- }
674
- },
675
- });
676
- </script>
677
-
678
- <template>
679
- <div
680
- class="klineBasic"
681
- @mousemove="isHover = true"
682
- @mouseout="isHover = false"
683
- >
684
- <div
685
- v-if="chartData.time?.length"
686
- class="klineBasic-tips"
687
- >
688
- <KlineTips
689
- :variety="variety"
690
- :data="chartData"
691
- :activeIndex="activeIndex"
692
- />
693
- </div>
694
- <div
695
- class="klineBasic-main"
696
- :style="{ height: config.showSubChart ? '70%' : '100%' }"
697
- >
698
- <Contextmenu @closeContextMenuCallBack="closeContextMenuCallBack">
699
- <div
700
- ref="klineBasicMainRef"
701
- style="height: 100%"
702
- ></div>
703
- <template #popover>
704
- <el-menu
705
- :style="{
706
- borderRadius: '4px',
707
- overflow: 'hidden',
708
- background: '#fff',
709
- borderRight: 0,
710
- }"
711
- >
712
- <el-menu-item
713
- v-for="item in menuData"
714
- style="height: 36px"
715
- :key="item.key"
716
- :index="item.key"
717
- @click="menuClick(item)"
718
- >
719
- {{ item.label }}
720
- </el-menu-item>
721
- </el-menu>
722
- </template>
723
- </Contextmenu>
724
- </div>
725
- <div
726
- class="klineBasic-sub"
727
- v-if="config.showSubChart"
728
- >
729
- <KlineSub
730
- ref="klineSubRef"
731
- v-model="subIndicator"
732
- :data="chartData"
733
- :cycle="cycle"
734
- :activeIndex="activeIndex"
735
- :subIndicatorList="indicatorStore?.subIndicatorList"
736
- />
737
- </div>
738
- <div
739
- class="klineBasic-empty"
740
- v-if="isEmpty"
741
- >
742
- <el-empty
743
- class="klineBasic-empty-content"
744
- description="暂无数据"
745
- />
746
- </div>
747
- <div
748
- class="klineBasic-error"
749
- v-if="isError"
750
- >
751
- <div class="klineBasic-error-content">加载失败,请刷新重试</div>
752
- <div style="text-align: center">
753
- <el-button @click="getMainData">刷新</el-button>
754
- </div>
755
- </div>
756
- </div>
757
- <!-- 画线预警-修改价格弹窗 -->
758
- <el-dialog
759
- v-model="warningLineChangeVisible"
760
- title="画线预警-修改价格"
761
- width="30%"
762
- align-center
763
- >
764
- <span style="margin-right: 10px">预警价格:</span>
765
- <el-input-number
766
- v-model="warningLineChangeValue"
767
- placeholder="输入预警价格"
768
- />
769
- <template #footer>
770
- <span class="dialog-footer">
771
- <el-button @click="warningLineChangeVisible = false">取消</el-button>
772
- <el-button
773
- type="primary"
774
- @click="changeWarningLine"
775
- >确定</el-button
776
- >
777
- </span>
778
- </template>
779
- </el-dialog>
780
- </template>
781
-
782
- <style lang="scss" scoped>
783
- .klineBasic {
784
- width: 100%;
785
- height: 100%;
786
- position: relative;
787
- background: #000;
788
- &-tips {
789
- position: absolute;
790
- width: 100%;
791
- top: 0;
792
- }
793
- &-main {
794
- width: 100%;
795
- height: 70%;
796
- }
797
- &-sub {
798
- width: 100%;
799
- height: 30%;
800
- }
801
- &-empty {
802
- position: absolute;
803
- top: 0;
804
- width: 100%;
805
- height: 100%;
806
- background: #000;
807
- &-content {
808
- height: 100%;
809
- padding: 0;
810
- --el-empty-fill-color-0: var(--el-color-black);
811
- --el-empty-fill-color-1: #4b4b52;
812
- --el-empty-fill-color-2: #36383d;
813
- --el-empty-fill-color-3: #1e1e20;
814
- --el-empty-fill-color-4: #262629;
815
- --el-empty-fill-color-5: #202124;
816
- --el-empty-fill-color-6: #212224;
817
- --el-empty-fill-color-7: #1b1c1f;
818
- --el-empty-fill-color-8: #1c1d1f;
819
- --el-empty-fill-color-9: #18181a;
820
- }
821
- }
822
- &-error {
823
- position: absolute;
824
- top: 0;
825
- width: 100%;
826
- height: 100%;
827
- background: #000;
828
- display: flex;
829
- flex-direction: column;
830
- justify-content: center;
831
- &-content {
832
- color: #fff;
833
- font-size: 20px;
834
- text-align: center;
835
- margin-bottom: 12px;
836
- }
837
- }
838
- }
839
- </style>