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,136 +0,0 @@
1
- <script setup>
2
- import { ref, computed, inject } from "vue";
3
- import { InfoFilled } from "@element-plus/icons-vue";
4
-
5
- const stConfig = inject("stConfig");
6
- const props = defineProps({
7
- required: { type: Boolean, default: true },
8
- });
9
-
10
- const textValue = ref("");
11
- const extractedCount = computed(() => {
12
- return extractCodesFromString(textValue.value).length;
13
- });
14
-
15
- // 从字符串中提取品种code
16
- const extractCodesFromString = (str) => {
17
- if (!str) return [];
18
- return str.split("\n").reduce((result, next) => {
19
- const code = next.trim().replace(/\s+/gi, " ").split(" ")[0];
20
- code && result.push(code);
21
- return result;
22
- }, []);
23
- };
24
-
25
- // 校验并返回格式化后的品种数据
26
- const validate = (callback) => {
27
- return new Promise(async (resolve, reject) => {
28
- try {
29
- // 必填校验
30
- if (props.required && (!textValue.value || textValue.value.trim() === "")) {
31
- ElMessage.error("品种内容不可为空");
32
- return callback(false);
33
- }
34
- // 解析并提取品种code, 提交给接口进行数据库分析出有效的品种
35
- const { body } = await stConfig.request.post("/invest/analysis/strategy/verifyCodes", { codes: extractCodesFromString(textValue.value) });
36
- return callback(true, body);
37
- } catch (error) {
38
- return reject(error);
39
- }
40
- });
41
- };
42
- defineExpose({ validate });
43
- </script>
44
-
45
- <template>
46
- <div class="variety-text-copy">
47
- <!-- 统计容器 -->
48
- <div class="stats-container">
49
- <div class="stat-item">
50
- <span class="label">品种数量统计:</span>
51
- <span class="value">{{ extractedCount }}</span>
52
- <el-tooltip
53
- class="box-item"
54
- effect="dark"
55
- placement="right"
56
- >
57
- <template #content> 仅统计符合输入格式的数量, 输入格式示例(代码和名称需空格隔开, 名称可不写):<br />hc8888 热轧卷板期货指数 <br />sp8888 纸浆期货指数</template>
58
- <el-icon><InfoFilled /></el-icon>
59
- </el-tooltip>
60
- </div>
61
- </div>
62
- <!-- 文本域 -->
63
- <el-input
64
- class="textarea"
65
- v-model="textValue"
66
- resize="none"
67
- type="textarea"
68
- :placeholder="`文本格式要求示例:\nhc8888\xa0\xa0热轧卷板期货指数\nsp8888\xa0\xa0纸浆期货指数\nbu8888\xa0\xa0石油沥青期货指数`"
69
- />
70
- </div>
71
- </template>
72
-
73
- <style lang="scss" scoped>
74
- .variety-text-copy {
75
- width: 100%;
76
- height: 100%;
77
- box-sizing: border-box;
78
- display: flex;
79
- flex-direction: column;
80
- .textarea {
81
- flex: 1;
82
- :deep(.el-textarea__inner) {
83
- width: 100%;
84
- height: 100%;
85
- box-sizing: border-box;
86
- padding-bottom: 20px;
87
- /* 自定义滚动条样式 */
88
- &::-webkit-scrollbar {
89
- width: 8px;
90
- }
91
-
92
- &::-webkit-scrollbar-track {
93
- background: #f1f1f1;
94
- border-radius: 4px;
95
- }
96
-
97
- &::-webkit-scrollbar-thumb {
98
- background: #c1c1c1;
99
- border-radius: 4px;
100
- }
101
-
102
- &::-webkit-scrollbar-thumb:hover {
103
- background: #a8a8a8;
104
- }
105
- }
106
- }
107
- .stats-container {
108
- display: flex;
109
- align-items: center;
110
- gap: 20px;
111
- padding: 8px 0;
112
- .stat-item {
113
- display: flex;
114
- align-items: center;
115
- gap: 6px;
116
- font-size: 14px;
117
-
118
- .label {
119
- color: var(--el-color-info);
120
- font-weight: 500;
121
- }
122
-
123
- .value {
124
- color: #409eff;
125
- font-weight: 600;
126
- min-width: 20px;
127
- text-align: center;
128
- background: #f0f7ff;
129
- padding: 2px 8px;
130
- border-radius: 4px;
131
- border: 1px solid #d9ecff;
132
- }
133
- }
134
- }
135
- }
136
- </style>
@@ -1,8 +0,0 @@
1
- import { App } from "vue";
2
- import StVirtualTable from "./index.vue";
3
-
4
- export default {
5
- install(app: App) {
6
- app.component("st-virtualTable", StVirtualTable);
7
- },
8
- }
@@ -1,241 +0,0 @@
1
- <!--
2
- @description: 虚拟化表格组件
3
- @功能点
4
- 1. 虚拟化表格, 极大提升渲染速(以10000条简单基础数据一次性渲染为例, 普通表格耗时5.2s, 虚拟表格耗时0.001s)
5
- 2. 支持数据加载状态的底部显示
6
- 3. 支持自定义N行选中数据功能, 并提供框选高亮样式, 以及数据抛出
7
- 3. 支持pageUp, pageDown切换行选中数据, 并进行自动滚动
8
- -->
9
- <script lang="jsx" setup>
10
- import { ref, watch, computed, onMounted, onUnmounted, nextTick } from "vue";
11
-
12
- const emit = defineEmits(["touchBottom"]);
13
- const props = defineProps({
14
- tableData: { type: Array, default: [] },
15
- tableColumn: { type: Array, default: [] },
16
- tableLoading: { type: [String, null], default: null }, // more(加载更多), all(已无更多数据)
17
- config: { type: Object },
18
- });
19
- const config = computed(() => {
20
- return {
21
- // 表格头高度 支持: Number/Array<Number>
22
- headerHeight: 50,
23
- // 行高度
24
- rowHeight: 50,
25
- // 选中行相关功能参数
26
- tableActiveNum: 9, // 选中行数
27
- tableActiveKey: "id", // 选中行唯一Key
28
- pageUpDownEnabled: true, // 是否开启键盘pageUp, pageDown切换选中功能
29
- ...props.config,
30
- };
31
- });
32
-
33
- // 表格: 实例
34
- const tableRef = ref(null);
35
- // 表格: 页脚高度
36
- const footerHeight = ref(0);
37
- // 表格: 滚动相关
38
- let scrollLeft = 0;
39
- let scrollToTargetFlag = false;
40
- let scrollToTargetTimer = null;
41
-
42
- // 已选中: 数据
43
- const tableActiveData = defineModel("tableActiveData", { default: () => [] });
44
- // 已选中: 数据key组(计算属性缓存, 主要避免tableRowClass多次运算, 减少性能开销)
45
- const tableActiveDataKeys = computed(() => tableActiveData.value.map((item) => item[config.value.tableActiveKey]));
46
-
47
- // 切换选中行(点击表格行)
48
- const tableRowClick = ({ rowData, rowIndex }) => {
49
- const { tableActiveNum, tableActiveKey } = config.value;
50
- // 屏蔽已选中数据行的重复点击
51
- if (tableActiveDataKeys.value.includes(rowData[tableActiveKey])) return;
52
- // 新选中的开始, 数据索引
53
- const new_startIndex = Math.floor(rowIndex / tableActiveNum) * tableActiveNum;
54
- const new_endIndex = new_startIndex + tableActiveNum;
55
- tableActiveData.value = props.tableData.slice(new_startIndex, new_endIndex);
56
- };
57
- // 切换选中行(pageUp, pageDown)
58
- const handlePageUpDown = ({ code }) => {
59
- const { tableData } = props;
60
- const { tableActiveNum, tableActiveKey, pageUpDownEnabled } = config.value;
61
- if (!tableData.length || !pageUpDownEnabled) return;
62
- // 1. 基础参数(当前选中-开始, 结束索引)
63
- const now_startIndex = tableData.findIndex((rowData) => rowData[tableActiveKey] === tableActiveDataKeys.value.at(0));
64
- const now_endIndex = tableData.findIndex((rowData) => rowData[tableActiveKey] === tableActiveDataKeys.value.at(-1));
65
- // 2. 基础参数(新的选中-开始索引)
66
- let new_startIndex = null;
67
- let new_endIndex = null;
68
- // 3. 切换选中数据
69
- switch (code) {
70
- case "PageUp":
71
- if (now_startIndex === 0) return;
72
- new_startIndex = now_startIndex - tableActiveNum > 0 ? now_startIndex - tableActiveNum : 0;
73
- new_endIndex = new_startIndex + tableActiveNum - 1;
74
- tableActiveData.value = tableData.slice(new_startIndex, new_endIndex + 1);
75
- // 向上滚动 (以开始索引位置为准)
76
- scrollToTarget(new_startIndex, "PageUp");
77
- break;
78
- case "PageDown":
79
- if (now_endIndex === tableData.length - 1) return;
80
- new_startIndex = now_startIndex + tableActiveNum;
81
- new_endIndex = new_startIndex + tableActiveNum - 1;
82
- tableActiveData.value = tableData.slice(new_startIndex, new_endIndex + 1);
83
- // 向下滚动 (以结束索引位置为准)
84
- scrollToTarget(new_endIndex, "PageDown");
85
- break;
86
- }
87
- };
88
-
89
- // 表格滚动(滚轮)
90
- const handleScroll = (params) => {
91
- if (!scrollToTargetFlag) {
92
- // 仅仅当Y轴进行偏移时, 才会进行如下操作
93
- if (scrollLeft === params.scrollLeft && params.yAxisScrollDir === "backward") {
94
- footerHeight.value = 0;
95
- }
96
- // 记录X轴偏移量
97
- scrollLeft = params.scrollLeft;
98
- }
99
- };
100
- // 表格滚动(指定) + 触底判断回调
101
- const scrollToTarget = (rowIndex, code) => {
102
- if (rowIndex === null) return;
103
- clearTimeout(scrollToTargetTimer);
104
- scrollToTargetFlag = true;
105
- if (code === "PageUp") {
106
- footerHeight.value = 0;
107
- } else if (rowIndex >= props.tableData.length - 1) {
108
- footerHeight.value = 30;
109
- emit("touchBottom");
110
- }
111
- nextTick(() => {
112
- tableRef.value.scrollToRow(rowIndex);
113
- tableRef.value.scrollToLeft(scrollLeft);
114
- scrollToTargetTimer = setTimeout(() => {
115
- scrollToTargetFlag = false;
116
- }, 500);
117
- });
118
- };
119
-
120
- // 表格行: 样式
121
- const tableRowClass = ({ rowData }) => {
122
- if (!tableActiveData.value.length) return;
123
- let className = "";
124
- const { tableActiveKey } = config.value;
125
- // 1.已选中数据: 第一条 => 增加上边框高亮样式
126
- if (rowData[tableActiveKey] === tableActiveDataKeys.value[0]) {
127
- className += " virtual-table-active-start";
128
- }
129
- // 2.已选中数据: 左右两边均增加高亮样式
130
- if (tableActiveDataKeys.value.includes(rowData[tableActiveKey])) {
131
- className += " virtual-table-active-row";
132
- }
133
- // 3.已选中数据: 最后一条 => 增加下边框高亮样式
134
- if (rowData[tableActiveKey] === tableActiveDataKeys.value[tableActiveDataKeys.value.length - 1]) {
135
- className += " virtual-table-active-end";
136
- }
137
- return className;
138
- };
139
-
140
- onMounted(() => {
141
- window.addEventListener("keydown", handlePageUpDown);
142
- });
143
- watch(
144
- () => props.tableLoading,
145
- (newValue) => {
146
- if (!newValue) footerHeight.value = 0;
147
- }
148
- );
149
- onUnmounted(() => {
150
- window.removeEventListener("keydown", handlePageUpDown);
151
- });
152
- </script>
153
-
154
- <template>
155
- <el-auto-resizer>
156
- <template #default="{ height, width }">
157
- <el-table-v2
158
- ref="tableRef"
159
- id="virtualTable"
160
- fixed
161
- :data="tableData"
162
- :columns="tableColumn"
163
- :width="width"
164
- :height="height"
165
- :header-height="config.headerHeight"
166
- :row-height="config.rowHeight"
167
- :row-class="tableRowClass"
168
- :row-event-handlers="{ onClick: tableRowClick }"
169
- :footer-height="footerHeight"
170
- scrollbar-always-on
171
- @scroll="handleScroll"
172
- @end-reached="scrollToTarget(tableData.length - 1, 'PageDown')"
173
- >
174
- <!-- 空数据状态 -->
175
- <template #empty>
176
- <el-empty
177
- description="暂无数据"
178
- style="height: 100%"
179
- />
180
- </template>
181
- <!-- 底部状态 -->
182
- <template #footer>
183
- <div
184
- v-if="footerHeight"
185
- class="footer-box"
186
- >
187
- <el-divider v-if="tableLoading === 'more'">
188
- <el-button
189
- type="primary"
190
- text
191
- loading
192
- >正在加载更多数据</el-button
193
- >
194
- </el-divider>
195
- <el-divider v-else-if="tableLoading === 'all'"> 已无更多数据 </el-divider>
196
- </div>
197
- </template>
198
- </el-table-v2>
199
- </template>
200
- </el-auto-resizer>
201
- </template>
202
-
203
- <style lang="scss" scoped>
204
- #virtualTable {
205
- // 表格行边框默认样式, 避免激活行样式切换发生抖动
206
- :deep(.el-table-v2__row) {
207
- border: 1px solid transparent;
208
- }
209
- // 激活行样式
210
- :deep(.el-table-v2__row.virtual-table-active-start) {
211
- border-top: 1px solid var(--el-color-primary);
212
- }
213
- :deep(.el-table-v2__row.virtual-table-active-row) {
214
- border-left: 1px solid var(--el-color-primary);
215
- border-right: 1px solid var(--el-color-primary);
216
- }
217
- :deep(.el-table-v2__row.virtual-table-active-end) {
218
- border-bottom: 1px solid var(--el-color-primary);
219
- }
220
- :deep(.el-table-v2__left) {
221
- .el-table-v2__row.virtual-table-active-row {
222
- border-right: none;
223
- }
224
- }
225
- // 表格空状态
226
- :deep(.el-table-v2__empty) {
227
- height: calc(100% - 50px);
228
- }
229
- // 页脚
230
- .footer-box {
231
- width: 100%;
232
- height: 100%;
233
- display: flex;
234
- align-items: center;
235
- justify-content: center;
236
- .el-divider {
237
- margin: 0;
238
- }
239
- }
240
- }
241
- </style>
package/packages/index.ts DELETED
@@ -1,59 +0,0 @@
1
- import { App } from "vue"
2
- import StChartLayout from "./ChartLayout/index.ts"
3
- import StConfigProvider from "./ConfigProvider/index.ts"
4
- import StContextmenu from "./Contextmenu/index.ts"
5
- import StCustomFunction from "./CustomFunction/index.ts"
6
- import StFactorWarning from "./FactorWarning/index.ts"
7
- import StHeatMap from "./HeatMap/index.ts"
8
- import StKline from "./Kline/index.ts"
9
- import StKlineBasic from "./KlineBasic/index.ts"
10
- import StKlineConfig from "./KlineConfig/index.ts"
11
- import StKlineNew from "./KlineNew/index.ts"
12
- import StKlinePlus from "./KlinePlus/index.ts"
13
- import StLinearLegend from "./LinearLegend/index.ts"
14
- import StMap from "./Map/index.ts"
15
- import StMonacoEditor from "./MonacoEditor/index.ts"
16
- import StPagination from "./Pagination/index.ts"
17
- import StPasswordPrompt from "./PasswordPrompt/index.ts"
18
- import StPie from "./Pie/index.ts"
19
- import StTable from "./Table/index.ts"
20
- import StTreeMap from "./TreeMap/index.ts"
21
- import StUser from "./User/index.ts"
22
- import StVarietyAiHelper from "./VarietyAiHelper/index.ts"
23
- import StVarietyAutoComplete from "./VarietyAutoComplete/index.ts"
24
- import StVarietySearch from "./VarietySearch/index.ts"
25
- import StVarietyTextCopy from "./VarietyTextCopy/index.ts"
26
- import StVarSelectDialog from "./VarSelectDialog/index.ts"
27
- import StVirtualTable from "./VirtualTable/index.ts"
28
-
29
- export default {
30
- install(app: App) {
31
- StChartLayout.install(app)
32
- StConfigProvider.install(app)
33
- StContextmenu.install(app)
34
- StCustomFunction.install(app)
35
- StFactorWarning.install(app)
36
- StHeatMap.install(app)
37
- StKline.install(app)
38
- StKlineBasic.install(app)
39
- StKlineConfig.install(app)
40
- StKlineNew.install(app)
41
- StKlinePlus.install(app)
42
- StLinearLegend.install(app)
43
- StMap.install(app)
44
- StMonacoEditor.install(app)
45
- StPagination.install(app)
46
- StPasswordPrompt.install(app)
47
- StPie.install(app)
48
- StTable.install(app)
49
- StTreeMap.install(app)
50
- StUser.install(app)
51
- StVarietyAiHelper.install(app)
52
- StVarietyAutoComplete.install(app)
53
- StVarietySearch.install(app)
54
- StVarietyTextCopy.install(app)
55
- StVarSelectDialog.install(app)
56
- StVirtualTable.install(app)
57
- },
58
- }
59
-
package/public/aiTools.js DELETED
@@ -1,176 +0,0 @@
1
- /**
2
- * @description: 通用 SSE 流式请求
3
- * @param {Object} params
4
- * @param {string} params.baseUrl - 服务地址
5
- * @param {string} params.path - 接口路径
6
- * @param {string} params.token - 认证token
7
- * @param {string} params.value - 查询内容
8
- * @param {string} params.origin - 来源标识,默认 "web"
9
- * @param {Function} params.getSSE - 回调函数 (type, str) => void
10
- * type: "finish" || "error" || "message"
11
- */
12
- const sendToNodeSSE = async ({ baseUrl, path, token, value, sessionId, origin = "web", getSSE }) => {
13
- try {
14
- // 创建请求
15
- const response = await fetch(`${baseUrl}${path}`, {
16
- method: "POST",
17
- headers: {
18
- "Content-Type": "application/json",
19
- token,
20
- },
21
- body: JSON.stringify({
22
- query: value,
23
- origin,
24
- sessionId,
25
- stream: true,
26
- }),
27
- });
28
- if (!response.ok) {
29
- getSSE("error", `HTTP ${response.status}: ${response.statusText}`);
30
- return;
31
- }
32
-
33
- // 创建reader读取器和decoder解码器
34
- const reader = response.body.getReader();
35
- const decoder = new TextDecoder();
36
-
37
- // 缓冲区数据
38
- let buffer = "";
39
- let newlineIndex;
40
-
41
- while (true) {
42
- const { done, value } = await reader.read();
43
- // 判断SSE是否传输结束
44
- if (done) {
45
- getSSE("finish");
46
- break;
47
- }
48
- // 缓冲区填入数据
49
- buffer += decoder.decode(value, { stream: true });
50
- let newlineIndex;
51
- // 从缓冲区中逐条提取完整的消息行
52
- while ((newlineIndex = buffer.indexOf("\n")) !== -1) {
53
- // 提取一行
54
- const line = buffer.substring(0, newlineIndex).trim();
55
- // 移除已提取的部分
56
- buffer = buffer.substring(newlineIndex + 1);
57
- if (line.startsWith("data: ")) {
58
- // 切割掉前面的data: , 总计6个字符, 并且去除空格
59
- const dataStr = line.substring(6).trim();
60
- // 过滤空数据, 和结束标记
61
- if (!dataStr || dataStr === "[DONE]") continue;
62
- getSSE("message", dataStr);
63
- }
64
- }
65
- }
66
- } catch (error) {
67
- console.error("SSE请求失败:", error);
68
- getSSE("error", error.message || "sendToNodeSSE检测到异常");
69
- }
70
- };
71
-
72
- // 品种池AI查询助手
73
- export const sendToNodeVarietyAiHelper = async ({ baseUrl, token, value, sessionId, callback }) => {
74
- // 工作流节点
75
- const nodeMap = {};
76
- const params = {
77
- baseUrl,
78
- path: "/middleLayer/ai/varietyAiHelper",
79
- token,
80
- value,
81
- sessionId,
82
- origin: "web",
83
- getSSE: (type, str) => {
84
- switch (type) {
85
- case "message": {
86
- try {
87
- const data = JSON.parse(str);
88
- // 会话Id
89
- if (data.type === "session") {
90
- callback("session", data.sessionId);
91
- }
92
- // 历史消息
93
- if (data.type === "historyList") {
94
- callback("historyList", data.historyList);
95
- }
96
- // 一句话概括用户查询内容
97
- if (data.type === "fullQuery") {
98
- callback("fullQuery", data.fullQuery);
99
- }
100
- // 节点状态
101
- if (data.node_name && data.node_status) {
102
- const nodeName = data.node_name;
103
- const nodeStatus = data.node_status === "success" ? "success" : "executing";
104
- // 节点状态发生改变, 推送节点状态变更
105
- if (nodeMap[nodeName] !== nodeStatus) {
106
- nodeMap[nodeName] = nodeStatus;
107
- callback("node", {
108
- name: nodeName,
109
- status: nodeStatus,
110
- });
111
- }
112
- }
113
- // 结果输出
114
- if (data.output?.finish_reason === "stop" && data.output?.text) {
115
- callback("message", data.output.text);
116
- }
117
- // 错误处理
118
- if (data.error) {
119
- callback("error", data.error);
120
- }
121
- } catch (error) {
122
- // 忽略非序列化消息
123
- }
124
- break;
125
- }
126
- case "finish": {
127
- callback("finish");
128
- break;
129
- }
130
- case "error": {
131
- callback("error", str);
132
- break;
133
- }
134
- }
135
- },
136
- };
137
- return sendToNodeSSE(params);
138
- };
139
-
140
- // 因子脚本测试助手
141
- export const sendToNodeFactorAiTest = async ({ baseUrl, token, value, callback }) => {
142
- const params = {
143
- baseUrl,
144
- path: "/middleLayer/ai/factorAiTest",
145
- token,
146
- value,
147
- origin: "web",
148
- getSSE: (type, str) => {
149
- switch (type) {
150
- case "message": {
151
- try {
152
- const data = JSON.parse(str);
153
- // 结果输出
154
- if (data.output) {
155
- callback("message", data.output?.content);
156
- }
157
- // 错误处理
158
- if (data.error) {
159
- callback("error", data.error);
160
- }
161
- } catch (error) {}
162
- break;
163
- }
164
- case "finish": {
165
- callback("finish");
166
- break;
167
- }
168
- case "error": {
169
- callback("error", str);
170
- break;
171
- }
172
- }
173
- },
174
- };
175
- return sendToNodeSSE(params);
176
- };
package/public/talib.wasm DELETED
Binary file
package/public/vite.svg DELETED
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>