btt-ui 1.0.0

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 (353) hide show
  1. package/README.md +16 -0
  2. package/es/_virtual/plugin-vue_export-helper.mjs +9 -0
  3. package/es/assets/ts/colormap.mjs +5073 -0
  4. package/es/assets/ts/hotMap.mjs +87 -0
  5. package/es/assets/ts/utils.mjs +46 -0
  6. package/es/index.mjs +68 -0
  7. package/es/src/button/index.mjs +7 -0
  8. package/es/src/button/src/button.mjs +59 -0
  9. package/es/src/button/src/style/index.css +212 -0
  10. package/es/src/button/src/style/variable.css +0 -0
  11. package/es/src/card/index.mjs +7 -0
  12. package/es/src/card/src/card.mjs +43 -0
  13. package/es/src/card/src/style/index.css +81 -0
  14. package/es/src/checkbox/index.mjs +9 -0
  15. package/es/src/checkbox/src/checkbox-group.mjs +36 -0
  16. package/es/src/checkbox/src/checkbox.mjs +33 -0
  17. package/es/src/checkbox/src/checkbox2.mjs +68 -0
  18. package/es/src/checkbox/src/style/index.css +111 -0
  19. package/es/src/collapse/index.mjs +9 -0
  20. package/es/src/collapse/src/collapse-item.mjs +82 -0
  21. package/es/src/collapse/src/collapse.mjs +13 -0
  22. package/es/src/collapse/src/collapse2.mjs +33 -0
  23. package/es/src/collapse/src/style/index.css +58 -0
  24. package/es/src/collapse-transition/index.mjs +7 -0
  25. package/es/src/collapse-transition/src/collapse-transition.mjs +41 -0
  26. package/es/src/collapse-transition/src/collapse-transition.vue_vue_type_style_index_0_lang.mjs +4 -0
  27. package/es/src/dialog/index.mjs +6 -0
  28. package/es/src/dialog/src/dialog.mjs +117 -0
  29. package/es/src/dialog/src/style/index.css +58 -0
  30. package/es/src/directives/bubble.mjs +48 -0
  31. package/es/src/directives/drag.mjs +121 -0
  32. package/es/src/directives/index.mjs +10 -0
  33. package/es/src/directives/zoomIn.mjs +43 -0
  34. package/es/src/drag/index.mjs +7 -0
  35. package/es/src/drag/src/drag.mjs +78 -0
  36. package/es/src/drag/src/style/index.css +25 -0
  37. package/es/src/echarts/index.mjs +7 -0
  38. package/es/src/echarts/src/index.mjs +113 -0
  39. package/es/src/echarts/src/style/index.css +30 -0
  40. package/es/src/echarts/src/ts/factory.mjs +281 -0
  41. package/es/src/hotmap/index.mjs +7 -0
  42. package/es/src/hotmap/src/index.mjs +67 -0
  43. package/es/src/hotmap/src/style/index.css +0 -0
  44. package/es/src/icon/index.mjs +9 -0
  45. package/es/src/icon/src/icon.mjs +66 -0
  46. package/es/src/icon/src/icon2.mjs +86 -0
  47. package/es/src/icon/src/style/index.css +85 -0
  48. package/es/src/icon/src/svg/alarm.mjs +4 -0
  49. package/es/src/icon/src/svg/arrow-down.mjs +4 -0
  50. package/es/src/icon/src/svg/arrow-left.mjs +4 -0
  51. package/es/src/icon/src/svg/arrow-right.mjs +4 -0
  52. package/es/src/icon/src/svg/arrow-up.mjs +4 -0
  53. package/es/src/icon/src/svg/baocun.mjs +4 -0
  54. package/es/src/icon/src/svg/caogaoxiang.mjs +4 -0
  55. package/es/src/icon/src/svg/card.mjs +4 -0
  56. package/es/src/icon/src/svg/caret-right.mjs +4 -0
  57. package/es/src/icon/src/svg/chakan.mjs +45 -0
  58. package/es/src/icon/src/svg/change.mjs +4 -0
  59. package/es/src/icon/src/svg/chongzhi.mjs +18 -0
  60. package/es/src/icon/src/svg/circle-close.mjs +4 -0
  61. package/es/src/icon/src/svg/close.mjs +4 -0
  62. package/es/src/icon/src/svg/delete.mjs +4 -0
  63. package/es/src/icon/src/svg/detail.mjs +4 -0
  64. package/es/src/icon/src/svg/dianhua.mjs +22 -0
  65. package/es/src/icon/src/svg/disabled.mjs +4 -0
  66. package/es/src/icon/src/svg/down.mjs +4 -0
  67. package/es/src/icon/src/svg/download.mjs +12 -0
  68. package/es/src/icon/src/svg/edit.mjs +4 -0
  69. package/es/src/icon/src/svg/editor.mjs +4 -0
  70. package/es/src/icon/src/svg/enable.mjs +4 -0
  71. package/es/src/icon/src/svg/exit.mjs +4 -0
  72. package/es/src/icon/src/svg/file-open.mjs +4 -0
  73. package/es/src/icon/src/svg/handle.mjs +4 -0
  74. package/es/src/icon/src/svg/lahei.mjs +20 -0
  75. package/es/src/icon/src/svg/max.mjs +4 -0
  76. package/es/src/icon/src/svg/measure.mjs +4 -0
  77. package/es/src/icon/src/svg/min.mjs +4 -0
  78. package/es/src/icon/src/svg/nan.mjs +17 -0
  79. package/es/src/icon/src/svg/no.mjs +16 -0
  80. package/es/src/icon/src/svg/nv.mjs +19 -0
  81. package/es/src/icon/src/svg/people.mjs +4 -0
  82. package/es/src/icon/src/svg/player.mjs +19 -0
  83. package/es/src/icon/src/svg/plus.mjs +4 -0
  84. package/es/src/icon/src/svg/preview.mjs +44 -0
  85. package/es/src/icon/src/svg/print.mjs +12 -0
  86. package/es/src/icon/src/svg/printmb.mjs +4 -0
  87. package/es/src/icon/src/svg/publish.mjs +4 -0
  88. package/es/src/icon/src/svg/qiye.mjs +4 -0
  89. package/es/src/icon/src/svg/quxiao.mjs +4 -0
  90. package/es/src/icon/src/svg/record.mjs +4 -0
  91. package/es/src/icon/src/svg/refresh.mjs +4 -0
  92. package/es/src/icon/src/svg/reset.mjs +4 -0
  93. package/es/src/icon/src/svg/risk.mjs +4 -0
  94. package/es/src/icon/src/svg/search.mjs +4 -0
  95. package/es/src/icon/src/svg/set.mjs +4 -0
  96. package/es/src/icon/src/svg/shenhe.mjs +4 -0
  97. package/es/src/icon/src/svg/shenqing.mjs +4 -0
  98. package/es/src/icon/src/svg/tongbu.mjs +18 -0
  99. package/es/src/icon/src/svg/up.mjs +4 -0
  100. package/es/src/icon/src/svg/upload.mjs +9 -0
  101. package/es/src/icon/src/svg/urging.mjs +4 -0
  102. package/es/src/icon/src/svg/yes.mjs +18 -0
  103. package/es/src/icon/src/svg/yuyue.mjs +4 -0
  104. package/es/src/index.mjs +80 -0
  105. package/es/src/input/index.mjs +7 -0
  106. package/es/src/input/src/input.mjs +119 -0
  107. package/es/src/input/src/style/index.css +52 -0
  108. package/es/src/link/index.mjs +6 -0
  109. package/es/src/link/link.mjs +30 -0
  110. package/es/src/link/style/index.css +44 -0
  111. package/es/src/link/types.mjs +14 -0
  112. package/es/src/overlay/index.mjs +7 -0
  113. package/es/src/overlay/src/overlay.mjs +36 -0
  114. package/es/src/overlay/src/style/index.css +19 -0
  115. package/es/src/popper/index.mjs +7 -0
  116. package/es/src/popper/src/forward-ref.mjs +27 -0
  117. package/es/src/popper/src/popper.mjs +93 -0
  118. package/es/src/popper/src/popper2.mjs +100 -0
  119. package/es/src/popper/src/style/index.css +67 -0
  120. package/es/src/popper/src/trigger.mjs +68 -0
  121. package/es/src/popper/src/use-floating.mjs +38 -0
  122. package/es/src/popper/src/use-nowrap.mjs +13 -0
  123. package/es/src/popper/src/use-popper-container.mjs +14 -0
  124. package/es/src/scroll/index.mjs +6 -0
  125. package/es/src/scroll/src/scroll.mjs +88 -0
  126. package/es/src/scroll/src/style/index.css +46 -0
  127. package/es/src/select/index.mjs +9 -0
  128. package/es/src/select/src/option.mjs +30 -0
  129. package/es/src/select/src/select.mjs +32 -0
  130. package/es/src/select/src/select2.mjs +89 -0
  131. package/es/src/select/src/style/index.css +82 -0
  132. package/es/src/shake/index.mjs +6 -0
  133. package/es/src/shake/shake.mjs +25 -0
  134. package/es/src/shake/style/index.css +20 -0
  135. package/es/src/sign/index.mjs +7 -0
  136. package/es/src/sign/src/sign.mjs +137 -0
  137. package/es/src/sign/src/style/index.css +0 -0
  138. package/es/src/style/common.css +2518 -0
  139. package/es/src/style/css-variables.css +88 -0
  140. package/es/src/style/index.min.css +2254 -0
  141. package/es/src/style/previewimg.css +109 -0
  142. package/es/src/style/var.css +5 -0
  143. package/es/src/style/zoomimg.css +36 -0
  144. package/es/src/switch/index.mjs +7 -0
  145. package/es/src/switch/src/style/index.css +96 -0
  146. package/es/src/switch/src/switch.mjs +79 -0
  147. package/es/src/tableScroll/index.mjs +7 -0
  148. package/es/src/tableScroll/src/index.mjs +235 -0
  149. package/es/src/timeline/index.mjs +7 -0
  150. package/es/src/timeline/src/style/index.css +63 -0
  151. package/es/src/timeline/src/timeline.mjs +96 -0
  152. package/es/src/toast/index.mjs +6 -0
  153. package/es/src/toast/style/index.css +13 -0
  154. package/es/src/toast/toast.mjs +17 -0
  155. package/es/src/tooltip/index.mjs +7 -0
  156. package/es/src/tooltip/src/style/index.css +4 -0
  157. package/es/src/tooltip/src/tooltip.mjs +50 -0
  158. package/es/src/tooltip/src/tooltip2.mjs +22 -0
  159. package/es/src/tree/index.mjs +7 -0
  160. package/es/src/tree/src/style/index.css +154 -0
  161. package/es/src/tree/src/tree.mjs +233 -0
  162. package/es/src/tree/src/tree2.mjs +67 -0
  163. package/es/src/tree/src/use-drag.mjs +52 -0
  164. package/es/src/upload/dragger.mjs +51 -0
  165. package/es/src/upload/index.mjs +6 -0
  166. package/es/src/upload/style/drag.css +36 -0
  167. package/es/src/upload/style/index.css +40 -0
  168. package/es/src/upload/upload.mjs +76 -0
  169. package/es/src/uploadFile/index.mjs +6 -0
  170. package/es/src/uploadFile/src/style/index.css +131 -0
  171. package/es/src/uploadFile/src/uploadFile.mjs +209 -0
  172. package/es/src/uploadFile/src/uploadFile2.mjs +17 -0
  173. package/es/src/wheel/index.mjs +6 -0
  174. package/es/src/wheel/style/index.css +5 -0
  175. package/es/src/wheel/wheel.mjs +45 -0
  176. package/es/src/xgplayer/src/style/index.css +6 -0
  177. package/es/style.css +1 -0
  178. package/lib/_virtual/plugin-vue_export-helper.js +1 -0
  179. package/lib/assets/ts/colormap.js +1 -0
  180. package/lib/assets/ts/hotMap.js +1 -0
  181. package/lib/assets/ts/utils.js +1 -0
  182. package/lib/index.js +1 -0
  183. package/lib/src/button/index.js +1 -0
  184. package/lib/src/button/src/button.js +1 -0
  185. package/lib/src/button/src/style/index.css +212 -0
  186. package/lib/src/button/src/style/variable.css +0 -0
  187. package/lib/src/card/index.js +1 -0
  188. package/lib/src/card/src/card.js +1 -0
  189. package/lib/src/card/src/style/index.css +81 -0
  190. package/lib/src/checkbox/index.js +1 -0
  191. package/lib/src/checkbox/src/checkbox-group.js +1 -0
  192. package/lib/src/checkbox/src/checkbox.js +1 -0
  193. package/lib/src/checkbox/src/checkbox2.js +1 -0
  194. package/lib/src/checkbox/src/style/index.css +111 -0
  195. package/lib/src/collapse/index.js +1 -0
  196. package/lib/src/collapse/src/collapse-item.js +1 -0
  197. package/lib/src/collapse/src/collapse.js +1 -0
  198. package/lib/src/collapse/src/collapse2.js +1 -0
  199. package/lib/src/collapse/src/style/index.css +58 -0
  200. package/lib/src/collapse-transition/index.js +1 -0
  201. package/lib/src/collapse-transition/src/collapse-transition.js +1 -0
  202. package/lib/src/collapse-transition/src/collapse-transition.vue_vue_type_style_index_0_lang.js +1 -0
  203. package/lib/src/dialog/index.js +1 -0
  204. package/lib/src/dialog/src/dialog.js +1 -0
  205. package/lib/src/dialog/src/style/index.css +58 -0
  206. package/lib/src/directives/bubble.js +1 -0
  207. package/lib/src/directives/drag.js +1 -0
  208. package/lib/src/directives/index.js +1 -0
  209. package/lib/src/directives/zoomIn.js +1 -0
  210. package/lib/src/drag/index.js +1 -0
  211. package/lib/src/drag/src/drag.js +1 -0
  212. package/lib/src/drag/src/style/index.css +25 -0
  213. package/lib/src/echarts/index.js +1 -0
  214. package/lib/src/echarts/src/index.js +1 -0
  215. package/lib/src/echarts/src/style/index.css +30 -0
  216. package/lib/src/echarts/src/ts/factory.js +1 -0
  217. package/lib/src/hotmap/index.js +1 -0
  218. package/lib/src/hotmap/src/index.js +1 -0
  219. package/lib/src/hotmap/src/style/index.css +0 -0
  220. package/lib/src/icon/index.js +1 -0
  221. package/lib/src/icon/src/icon.js +1 -0
  222. package/lib/src/icon/src/icon2.js +1 -0
  223. package/lib/src/icon/src/style/index.css +85 -0
  224. package/lib/src/icon/src/svg/alarm.js +1 -0
  225. package/lib/src/icon/src/svg/arrow-down.js +1 -0
  226. package/lib/src/icon/src/svg/arrow-left.js +1 -0
  227. package/lib/src/icon/src/svg/arrow-right.js +1 -0
  228. package/lib/src/icon/src/svg/arrow-up.js +1 -0
  229. package/lib/src/icon/src/svg/baocun.js +1 -0
  230. package/lib/src/icon/src/svg/caogaoxiang.js +1 -0
  231. package/lib/src/icon/src/svg/card.js +1 -0
  232. package/lib/src/icon/src/svg/caret-right.js +1 -0
  233. package/lib/src/icon/src/svg/chakan.js +42 -0
  234. package/lib/src/icon/src/svg/change.js +1 -0
  235. package/lib/src/icon/src/svg/chongzhi.js +15 -0
  236. package/lib/src/icon/src/svg/circle-close.js +1 -0
  237. package/lib/src/icon/src/svg/close.js +1 -0
  238. package/lib/src/icon/src/svg/delete.js +1 -0
  239. package/lib/src/icon/src/svg/detail.js +1 -0
  240. package/lib/src/icon/src/svg/dianhua.js +19 -0
  241. package/lib/src/icon/src/svg/disabled.js +1 -0
  242. package/lib/src/icon/src/svg/down.js +1 -0
  243. package/lib/src/icon/src/svg/download.js +9 -0
  244. package/lib/src/icon/src/svg/edit.js +1 -0
  245. package/lib/src/icon/src/svg/editor.js +1 -0
  246. package/lib/src/icon/src/svg/enable.js +1 -0
  247. package/lib/src/icon/src/svg/exit.js +1 -0
  248. package/lib/src/icon/src/svg/file-open.js +1 -0
  249. package/lib/src/icon/src/svg/handle.js +1 -0
  250. package/lib/src/icon/src/svg/lahei.js +17 -0
  251. package/lib/src/icon/src/svg/max.js +1 -0
  252. package/lib/src/icon/src/svg/measure.js +1 -0
  253. package/lib/src/icon/src/svg/min.js +1 -0
  254. package/lib/src/icon/src/svg/nan.js +14 -0
  255. package/lib/src/icon/src/svg/no.js +13 -0
  256. package/lib/src/icon/src/svg/nv.js +16 -0
  257. package/lib/src/icon/src/svg/people.js +1 -0
  258. package/lib/src/icon/src/svg/player.js +16 -0
  259. package/lib/src/icon/src/svg/plus.js +1 -0
  260. package/lib/src/icon/src/svg/preview.js +41 -0
  261. package/lib/src/icon/src/svg/print.js +9 -0
  262. package/lib/src/icon/src/svg/printmb.js +1 -0
  263. package/lib/src/icon/src/svg/publish.js +1 -0
  264. package/lib/src/icon/src/svg/qiye.js +1 -0
  265. package/lib/src/icon/src/svg/quxiao.js +1 -0
  266. package/lib/src/icon/src/svg/record.js +1 -0
  267. package/lib/src/icon/src/svg/refresh.js +1 -0
  268. package/lib/src/icon/src/svg/reset.js +1 -0
  269. package/lib/src/icon/src/svg/risk.js +1 -0
  270. package/lib/src/icon/src/svg/search.js +1 -0
  271. package/lib/src/icon/src/svg/set.js +1 -0
  272. package/lib/src/icon/src/svg/shenhe.js +1 -0
  273. package/lib/src/icon/src/svg/shenqing.js +1 -0
  274. package/lib/src/icon/src/svg/tongbu.js +15 -0
  275. package/lib/src/icon/src/svg/up.js +1 -0
  276. package/lib/src/icon/src/svg/upload.js +6 -0
  277. package/lib/src/icon/src/svg/urging.js +1 -0
  278. package/lib/src/icon/src/svg/yes.js +15 -0
  279. package/lib/src/icon/src/svg/yuyue.js +1 -0
  280. package/lib/src/index.js +1 -0
  281. package/lib/src/input/index.js +1 -0
  282. package/lib/src/input/src/input.js +1 -0
  283. package/lib/src/input/src/style/index.css +52 -0
  284. package/lib/src/link/index.js +1 -0
  285. package/lib/src/link/link.js +1 -0
  286. package/lib/src/link/style/index.css +44 -0
  287. package/lib/src/link/types.js +1 -0
  288. package/lib/src/overlay/index.js +1 -0
  289. package/lib/src/overlay/src/overlay.js +1 -0
  290. package/lib/src/overlay/src/style/index.css +19 -0
  291. package/lib/src/popper/index.js +1 -0
  292. package/lib/src/popper/src/forward-ref.js +1 -0
  293. package/lib/src/popper/src/popper.js +1 -0
  294. package/lib/src/popper/src/popper2.js +1 -0
  295. package/lib/src/popper/src/style/index.css +67 -0
  296. package/lib/src/popper/src/trigger.js +1 -0
  297. package/lib/src/popper/src/use-floating.js +1 -0
  298. package/lib/src/popper/src/use-nowrap.js +1 -0
  299. package/lib/src/popper/src/use-popper-container.js +1 -0
  300. package/lib/src/scroll/index.js +1 -0
  301. package/lib/src/scroll/src/scroll.js +1 -0
  302. package/lib/src/scroll/src/style/index.css +46 -0
  303. package/lib/src/select/index.js +1 -0
  304. package/lib/src/select/src/option.js +1 -0
  305. package/lib/src/select/src/select.js +1 -0
  306. package/lib/src/select/src/select2.js +1 -0
  307. package/lib/src/select/src/style/index.css +82 -0
  308. package/lib/src/shake/index.js +1 -0
  309. package/lib/src/shake/shake.js +1 -0
  310. package/lib/src/shake/style/index.css +20 -0
  311. package/lib/src/sign/index.js +1 -0
  312. package/lib/src/sign/src/sign.js +1 -0
  313. package/lib/src/sign/src/style/index.css +0 -0
  314. package/lib/src/style/common.css +2518 -0
  315. package/lib/src/style/css-variables.css +88 -0
  316. package/lib/src/style/index.min.css +2254 -0
  317. package/lib/src/style/previewimg.css +109 -0
  318. package/lib/src/style/var.css +5 -0
  319. package/lib/src/style/zoomimg.css +36 -0
  320. package/lib/src/switch/index.js +1 -0
  321. package/lib/src/switch/src/style/index.css +96 -0
  322. package/lib/src/switch/src/switch.js +1 -0
  323. package/lib/src/tableScroll/index.js +1 -0
  324. package/lib/src/tableScroll/src/index.js +1 -0
  325. package/lib/src/timeline/index.js +1 -0
  326. package/lib/src/timeline/src/style/index.css +63 -0
  327. package/lib/src/timeline/src/timeline.js +1 -0
  328. package/lib/src/toast/index.js +1 -0
  329. package/lib/src/toast/style/index.css +13 -0
  330. package/lib/src/toast/toast.js +1 -0
  331. package/lib/src/tooltip/index.js +1 -0
  332. package/lib/src/tooltip/src/style/index.css +4 -0
  333. package/lib/src/tooltip/src/tooltip.js +1 -0
  334. package/lib/src/tooltip/src/tooltip2.js +1 -0
  335. package/lib/src/tree/index.js +1 -0
  336. package/lib/src/tree/src/style/index.css +154 -0
  337. package/lib/src/tree/src/tree.js +1 -0
  338. package/lib/src/tree/src/tree2.js +1 -0
  339. package/lib/src/tree/src/use-drag.js +1 -0
  340. package/lib/src/upload/dragger.js +1 -0
  341. package/lib/src/upload/index.js +1 -0
  342. package/lib/src/upload/style/drag.css +36 -0
  343. package/lib/src/upload/style/index.css +40 -0
  344. package/lib/src/upload/upload.js +1 -0
  345. package/lib/src/uploadFile/index.js +1 -0
  346. package/lib/src/uploadFile/src/style/index.css +131 -0
  347. package/lib/src/uploadFile/src/uploadFile.js +1 -0
  348. package/lib/src/uploadFile/src/uploadFile2.js +1 -0
  349. package/lib/src/wheel/index.js +1 -0
  350. package/lib/src/wheel/style/index.css +5 -0
  351. package/lib/src/wheel/wheel.js +1 -0
  352. package/lib/src/xgplayer/src/style/index.css +6 -0
  353. package/package.json +31 -0
@@ -0,0 +1,121 @@
1
+ class f {
2
+ constructor(e, t) {
3
+ this._result = {}, this._x = 0, this._y = 0, this._scale = 1, this._minScale = 0.5, this._angle = 0, this._maxScale = 4, this._isPointerdown = !1, this._diff = { x: 0, y: 0 }, this._lastPointermove = { x: 0, y: 0 }, this._curImgIndex = 0, this._mask = document.createElement("div"), this._binding = {
4
+ type: "transform",
5
+ list: new Array(),
6
+ el: ""
7
+ }, this._binding = t != null ? t : { type: "transform", list: new Array(), el: "" }, this._image = e;
8
+ }
9
+ resetConfig() {
10
+ this._x = 0, this._y = 0, this._scale = 1;
11
+ }
12
+ build() {
13
+ this._mask = document.createElement("div"), this._mask.classList.add("k-img-preview-mask");
14
+ let e = document.createElement("div");
15
+ e.className = "k-icon-close-btn k-img-close", this._mask.appendChild(e), e.onclick = () => {
16
+ this.remove();
17
+ };
18
+ let t = new Image();
19
+ t.onload = () => {
20
+ this._mask.appendChild(t), this.resetConfig(), this._result = this._getImgSize(t.naturalWidth, t.naturalHeight, this._mask.offsetWidth, this._mask.offsetHeight), t.style.width = this._result.width + "px", t.style.height = this._result.height + "px", this._x = (this._mask.offsetWidth - this._result.width) * 0.5, this._y = (this._mask.offsetHeight - this._result.height) * 0.5, this._binding.type == "transform" ? t.style.transform = "translate3d(" + this._x + "px, " + this._y + "px, 0) scale(" + this._scale + ")" : (t.style.transform = `scale(${this._scale})`, t.style.transition = "transform 0.6s ease-out", t.style.marginLeft = this._x + "px", t.style.marginTop = this._y + "px"), this._drag(t), this._wheelZoom(t);
21
+ };
22
+ let s = document.createElement("ul");
23
+ s.className = "action-item-wapper";
24
+ let n = document.createElement("li");
25
+ n.className = "action-item rotate-left", n.setAttribute("data-key", "rotateleft"), s.appendChild(n);
26
+ let r = document.createElement("li");
27
+ r.className = "action-item rotate-right", r.setAttribute("data-key", "rotateright"), s.appendChild(r);
28
+ let _ = document.createElement("ul");
29
+ _.className = "dragger-file-list-wapper", t.src = this._image.src;
30
+ let a = new Array();
31
+ const h = () => {
32
+ a.forEach((i) => {
33
+ i.className = "";
34
+ });
35
+ };
36
+ Array.isArray(this._binding.list) ? typeof this._binding.list[0] == "string" ? (this._curImgIndex = this._binding.list.findIndex((i) => i == this._image.src), this._binding.list && this._binding.list.forEach((i, d) => {
37
+ let l = document.createElement("li");
38
+ l.className = this._curImgIndex == d ? "cur" : "";
39
+ let o = document.createElement("img");
40
+ o.setAttribute("src", i), l.append(o), _.appendChild(l), a.push(l), l.onclick = function() {
41
+ t.style.transform = "scale(0)", t.src = i, h(), l.className = "cur";
42
+ };
43
+ })) : (this._curImgIndex = this._binding.list.findIndex((i) => i.url == this._image.src), this._binding.list && this._binding.list.forEach((i, d) => {
44
+ let l = document.createElement("li");
45
+ l.className = this._curImgIndex == d ? "cur" : "";
46
+ let o = document.createElement("img");
47
+ o.setAttribute("src", i.url), l.append(o), _.appendChild(l), a.push(l), l.onclick = function() {
48
+ t.style.transform = "scale(0)", t.src = i.url, h(), l.className = "cur";
49
+ };
50
+ })) : _.style.display = "none";
51
+ let m = {
52
+ rotateleft: () => {
53
+ this._angle -= 90, this._binding.type == "transform" ? t.style.transform = `translate3d(${this._x}px, ${this._y}px, 0) scale(${this._scale}) rotate(${this._angle}deg)` : t.style.transform = `rotate(${this._angle}deg)`;
54
+ },
55
+ rotateright: () => {
56
+ this._angle += 90, this._binding.type == "transform" ? t.style.transform = `translate3d(${this._x}px, ${this._y}px, 0) scale(${this._scale}) rotate(${this._angle}deg)` : t.style.transform = `rotate(${this._angle}deg)`;
57
+ }
58
+ };
59
+ s.onclick = (i) => {
60
+ i.target.dataset.key && m[i.target.dataset.key]();
61
+ }, this._mask.appendChild(s), this._mask.appendChild(_), this._binding.el ? document.querySelector(this._binding.el).appendChild(this._mask) : document.body.appendChild(this._mask);
62
+ }
63
+ _getImgSize(e, t, s, n) {
64
+ const r = e / t, _ = s / n;
65
+ let a, h;
66
+ return r >= _ ? e > s ? (a = s, h = s / e * t) : (a = e, h = t) : t > n ? (a = n / t * e, h = n) : (a = e, h = t), { width: a, height: h };
67
+ }
68
+ _drag(e) {
69
+ e.addEventListener("pointerdown", (t) => {
70
+ this._isPointerdown = !0, e.setPointerCapture(t.pointerId), this._lastPointermove = { x: t.clientX, y: t.clientY };
71
+ }), e.addEventListener("pointermove", (t) => {
72
+ if (this._isPointerdown) {
73
+ const s = { x: t.clientX, y: t.clientY };
74
+ this._diff.x = s.x - this._lastPointermove.x, this._diff.y = s.y - this._lastPointermove.y, this._lastPointermove = { x: s.x, y: s.y }, this._x += this._diff.x, this._y += this._diff.y, this._binding.type == "transform" ? e.style.transform = `translate3d(${this._x}px, ${this._y}px, 0) scale(${this._scale}) rotate(${this._angle}deg)` : (e.style.marginLeft = this._x + "px", e.style.marginTop = this._y + "px");
75
+ }
76
+ t.preventDefault();
77
+ }), e.addEventListener("pointerup", (t) => {
78
+ this._isPointerdown && (this._isPointerdown = !1);
79
+ }), e.addEventListener("pointercancel", (t) => {
80
+ this._isPointerdown && (this._isPointerdown = !1);
81
+ });
82
+ }
83
+ _wheelZoom(e) {
84
+ this._mask.addEventListener("wheel", (t) => {
85
+ let s = 1.1;
86
+ t.deltaY > 0 && (s = 1 / 1.1);
87
+ const n = this._scale * s;
88
+ if (n > this._maxScale ? (s = this._maxScale / this._scale, this._scale = this._maxScale) : n < this._minScale ? (s = this._minScale / this._scale, this._scale = this._minScale) : this._scale = n, t.target.tagName === "IMG")
89
+ if (this._binding.type == "transform") {
90
+ const r = {
91
+ x: (s - 1) * this._result.width * 0.5,
92
+ y: (s - 1) * this._result.height * 0.5
93
+ };
94
+ this._x -= (s - 1) * (t.clientX - this._x) - r.x, this._y -= (s - 1) * (t.clientY - this._y) - r.y;
95
+ } else
96
+ this._x -= (s - 1) * (t.clientX - this._x), this._y -= (s - 1) * (t.clientY - this._y);
97
+ this._binding.type == "transform" ? e.style.transform = `translate3d(${this._x}px, ${this._y}px, 0) scale(${this._scale}) rotate(${this._angle}deg)` : (e.style.marginLeft = this._x + "px", e.style.marginTop = this._y + "px", e.style.width = this._result.width * this._scale + "px", e.style.height = this._result.height * this._scale + "px"), t.preventDefault();
98
+ });
99
+ }
100
+ reset() {
101
+ this._scale = 0.7, this._mask = document.createElement("div");
102
+ }
103
+ remove() {
104
+ this._mask.innerHTML = "", this._mask.remove(), this.reset();
105
+ }
106
+ }
107
+ const p = {
108
+ mounted(c, e) {
109
+ let t = e.value, s = new f(c, { ...t });
110
+ c.onclick = () => {
111
+ s.build();
112
+ };
113
+ },
114
+ unmounted() {
115
+ console.log("distory");
116
+ }
117
+ };
118
+ export {
119
+ f as Dragger,
120
+ p as dragger
121
+ };
@@ -0,0 +1,10 @@
1
+ import { Dragger as e, dragger as m } from "./drag.mjs";
2
+ import { ZoomIn as b, zoomIn as f } from "./zoomIn.mjs";
3
+ import { bubble as t } from "./bubble.mjs";
4
+ export {
5
+ e as Dragger,
6
+ b as ZoomIn,
7
+ t as bubble,
8
+ m as dragger,
9
+ f as zoomIn
10
+ };
@@ -0,0 +1,43 @@
1
+ let h;
2
+ class a {
3
+ constructor(t, i) {
4
+ var s;
5
+ this._wrapper = document.createElement("div"), this._maxWidth = 600, this._point = {
6
+ x: 0,
7
+ y: 0
8
+ }, this._maxWidth = (s = i.size) != null ? s : this._maxWidth, this.init(t);
9
+ }
10
+ init(t) {
11
+ this._wrapper.className = "k-img-zoom-wapper";
12
+ let i = document.createElement("div");
13
+ i.style = "width:100%;height:100%;background:#ffffff;", this._wrapper.appendChild(i), this.img = new Image(), this.img.classList.add("k-img-zoom"), this.img.onload = () => {
14
+ this.img.width = this.img.width > this._maxWidth ? this._maxWidth : this.img.width, i.appendChild(this.img);
15
+ }, this.img.src = t.src, document.body.appendChild(this._wrapper), this.bindEvent(t);
16
+ }
17
+ bindEvent(t) {
18
+ t.onmousemove = (i) => {
19
+ this._wrapper.style.left = `${i.pageX + 5}px`, this._wrapper.style.top = `${i.pageY + 5}px`, this._wrapper.classList.add("on");
20
+ }, t.onmouseleave = (i) => {
21
+ this._wrapper.classList.remove("on");
22
+ };
23
+ }
24
+ updateSrc(t) {
25
+ this.img.src = t;
26
+ }
27
+ hide() {
28
+ this._wrapper.classList.remove("on");
29
+ }
30
+ }
31
+ const m = {
32
+ mounted(e, t) {
33
+ let i = t.value;
34
+ h = new a(e, { ...i });
35
+ },
36
+ unmounted() {
37
+ h._wrapper.remove();
38
+ }
39
+ };
40
+ export {
41
+ a as ZoomIn,
42
+ m as zoomIn
43
+ };
@@ -0,0 +1,7 @@
1
+ import t from "./src/drag.mjs";
2
+ import { withInstall as o } from "../../assets/ts/utils.mjs";
3
+ const m = o(t);
4
+ export {
5
+ m as Drag,
6
+ m as default
7
+ };
@@ -0,0 +1,78 @@
1
+ import { defineComponent as d, ref as r, watch as m, nextTick as y, openBlock as x, createBlock as w, unref as C, withModifiers as s, withCtx as k, createElementVNode as P, normalizeStyle as g, renderSlot as h, createCommentVNode as E } from "vue";
2
+ import { Overlay as B } from "../../overlay/index.mjs";
3
+ import "./style/index.css";
4
+ const L = d({
5
+ name: "k-drag"
6
+ }), M = d({
7
+ ...L,
8
+ props: {
9
+ width: { default: 800 },
10
+ showClose: { type: Boolean, default: !0 },
11
+ modelValue: { type: Boolean, default: !1 },
12
+ closeDelay: { default: 0 },
13
+ beforeClose: {},
14
+ closeOnClickModal: { type: Boolean, default: !0 }
15
+ },
16
+ emits: ["close", "closed"],
17
+ setup(u, { emit: v }) {
18
+ const a = u, i = v, o = r(), e = r({
19
+ isPointerdown: !1,
20
+ rect: {},
21
+ lastPointermove: { x: 0, y: 0 },
22
+ diff: { x: 0, y: 0 },
23
+ x: 0,
24
+ y: 0
25
+ }), c = () => {
26
+ e.value.isPointerdown = !1, e.value.rect = {}, e.value.lastPointermove = { x: 0, y: 0 }, e.value.diff = { x: 0, y: 0 }, e.value.x = 0, e.value.y = 0;
27
+ const t = () => {
28
+ setTimeout(() => {
29
+ i("closed");
30
+ }, a.closeDelay);
31
+ };
32
+ if (a.beforeClose)
33
+ return a.beforeClose(() => t());
34
+ i("close"), t();
35
+ }, f = () => {
36
+ a.closeOnClickModal && c();
37
+ };
38
+ m(() => a.modelValue, (t) => {
39
+ t && y(p);
40
+ });
41
+ const p = () => {
42
+ o.value.addEventListener("pointerdown", (l) => {
43
+ e.value.isPointerdown = !0, e.value.lastPointermove = { x: l.clientX, y: l.clientY }, e.value.rect = o.value.getBoundingClientRect();
44
+ }), o.value.addEventListener("pointermove", (l) => {
45
+ if (e.value.isPointerdown) {
46
+ const n = { x: l.clientX, y: l.clientY };
47
+ e.value.diff.x = n.x - e.value.lastPointermove.x, e.value.diff.y = n.y - e.value.lastPointermove.y, e.value.lastPointermove = { x: n.x, y: n.y }, e.value.x += e.value.diff.x, e.value.y += e.value.diff.y, o.value.style.transform = "translate3d(" + e.value.x + "px, " + e.value.y + "px, 0)", l.preventDefault();
48
+ }
49
+ });
50
+ const t = () => {
51
+ e.value.isPointerdown && (e.value.isPointerdown = !1);
52
+ };
53
+ o.value.addEventListener("pointerup", t), o.value.addEventListener("pointercancel", t), o.value.addEventListener("mouseleave", t), o.value.addEventListener("mouseup", t);
54
+ };
55
+ return (t, l) => t.modelValue ? (x(), w(C(B), {
56
+ key: 0,
57
+ class: "k-content-center",
58
+ onClick: s(f, ["stop"])
59
+ }, {
60
+ default: k(() => [
61
+ P("div", {
62
+ class: "k-drag slide-in-top",
63
+ ref_key: "dragWrapper",
64
+ ref: o,
65
+ style: g({ width: t.width + "px" }),
66
+ onClick: l[0] || (l[0] = s(() => {
67
+ }, ["stop"]))
68
+ }, [
69
+ h(t.$slots, "default")
70
+ ], 4)
71
+ ]),
72
+ _: 3
73
+ })) : E("", !0);
74
+ }
75
+ });
76
+ export {
77
+ M as default
78
+ };
@@ -0,0 +1,25 @@
1
+ .k-content-center {
2
+ text-align: center;
3
+ }
4
+ .k-content-center::after {
5
+ display: inline-block;
6
+ width: 0;
7
+ height: 100%;
8
+ vertical-align: middle;
9
+ content: "";
10
+ }
11
+
12
+ .k-drag {
13
+ width: 1000px;
14
+ height: 600px;
15
+ display: inline-block;
16
+ background-color: blue;
17
+ vertical-align: middle;
18
+ text-align: left;
19
+ position: relative;
20
+ }
21
+ .k-drag .k-drag__header {
22
+ height: 50px;
23
+ background-color: red;
24
+ cursor: move;
25
+ }
@@ -0,0 +1,7 @@
1
+ import t from "./src/index.mjs";
2
+ import { withInstall as o } from "../../assets/ts/utils.mjs";
3
+ const m = o(t);
4
+ export {
5
+ m as ECharts,
6
+ m as default
7
+ };
@@ -0,0 +1,113 @@
1
+ import { defineComponent as u, ref as p, onMounted as d, openBlock as m, createBlock as y, unref as r, withCtx as x, createElementVNode as a, normalizeClass as b, renderSlot as h, createTextVNode as k, createVNode as N, createCommentVNode as S } from "vue";
2
+ import { Drag as C } from "../../drag/index.mjs";
3
+ import * as g from "echarts";
4
+ import { createNamespace as B } from "../../../assets/ts/utils.mjs";
5
+ import { Icon as _ } from "../../icon/index.mjs";
6
+ import "./style/index.css";
7
+ import i from "./ts/factory.mjs";
8
+ const V = { class: "k-echart-header" }, j = u({
9
+ name: "k-echarts"
10
+ }), w = u({
11
+ ...j,
12
+ props: {
13
+ modelValue: {
14
+ type: Boolean,
15
+ default: !0
16
+ },
17
+ data: {
18
+ type: Array,
19
+ default: [150, 230, 224, 218, 135, 147, 260]
20
+ },
21
+ xAxis: {
22
+ type: Object,
23
+ default: () => {
24
+ }
25
+ },
26
+ yAxis: {
27
+ type: Object,
28
+ default: () => {
29
+ }
30
+ },
31
+ tooltip: {
32
+ type: Object,
33
+ default: () => {
34
+ }
35
+ },
36
+ type: {
37
+ type: String,
38
+ default: "line"
39
+ },
40
+ title: {
41
+ type: String,
42
+ default: ""
43
+ },
44
+ fontSize: {
45
+ type: Number,
46
+ default: 14
47
+ },
48
+ maxMinFontSize: {
49
+ type: Number,
50
+ default: 26
51
+ },
52
+ backgroundColor: {
53
+ type: String,
54
+ default: "#0E2B67"
55
+ },
56
+ lineColors: {
57
+ type: Array,
58
+ default: ["#49fcf0"]
59
+ },
60
+ grid: {
61
+ type: Object,
62
+ default: () => {
63
+ }
64
+ },
65
+ xName: {
66
+ type: String,
67
+ default: "\u65B9\u4F4D\u89C6\u5411\u89D2(\xB0)"
68
+ },
69
+ yName: {
70
+ type: String,
71
+ default: "RCS(dBm\xB2)"
72
+ },
73
+ xSize: {
74
+ type: Number,
75
+ default: 6
76
+ }
77
+ },
78
+ emits: ["close"],
79
+ setup(o, { emit: c }) {
80
+ const { n: s } = B("echart-wrapper"), l = p(), e = o, f = c;
81
+ return d(() => {
82
+ let t = g.init(l.value);
83
+ e.type == "line" || e.type == "bar" ? i.line(t, e) : e.type == "polar" && i.polar(t, e);
84
+ }), (t, n) => o.modelValue ? (m(), y(r(C), { key: 0 }, {
85
+ default: x(() => [
86
+ a("div", {
87
+ class: b([r(s)()])
88
+ }, [
89
+ a("div", V, [
90
+ h(t.$slots, "default", {}, () => [
91
+ k("\u8FD9\u662F\u6807\u9898")
92
+ ]),
93
+ N(r(_), {
94
+ name: "close",
95
+ size: "16",
96
+ class: "k-icon-close",
97
+ onClick: n[0] || (n[0] = (v) => f("close"))
98
+ })
99
+ ]),
100
+ a("div", {
101
+ class: "k-echart-content",
102
+ ref_key: "echartsRef",
103
+ ref: l
104
+ }, null, 512)
105
+ ], 2)
106
+ ]),
107
+ _: 3
108
+ })) : S("", !0);
109
+ }
110
+ });
111
+ export {
112
+ w as default
113
+ };
@@ -0,0 +1,30 @@
1
+ .k-echart-wrapper {
2
+ width: 100%;
3
+ height: 100%;
4
+ background: red;
5
+ display: flex;
6
+ flex-direction: column;
7
+ pointer-events: none;
8
+ }
9
+ .k-echart-wrapper .k-echart-header {
10
+ width: 100%;
11
+ height: 40px;
12
+ background: var(--k-color-primary);
13
+ position: relative;
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ color: var(--k-color-white);
18
+ }
19
+ .k-echart-wrapper .k-echart-header .k-icon-close {
20
+ position: absolute;
21
+ right: 10px;
22
+ cursor: pointer;
23
+ pointer-events: all;
24
+ }
25
+ .k-echart-wrapper .k-echart-content {
26
+ flex: 1;
27
+ width: 100%;
28
+ background-color: yellow;
29
+ pointer-events: all;
30
+ }