dpzvc3-ui 3.0.7 → 3.1.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 (478) hide show
  1. package/dist/dpzvc3.esm.js +7761 -10544
  2. package/dist/dpzvc3.esm.js.map +1 -1
  3. package/dist/dpzvc3.esm.min.js +1 -1
  4. package/dist/dpzvc3.esm.min.js.map +1 -1
  5. package/dist/dpzvc3.js +6067 -7681
  6. package/dist/dpzvc3.js.map +1 -1
  7. package/dist/dpzvc3.min.js +1 -1
  8. package/dist/dpzvc3.min.js.map +1 -1
  9. package/dist/styles/components/radioBox.css +1 -1
  10. package/dist/styles/components/rater.css +1 -0
  11. package/dist/styles/dpzvc3.css +1 -1
  12. package/dist/types/components/Indicator/types.d.ts +16 -0
  13. package/dist/types/components/Indicator/types.d.ts.map +1 -0
  14. package/dist/types/components/Prompt/types.d.ts +37 -0
  15. package/dist/types/components/Prompt/types.d.ts.map +1 -0
  16. package/dist/types/components/Text/index.d.ts +12 -0
  17. package/dist/types/components/Text/index.d.ts.map +1 -0
  18. package/dist/types/components/Text/textBar.d.ts +84 -0
  19. package/dist/types/components/Text/textBar.d.ts.map +1 -0
  20. package/dist/types/components/Text/types.d.ts +13 -0
  21. package/dist/types/components/Text/types.d.ts.map +1 -0
  22. package/dist/types/components/actionSheet/actionSheet.d.ts +42 -0
  23. package/dist/types/components/actionSheet/actionSheet.d.ts.map +1 -0
  24. package/dist/types/components/actionSheet/index.d.ts +7 -0
  25. package/dist/types/components/actionSheet/index.d.ts.map +1 -0
  26. package/dist/types/components/actionSheet/types.d.ts +11 -0
  27. package/dist/types/components/actionSheet/types.d.ts.map +1 -0
  28. package/dist/types/components/badge/badge.d.ts +51 -0
  29. package/dist/types/components/badge/badge.d.ts.map +1 -0
  30. package/dist/types/components/badge/index.d.ts +12 -0
  31. package/dist/types/components/badge/index.d.ts.map +1 -0
  32. package/dist/types/components/badge/types.d.ts +8 -0
  33. package/dist/types/components/badge/types.d.ts.map +1 -0
  34. package/dist/types/components/button/button.d.ts +103 -0
  35. package/dist/types/components/button/button.d.ts.map +1 -0
  36. package/dist/types/components/button/index.d.ts +12 -0
  37. package/dist/types/components/button/index.d.ts.map +1 -0
  38. package/dist/types/components/button/types.d.ts +13 -0
  39. package/dist/types/components/button/types.d.ts.map +1 -0
  40. package/dist/types/components/card/card.d.ts +18 -0
  41. package/dist/types/components/card/card.d.ts.map +1 -0
  42. package/dist/types/components/card/index.d.ts +12 -0
  43. package/dist/types/components/card/index.d.ts.map +1 -0
  44. package/dist/types/components/card/types.d.ts +4 -0
  45. package/dist/types/components/card/types.d.ts.map +1 -0
  46. package/dist/types/components/cell/cell.d.ts +24 -0
  47. package/dist/types/components/cell/cell.d.ts.map +1 -0
  48. package/dist/types/components/cell/index.d.ts +12 -0
  49. package/dist/types/components/cell/index.d.ts.map +1 -0
  50. package/dist/types/components/cell/types.d.ts +8 -0
  51. package/dist/types/components/cell/types.d.ts.map +1 -0
  52. package/dist/types/components/cellSwipe/cellSwipe.d.ts +37 -0
  53. package/dist/types/components/cellSwipe/cellSwipe.d.ts.map +1 -0
  54. package/dist/types/components/cellSwipe/index.d.ts +12 -0
  55. package/dist/types/components/cellSwipe/index.d.ts.map +1 -0
  56. package/dist/types/components/cellSwipe/types.d.ts +15 -0
  57. package/dist/types/components/cellSwipe/types.d.ts.map +1 -0
  58. package/dist/types/components/checkBox/checkbox-group.d.ts +38 -0
  59. package/dist/types/components/checkBox/checkbox-group.d.ts.map +1 -0
  60. package/dist/types/components/checkBox/checkbox.d.ts +36 -0
  61. package/dist/types/components/checkBox/checkbox.d.ts.map +1 -0
  62. package/dist/types/components/checkBox/index.d.ts +14 -0
  63. package/dist/types/components/checkBox/index.d.ts.map +1 -0
  64. package/dist/types/components/checkBox/types.d.ts +22 -0
  65. package/dist/types/components/checkBox/types.d.ts.map +1 -0
  66. package/dist/types/components/header/header.d.ts +47 -0
  67. package/dist/types/components/header/header.d.ts.map +1 -0
  68. package/dist/types/components/header/index.d.ts +12 -0
  69. package/dist/types/components/header/index.d.ts.map +1 -0
  70. package/dist/types/components/header/types.d.ts +7 -0
  71. package/dist/types/components/header/types.d.ts.map +1 -0
  72. package/dist/types/components/loadMore/index.d.ts +12 -0
  73. package/dist/types/components/loadMore/index.d.ts.map +1 -0
  74. package/dist/types/components/loadMore/loadMore.d.ts +150 -0
  75. package/dist/types/components/loadMore/loadMore.d.ts.map +1 -0
  76. package/dist/types/components/loadMore/types.d.ts +23 -0
  77. package/dist/types/components/loadMore/types.d.ts.map +1 -0
  78. package/dist/types/components/message/types.d.ts +32 -0
  79. package/dist/types/components/message/types.d.ts.map +1 -0
  80. package/dist/types/components/modal/types.d.ts +33 -0
  81. package/dist/types/components/modal/types.d.ts.map +1 -0
  82. package/dist/types/components/number/Number.d.ts +77 -0
  83. package/dist/types/components/number/Number.d.ts.map +1 -0
  84. package/dist/types/components/number/index.d.ts +9 -0
  85. package/dist/types/components/number/index.d.ts.map +1 -0
  86. package/dist/types/components/number/types.d.ts +12 -0
  87. package/dist/types/components/number/types.d.ts.map +1 -0
  88. package/dist/types/components/picker/index.d.ts +12 -0
  89. package/dist/types/components/picker/index.d.ts.map +1 -0
  90. package/dist/types/components/picker/picker.d.ts +237 -0
  91. package/dist/types/components/picker/picker.d.ts.map +1 -0
  92. package/dist/types/components/picker/types.d.ts +17 -0
  93. package/dist/types/components/picker/types.d.ts.map +1 -0
  94. package/dist/types/components/popup/index.d.ts +12 -0
  95. package/dist/types/components/popup/index.d.ts.map +1 -0
  96. package/dist/types/components/popup/popup.d.ts +71 -0
  97. package/dist/types/components/popup/popup.d.ts.map +1 -0
  98. package/dist/types/components/popup/types.d.ts +10 -0
  99. package/dist/types/components/popup/types.d.ts.map +1 -0
  100. package/dist/types/components/progress/index.d.ts +12 -0
  101. package/dist/types/components/progress/index.d.ts.map +1 -0
  102. package/dist/types/components/progress/progress.d.ts +36 -0
  103. package/dist/types/components/progress/progress.d.ts.map +1 -0
  104. package/dist/types/components/progress/types.d.ts +9 -0
  105. package/dist/types/components/progress/types.d.ts.map +1 -0
  106. package/dist/types/components/radioBox/index.d.ts +14 -0
  107. package/dist/types/components/radioBox/index.d.ts.map +1 -0
  108. package/dist/types/components/radioBox/radiobox-group.d.ts +31 -0
  109. package/dist/types/components/radioBox/radiobox-group.d.ts.map +1 -0
  110. package/dist/types/components/radioBox/radiobox.d.ts +38 -0
  111. package/dist/types/components/radioBox/radiobox.d.ts.map +1 -0
  112. package/dist/types/components/radioBox/types.d.ts +18 -0
  113. package/dist/types/components/radioBox/types.d.ts.map +1 -0
  114. package/dist/types/components/rater/index.d.ts +12 -0
  115. package/dist/types/components/rater/index.d.ts.map +1 -0
  116. package/dist/types/components/rater/raters.d.ts +83 -0
  117. package/dist/types/components/rater/raters.d.ts.map +1 -0
  118. package/dist/types/components/rater/types.d.ts +11 -0
  119. package/dist/types/components/rater/types.d.ts.map +1 -0
  120. package/dist/types/components/slideBar/index.d.ts +12 -0
  121. package/dist/types/components/slideBar/index.d.ts.map +1 -0
  122. package/dist/types/components/slideBar/slideBar.d.ts +46 -0
  123. package/dist/types/components/slideBar/slideBar.d.ts.map +1 -0
  124. package/dist/types/components/slideBar/types.d.ts +19 -0
  125. package/dist/types/components/slideBar/types.d.ts.map +1 -0
  126. package/dist/types/components/spinner/index.d.ts +12 -0
  127. package/dist/types/components/spinner/index.d.ts.map +1 -0
  128. package/dist/types/components/spinner/spinner.d.ts +36 -0
  129. package/dist/types/components/spinner/spinner.d.ts.map +1 -0
  130. package/dist/types/components/spinner/types.d.ts +7 -0
  131. package/dist/types/components/spinner/types.d.ts.map +1 -0
  132. package/dist/types/components/swipe/index.d.ts +12 -0
  133. package/dist/types/components/swipe/index.d.ts.map +1 -0
  134. package/dist/types/components/swipe/swipe.d.ts +99 -0
  135. package/dist/types/components/swipe/swipe.d.ts.map +1 -0
  136. package/dist/types/components/swipe/types.d.ts +20 -0
  137. package/dist/types/components/swipe/types.d.ts.map +1 -0
  138. package/dist/types/components/switchbar/index.d.ts +12 -0
  139. package/dist/types/components/switchbar/index.d.ts.map +1 -0
  140. package/dist/types/components/switchbar/switchbar.d.ts +38 -0
  141. package/dist/types/components/switchbar/switchbar.d.ts.map +1 -0
  142. package/dist/types/components/switchbar/types.d.ts +6 -0
  143. package/dist/types/components/switchbar/types.d.ts.map +1 -0
  144. package/dist/types/components/tab/index.d.ts +12 -0
  145. package/dist/types/components/tab/index.d.ts.map +1 -0
  146. package/dist/types/components/tab/tab.d.ts +54 -0
  147. package/dist/types/components/tab/tab.d.ts.map +1 -0
  148. package/dist/types/components/tab/types.d.ts +14 -0
  149. package/dist/types/components/tab/types.d.ts.map +1 -0
  150. package/dist/types/components/toTop/index.d.ts +12 -0
  151. package/dist/types/components/toTop/index.d.ts.map +1 -0
  152. package/dist/types/components/toTop/toTop.d.ts +18 -0
  153. package/dist/types/components/toTop/toTop.d.ts.map +1 -0
  154. package/dist/types/components/toTop/types.d.ts +7 -0
  155. package/dist/types/components/toTop/types.d.ts.map +1 -0
  156. package/dist/types/components/upload/index.d.ts +12 -0
  157. package/dist/types/components/upload/index.d.ts.map +1 -0
  158. package/dist/types/components/upload/types.d.ts +9 -0
  159. package/dist/types/components/upload/types.d.ts.map +1 -0
  160. package/dist/types/components/upload/upload.d.ts +19 -0
  161. package/dist/types/components/upload/upload.d.ts.map +1 -0
  162. package/dist/types/index.d.ts +157 -0
  163. package/dist/types/lib/MegaPixImage.d.ts +9 -0
  164. package/dist/types/lib/MegaPixImage.d.ts.map +1 -0
  165. package/dist/types/lib/lib.d.ts +3 -0
  166. package/dist/types/lib/lib.d.ts.map +1 -0
  167. package/dist/types/utils/util.d.ts +31 -0
  168. package/dist/types/utils/util.d.ts.map +1 -0
  169. package/dist-prod/91.05c8ec5277a15f939b0f.js +3 -0
  170. package/dist-prod/{91.e2fdec39667928bf57b9.js.map → 91.05c8ec5277a15f939b0f.js.map} +1 -1
  171. package/dist-prod/actionsheet.0d67b6b08a62cf9360be.chunk.js +2 -0
  172. package/dist-prod/actionsheet.0d67b6b08a62cf9360be.chunk.js.map +1 -0
  173. package/dist-prod/badge.16ab5c05734fe1530701.chunk.js +2 -0
  174. package/dist-prod/badge.16ab5c05734fe1530701.chunk.js.map +1 -0
  175. package/dist-prod/button.39ac33aa7aaccc24b6a1.chunk.js +2 -0
  176. package/dist-prod/button.39ac33aa7aaccc24b6a1.chunk.js.map +1 -0
  177. package/dist-prod/card.16ed7eafe471bcc60ec6.chunk.js +2 -0
  178. package/dist-prod/card.16ed7eafe471bcc60ec6.chunk.js.map +1 -0
  179. package/dist-prod/cell.70ff74fba57e27df7f5a.chunk.js +2 -0
  180. package/dist-prod/cell.70ff74fba57e27df7f5a.chunk.js.map +1 -0
  181. package/dist-prod/cellswipe.f3ec62abd60729d8bc5a.chunk.js +2 -0
  182. package/dist-prod/cellswipe.f3ec62abd60729d8bc5a.chunk.js.map +1 -0
  183. package/dist-prod/checkbox.05c63a947ac98293c9f2.chunk.js +2 -0
  184. package/dist-prod/checkbox.05c63a947ac98293c9f2.chunk.js.map +1 -0
  185. package/dist-prod/guide.24f1968a568f20fbc84b.chunk.js +2 -0
  186. package/dist-prod/guide.24f1968a568f20fbc84b.chunk.js.map +1 -0
  187. package/dist-prod/header.eb10433dd892738ee95a.chunk.js +2 -0
  188. package/dist-prod/header.eb10433dd892738ee95a.chunk.js.map +1 -0
  189. package/dist-prod/index.html +1 -1
  190. package/dist-prod/indicator.0c09e3f238791cb478e0.chunk.js +2 -0
  191. package/dist-prod/indicator.0c09e3f238791cb478e0.chunk.js.map +1 -0
  192. package/dist-prod/loadmore.9bad88767cc43603f473.chunk.js +2 -0
  193. package/dist-prod/loadmore.9bad88767cc43603f473.chunk.js.map +1 -0
  194. package/dist-prod/main.662ad15361e7f3d20234.js +2 -0
  195. package/dist-prod/main.662ad15361e7f3d20234.js.map +1 -0
  196. package/dist-prod/message.de17fea3de4daa70bab4.chunk.js +2 -0
  197. package/dist-prod/message.de17fea3de4daa70bab4.chunk.js.map +1 -0
  198. package/dist-prod/modal.f9ec857acd9fbdf53f3b.chunk.js +2 -0
  199. package/dist-prod/modal.f9ec857acd9fbdf53f3b.chunk.js.map +1 -0
  200. package/dist-prod/picker.bca059ef59e3c42a401f.chunk.js +2 -0
  201. package/dist-prod/picker.bca059ef59e3c42a401f.chunk.js.map +1 -0
  202. package/dist-prod/popup.538422c7e188363a468d.chunk.js +2 -0
  203. package/dist-prod/popup.538422c7e188363a468d.chunk.js.map +1 -0
  204. package/dist-prod/progress.240de4b633002f573030.chunk.js +2 -0
  205. package/dist-prod/progress.240de4b633002f573030.chunk.js.map +1 -0
  206. package/dist-prod/prompt.dcda0b05ea02d59106b7.chunk.js +2 -0
  207. package/dist-prod/prompt.dcda0b05ea02d59106b7.chunk.js.map +1 -0
  208. package/dist-prod/radiobox.7c10f77aba5ae04b2e5c.chunk.js +2 -0
  209. package/dist-prod/radiobox.7c10f77aba5ae04b2e5c.chunk.js.map +1 -0
  210. package/dist-prod/rater.d46ae462c598c458e5a8.chunk.js +2 -0
  211. package/dist-prod/rater.d46ae462c598c458e5a8.chunk.js.map +1 -0
  212. package/dist-prod/slidebar.833e75b9eb0abef92453.chunk.js +2 -0
  213. package/dist-prod/slidebar.833e75b9eb0abef92453.chunk.js.map +1 -0
  214. package/dist-prod/spinner.6afb4f84cc29f0e2f8eb.chunk.js +2 -0
  215. package/dist-prod/spinner.6afb4f84cc29f0e2f8eb.chunk.js.map +1 -0
  216. package/dist-prod/swipe.3fe6ee6638765ec52d94.chunk.js +2 -0
  217. package/dist-prod/swipe.3fe6ee6638765ec52d94.chunk.js.map +1 -0
  218. package/dist-prod/switchbar.f24c76a03120f1bd961a.chunk.js +2 -0
  219. package/dist-prod/switchbar.f24c76a03120f1bd961a.chunk.js.map +1 -0
  220. package/dist-prod/tab.29f19483f699b7811259.chunk.js +2 -0
  221. package/dist-prod/tab.29f19483f699b7811259.chunk.js.map +1 -0
  222. package/dist-prod/text.a6e4251f772d23843e2b.chunk.js +2 -0
  223. package/dist-prod/text.a6e4251f772d23843e2b.chunk.js.map +1 -0
  224. package/dist-prod/totop.713c5ab7f7dbcffbf2a3.chunk.js +2 -0
  225. package/dist-prod/totop.713c5ab7f7dbcffbf2a3.chunk.js.map +1 -0
  226. package/dist-prod/upload.0638581e551ed9afaba2.chunk.js +2 -0
  227. package/dist-prod/upload.0638581e551ed9afaba2.chunk.js.map +1 -0
  228. package/package.json +12 -3
  229. package/src/components/Indicator/Indicator.tsx +67 -0
  230. package/src/components/Indicator/index.ts +111 -0
  231. package/src/components/Indicator/types.ts +15 -0
  232. package/src/components/Text/index.ts +14 -0
  233. package/src/components/Text/textBar.tsx +104 -0
  234. package/src/components/Text/types.ts +13 -0
  235. package/src/components/actionSheet/actionSheet.d.ts +16 -0
  236. package/src/components/actionSheet/actionSheet.tsx +86 -0
  237. package/src/components/{action-sheet/index.js → actionSheet/index.ts} +1 -0
  238. package/src/components/actionSheet/types.ts +10 -0
  239. package/src/components/badge/{badge.vue → badge.tsx} +31 -31
  240. package/src/components/badge/index.ts +12 -0
  241. package/src/components/badge/types.ts +8 -0
  242. package/src/components/button/{button.vue → button.tsx} +46 -52
  243. package/src/components/button/index.ts +13 -0
  244. package/src/components/button/types.ts +13 -0
  245. package/src/components/card/card.d.ts +16 -0
  246. package/src/components/card/card.tsx +38 -0
  247. package/src/components/card/index.ts +12 -0
  248. package/src/components/card/types.ts +3 -0
  249. package/src/components/cell/cell.tsx +89 -0
  250. package/src/components/cell/index.ts +12 -0
  251. package/src/components/cell/types.ts +8 -0
  252. package/src/components/cellSwipe/cellSwipe.tsx +188 -0
  253. package/src/components/cellSwipe/index.ts +13 -0
  254. package/src/components/cellSwipe/types.ts +17 -0
  255. package/src/components/checkBox/checkbox-group.tsx +75 -0
  256. package/src/components/checkBox/checkbox.tsx +107 -0
  257. package/src/components/checkBox/index.ts +29 -0
  258. package/src/components/checkBox/types.ts +32 -0
  259. package/src/components/header/header.tsx +119 -0
  260. package/src/components/header/index.ts +13 -0
  261. package/src/components/header/types.ts +7 -0
  262. package/src/components/loadMore/index.ts +14 -0
  263. package/src/components/loadMore/loadMore.tsx +265 -0
  264. package/src/components/loadMore/types.ts +26 -0
  265. package/src/components/message/confirm.ts +104 -0
  266. package/src/components/message/{index.js → index.ts} +20 -18
  267. package/src/components/message/message.tsx +100 -0
  268. package/src/components/message/messageGroup.tsx +59 -0
  269. package/src/components/message/types.ts +48 -0
  270. package/src/components/modal/{confirm.js → confirm.ts} +8 -7
  271. package/src/components/modal/index.ts +68 -0
  272. package/src/components/modal/modal.tsx +248 -0
  273. package/src/components/modal/types.ts +51 -0
  274. package/src/components/number/Number.tsx +143 -0
  275. package/src/components/number/index.ts +10 -0
  276. package/src/components/number/types.ts +13 -0
  277. package/src/components/picker/index.ts +12 -0
  278. package/src/components/picker/picker.tsx +112 -0
  279. package/src/components/picker/types.ts +17 -0
  280. package/src/components/popup/index.ts +12 -0
  281. package/src/components/popup/popup.d.ts +16 -0
  282. package/src/components/popup/popup.tsx +68 -0
  283. package/src/components/popup/types.ts +9 -0
  284. package/src/components/progress/index.ts +12 -0
  285. package/src/components/progress/progress.tsx +81 -0
  286. package/src/components/progress/types.ts +9 -0
  287. package/src/components/prompt/{confirm.js → confirm.ts} +27 -14
  288. package/src/components/prompt/index.ts +50 -0
  289. package/src/components/prompt/prompt.tsx +161 -0
  290. package/src/components/prompt/types.ts +45 -0
  291. package/src/components/radioBox/index.ts +34 -0
  292. package/src/components/radioBox/radiobox-group.tsx +66 -0
  293. package/src/components/radioBox/radiobox.tsx +115 -0
  294. package/src/components/radioBox/types.ts +24 -0
  295. package/src/components/rater/index.ts +12 -0
  296. package/src/components/rater/rater.d.ts +16 -0
  297. package/src/components/rater/raters.tsx +101 -0
  298. package/src/components/rater/types.ts +10 -0
  299. package/src/components/slideBar/index.ts +13 -0
  300. package/src/components/slideBar/slideBar.tsx +288 -0
  301. package/src/components/slideBar/types.ts +20 -0
  302. package/src/components/spinner/index.ts +13 -0
  303. package/src/components/spinner/spinner.tsx +85 -0
  304. package/src/components/spinner/types.ts +20 -0
  305. package/src/components/swipe/index.ts +13 -0
  306. package/src/components/swipe/swipe.tsx +292 -0
  307. package/src/components/swipe/types.ts +21 -0
  308. package/src/components/switchbar/index.ts +13 -0
  309. package/src/components/switchbar/switchbar.tsx +58 -0
  310. package/src/components/switchbar/types.ts +6 -0
  311. package/src/components/tab/index.ts +12 -0
  312. package/src/components/tab/tab.tsx +71 -0
  313. package/src/components/tab/types.ts +15 -0
  314. package/src/components/toTop/index.ts +13 -0
  315. package/src/components/toTop/toTop.tsx +54 -0
  316. package/src/components/toTop/types.ts +7 -0
  317. package/src/components/upload/index.ts +13 -0
  318. package/src/components/upload/types.ts +9 -0
  319. package/src/components/upload/upload.tsx +180 -0
  320. package/src/index.ts +175 -0
  321. package/src/lib/MegaPixImage.js +1 -0
  322. package/src/{main.js → main.ts} +4 -2
  323. package/src/shims-vue.d.ts +37 -0
  324. package/src/styles/components/radioBox.less +5 -1
  325. package/src/styles/components/rater.less +16 -0
  326. package/src/styles/index.less +1 -0
  327. package/src/types/index.d.ts +157 -0
  328. package/src/types/js-shims.d.ts +36 -0
  329. package/src/utils/test.ts +2 -0
  330. package/src/utils/util.ts +168 -0
  331. package/src/utils/{util.js → util1.js} +2 -2
  332. package/src/views/ActionSheet.vue +7 -7
  333. package/src/views/Badge/Badge.less +12 -0
  334. package/src/views/Badge/Badge.tsx +23 -0
  335. package/src/views/Badge.vue +4 -2
  336. package/src/views/Button.vue +17 -17
  337. package/src/views/Card.vue +2 -1
  338. package/src/views/Cell.vue +6 -5
  339. package/src/views/CellSwipe.vue +51 -39
  340. package/src/views/CheckBox.vue +7 -6
  341. package/src/views/Header.vue +8 -7
  342. package/src/views/Indicator.vue +15 -15
  343. package/src/views/LoadMore.vue +13 -10
  344. package/src/views/Message.vue +14 -14
  345. package/src/views/Modal.vue +10 -10
  346. package/src/views/Picker.vue +19 -17
  347. package/src/views/Popup.vue +47 -41
  348. package/src/views/Progress.vue +8 -6
  349. package/src/views/Prompt.vue +5 -5
  350. package/src/views/RadioBox.vue +6 -4
  351. package/src/views/Rater.vue +7 -3
  352. package/src/views/SlideBar.vue +9 -5
  353. package/src/views/Spinner.vue +17 -5
  354. package/src/views/Swipe.vue +5 -3
  355. package/src/views/SwitchBar.vue +6 -4
  356. package/src/views/Tab.vue +8 -6
  357. package/src/views/Text.vue +14 -10
  358. package/src/views/ToTop.vue +19 -5
  359. package/src/views/Upload.vue +8 -4
  360. package/tsconfig.build.json +30 -0
  361. package/tsconfig.json +39 -0
  362. package/webpack.base.config.js +22 -2
  363. package/webpack.dev.config.js +2 -1
  364. package/webpack.dist.dev.config.js +3 -2
  365. package/webpack.dist.prod.config.js +3 -2
  366. package/webpack.prod.config.js +2 -1
  367. package/dist-prod/91.e2fdec39667928bf57b9.js +0 -3
  368. package/dist-prod/actionsheet.e2f7c32d0120f5147a4f.chunk.js +0 -2
  369. package/dist-prod/actionsheet.e2f7c32d0120f5147a4f.chunk.js.map +0 -1
  370. package/dist-prod/badge.6038c4ccc54ffb56a645.chunk.js +0 -2
  371. package/dist-prod/badge.6038c4ccc54ffb56a645.chunk.js.map +0 -1
  372. package/dist-prod/button.28b491339fbba29c3f16.chunk.js +0 -2
  373. package/dist-prod/button.28b491339fbba29c3f16.chunk.js.map +0 -1
  374. package/dist-prod/card.3ad847f07bebc1391125.chunk.js +0 -2
  375. package/dist-prod/card.3ad847f07bebc1391125.chunk.js.map +0 -1
  376. package/dist-prod/cell.8920796a9ebd2d84bbd3.chunk.js +0 -2
  377. package/dist-prod/cell.8920796a9ebd2d84bbd3.chunk.js.map +0 -1
  378. package/dist-prod/cellswipe.04240414bed39e28e7b9.chunk.js +0 -2
  379. package/dist-prod/cellswipe.04240414bed39e28e7b9.chunk.js.map +0 -1
  380. package/dist-prod/checkbox.87403976981ee0f64f4a.chunk.js +0 -2
  381. package/dist-prod/checkbox.87403976981ee0f64f4a.chunk.js.map +0 -1
  382. package/dist-prod/guide.5195c74796a7a0e37f7b.chunk.js +0 -2
  383. package/dist-prod/guide.5195c74796a7a0e37f7b.chunk.js.map +0 -1
  384. package/dist-prod/header.e3cecc6d60f801c1c105.chunk.js +0 -2
  385. package/dist-prod/header.e3cecc6d60f801c1c105.chunk.js.map +0 -1
  386. package/dist-prod/indicator.6b0c7a91ca254c3586e8.chunk.js +0 -2
  387. package/dist-prod/indicator.6b0c7a91ca254c3586e8.chunk.js.map +0 -1
  388. package/dist-prod/loadmore.ba86c35311fc68ee215b.chunk.js +0 -2
  389. package/dist-prod/loadmore.ba86c35311fc68ee215b.chunk.js.map +0 -1
  390. package/dist-prod/main.717f5c8b51911571fb82.js +0 -2
  391. package/dist-prod/main.717f5c8b51911571fb82.js.map +0 -1
  392. package/dist-prod/message.e57fa263a214006f7191.chunk.js +0 -2
  393. package/dist-prod/message.e57fa263a214006f7191.chunk.js.map +0 -1
  394. package/dist-prod/modal.1172c8ba7d90503fc8e8.chunk.js +0 -2
  395. package/dist-prod/modal.1172c8ba7d90503fc8e8.chunk.js.map +0 -1
  396. package/dist-prod/picker.4ff114161c5c3f8df57a.chunk.js +0 -2
  397. package/dist-prod/picker.4ff114161c5c3f8df57a.chunk.js.map +0 -1
  398. package/dist-prod/popup.8f92c027932e4d47fa59.chunk.js +0 -2
  399. package/dist-prod/popup.8f92c027932e4d47fa59.chunk.js.map +0 -1
  400. package/dist-prod/progress.1e0d785044aecadc5615.chunk.js +0 -2
  401. package/dist-prod/progress.1e0d785044aecadc5615.chunk.js.map +0 -1
  402. package/dist-prod/prompt.c2b442c3dd0e6d8319bc.chunk.js +0 -2
  403. package/dist-prod/prompt.c2b442c3dd0e6d8319bc.chunk.js.map +0 -1
  404. package/dist-prod/radiobox.479703c69b75d473e85d.chunk.js +0 -2
  405. package/dist-prod/radiobox.479703c69b75d473e85d.chunk.js.map +0 -1
  406. package/dist-prod/rater.939e0e7e770728f684c3.chunk.js +0 -2
  407. package/dist-prod/rater.939e0e7e770728f684c3.chunk.js.map +0 -1
  408. package/dist-prod/slidebar.d7ad5de495550613661f.chunk.js +0 -2
  409. package/dist-prod/slidebar.d7ad5de495550613661f.chunk.js.map +0 -1
  410. package/dist-prod/spinner.f20e3bd8cec27d26afe0.chunk.js +0 -2
  411. package/dist-prod/spinner.f20e3bd8cec27d26afe0.chunk.js.map +0 -1
  412. package/dist-prod/swipe.75b7d741be73c0064982.chunk.js +0 -2
  413. package/dist-prod/swipe.75b7d741be73c0064982.chunk.js.map +0 -1
  414. package/dist-prod/switchbar.56d03d96c275ff4c65a1.chunk.js +0 -2
  415. package/dist-prod/switchbar.56d03d96c275ff4c65a1.chunk.js.map +0 -1
  416. package/dist-prod/tab.4c391211c41b7d12b585.chunk.js +0 -2
  417. package/dist-prod/tab.4c391211c41b7d12b585.chunk.js.map +0 -1
  418. package/dist-prod/text.ee2804ba87e6a460aa7d.chunk.js +0 -2
  419. package/dist-prod/text.ee2804ba87e6a460aa7d.chunk.js.map +0 -1
  420. package/dist-prod/totop.c6f9dce152bb6abe5cb2.chunk.js +0 -2
  421. package/dist-prod/totop.c6f9dce152bb6abe5cb2.chunk.js.map +0 -1
  422. package/dist-prod/upload.a9b44c8a72fe70980a1e.chunk.js +0 -2
  423. package/dist-prod/upload.a9b44c8a72fe70980a1e.chunk.js.map +0 -1
  424. package/src/components/Indicator/index.js +0 -86
  425. package/src/components/Text/Number.vue +0 -167
  426. package/src/components/Text/index.js +0 -7
  427. package/src/components/Text/textBar.vue +0 -122
  428. package/src/components/action-sheet/actionSheet.vue +0 -98
  429. package/src/components/badge/index.js +0 -5
  430. package/src/components/button/index.js +0 -5
  431. package/src/components/card/card.vue +0 -49
  432. package/src/components/card/index.js +0 -5
  433. package/src/components/cell/cell.vue +0 -113
  434. package/src/components/cell/index.js +0 -5
  435. package/src/components/cell-swipe/cell-swipe.vue +0 -168
  436. package/src/components/cell-swipe/index.js +0 -5
  437. package/src/components/checkBox/checkbox-group.vue +0 -74
  438. package/src/components/checkBox/checkbox.vue +0 -117
  439. package/src/components/checkBox/index.js +0 -8
  440. package/src/components/header/header.vue +0 -131
  441. package/src/components/header/index.js +0 -5
  442. package/src/components/loadMore/index.js +0 -5
  443. package/src/components/loadMore/loadmore.vue +0 -258
  444. package/src/components/message/confirm.js +0 -60
  445. package/src/components/message/message.vue +0 -137
  446. package/src/components/message/messageGroup.vue +0 -82
  447. package/src/components/modal/index.js +0 -52
  448. package/src/components/modal/modal.vue +0 -138
  449. package/src/components/picker/index.js +0 -5
  450. package/src/components/picker/picker.vue +0 -111
  451. package/src/components/popup/index.js +0 -5
  452. package/src/components/popup/popup.vue +0 -91
  453. package/src/components/progress/index.js +0 -5
  454. package/src/components/progress/progress.vue +0 -86
  455. package/src/components/prompt/index.js +0 -53
  456. package/src/components/prompt/prompt.vue +0 -125
  457. package/src/components/radioBox/index.js +0 -8
  458. package/src/components/rater/index.js +0 -5
  459. package/src/components/rater/rater.vue +0 -118
  460. package/src/components/slideBar/index.js +0 -6
  461. package/src/components/slideBar/slideBar.vue +0 -225
  462. package/src/components/spinner/index.js +0 -5
  463. package/src/components/spinner/spinner.vue +0 -78
  464. package/src/components/swipe/index.js +0 -5
  465. package/src/components/swipe/swipe.vue +0 -289
  466. package/src/components/switchbar/index.js +0 -5
  467. package/src/components/switchbar/switchbar.vue +0 -79
  468. package/src/components/tab/index.js +0 -6
  469. package/src/components/tab/tab.vue +0 -89
  470. package/src/components/toTop/index.js +0 -5
  471. package/src/components/toTop/topTop.vue +0 -78
  472. package/src/components/upload/index.js +0 -5
  473. package/src/components/upload/upload.vue +0 -166
  474. package/src/index.js +0 -149
  475. /package/dist-prod/{91.e2fdec39667928bf57b9.js.LICENSE.txt → 91.05c8ec5277a15f939b0f.js.LICENSE.txt} +0 -0
  476. /package/src/components/radioBox/{radiobox-group.vue → radiobox-group1.vue} +0 -0
  477. /package/src/components/radioBox/{radiobox.vue → radiobox1.vue} +0 -0
  478. /package/src/{router.js → router.ts} +0 -0
@@ -0,0 +1,168 @@
1
+ // utils.ts
2
+ import type { ComponentPublicInstance } from 'vue'
3
+
4
+ /** 驼峰转连字符 */
5
+ export function camelcaseToHyphen(str: string): string {
6
+ return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()
7
+ }
8
+
9
+ /** 向上查找组件 */
10
+ export function findComponentUpward(
11
+ content: ComponentPublicInstance,
12
+ componentName: string | string[],
13
+ ): ComponentPublicInstance | null {
14
+ const componentNames = typeof componentName === 'string' ? [componentName] : componentName
15
+
16
+ let parent = content.$parent
17
+ let name = parent?.$options.name
18
+
19
+ while (parent && (!name || componentNames.indexOf(name) < 0)) {
20
+ parent = parent.$parent
21
+ name = parent?.$options.name
22
+ }
23
+
24
+ return parent ?? null
25
+ }
26
+
27
+ /** 向下查找第一个匹配组件 */
28
+ export function findComponentDownward(
29
+ content: ComponentPublicInstance,
30
+ componentName: string,
31
+ ): ComponentPublicInstance | null {
32
+ const childrens = (content as any).$children as ComponentPublicInstance[]
33
+ let children: ComponentPublicInstance | null = null
34
+
35
+ for (let i = 0; i < childrens.length; i++) {
36
+ const child = childrens[i]
37
+ const name = child.$options.name
38
+ if (name === componentName) {
39
+ children = child
40
+ break
41
+ } else {
42
+ children = findComponentDownward(child, componentName)
43
+ if (children) break
44
+ }
45
+ }
46
+
47
+ return children
48
+ }
49
+
50
+ /** 向下查找所有匹配组件 */
51
+ export function findComponentsDownward(
52
+ content: ComponentPublicInstance,
53
+ componentName: string,
54
+ components: ComponentPublicInstance[] = []
55
+ ): ComponentPublicInstance[] {
56
+ const childrens = (content as any).$children as ComponentPublicInstance[]
57
+ childrens.forEach(child => {
58
+ const name = child.$options.name
59
+ const childs = (child as any).$children as ComponentPublicInstance[]
60
+
61
+ if (name === componentName) components.push(child)
62
+ if (childs.length) {
63
+ findComponentsDownward(child, componentName, components)
64
+ }
65
+ })
66
+
67
+ return components
68
+ }
69
+
70
+ /** 生成随机字符串 */
71
+ export function randomStr(len = 32): string {
72
+ const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
73
+ let str = ''
74
+ const max = chars.length
75
+ for (let i = 0; i < len; i++) {
76
+ str += chars.charAt(Math.floor(Math.random() * max))
77
+ }
78
+ return str
79
+ }
80
+
81
+ /** JPEG 编码器(any 处理) */
82
+ export const JPEG: { JPEGEncoder: any } = {
83
+ JPEGEncoder: function (a: any) { /* 原始算法保持 any */ }
84
+ }
85
+
86
+ /** 滚动到指定位置 */
87
+ export function scrollTop(
88
+ el: HTMLElement | Window,
89
+ from = 0,
90
+ to: number,
91
+ duration = 500
92
+ ) {
93
+ if (!window.requestAnimationFrame) {
94
+ window.requestAnimationFrame = (
95
+ window.requestAnimationFrame ||
96
+ function (callback) {
97
+ return window.setTimeout(callback, 1000 / 60)
98
+ }
99
+ )
100
+ }
101
+
102
+ const difference = Math.abs(from - to)
103
+ const step = Math.ceil(difference / duration * 50)
104
+
105
+ function scroll(start: number, end: number, step: number) {
106
+ if (start === end) return
107
+
108
+ let d = start < end ? Math.min(start + step, end) : Math.max(start - step, end)
109
+
110
+ if (el === window) {
111
+ window.scrollTo(d, d)
112
+ } else {
113
+ (el as HTMLElement).scrollTop = d
114
+ }
115
+
116
+ window.requestAnimationFrame(() => scroll(d, end, step))
117
+ }
118
+
119
+ scroll(from, to, step)
120
+ }
121
+
122
+ /** Cookie 操作 */
123
+ interface CookieOptions {
124
+ path?: string
125
+ expire?: number
126
+ [key: string]: any
127
+ }
128
+
129
+ export const cookieStorage = {
130
+ getItem(key?: string): string | Record<string, string> | null {
131
+ let result: any = {}
132
+ const cookies = document.cookie ? document.cookie.split('; ') : []
133
+ const decodes = /(%[0-9A-Z]{2})+/g
134
+
135
+ for (const cookie of cookies) {
136
+ const parts = cookie.split('=')
137
+ let name = parts.shift()!
138
+ let value = parts.join('=')
139
+
140
+ name = name.replace(decodes, decodeURIComponent)
141
+ value = value.replace(decodes, decodeURIComponent)
142
+
143
+ if (name === key) return value
144
+ if (!key) result[name] = value
145
+ }
146
+
147
+ return !key ? result : null
148
+ },
149
+
150
+ removeItem(key: string, options: CookieOptions = {}) {
151
+ const opts = Object.assign({ path: '/', expire: -1 }, options)
152
+ this.setItem(key, '', opts)
153
+ },
154
+
155
+ key(index: number): string {
156
+ const cookies = document.cookie ? document.cookie.split(/;\s*/) : []
157
+ if (index < 0 || index >= cookies.length) return ''
158
+ return cookies[index].split('=').shift()!
159
+ },
160
+
161
+ setItem(key: string, value: string, options: CookieOptions = {}) {
162
+ const opts = Object.assign({ path: '/' }, options)
163
+ let cookieStr = encodeURIComponent(key) + '=' + encodeURIComponent(value)
164
+ if (opts.expire) cookieStr += '; expires=' + new Date(opts.expire).toUTCString()
165
+ if (opts.path) cookieStr += '; path=' + opts.path
166
+ document.cookie = cookieStr
167
+ }
168
+ }
@@ -83,8 +83,8 @@ export function randomStr () {
83
83
  }
84
84
 
85
85
  export const JPEG = {
86
- // eslint-disable-next-line no-unused-expressions, no-sequences, eqeqeq, no-array-constructor, no-return-assign
87
- JPEGEncoder: function (a) { function I (a) { let c; let i; let j; let k; let l; let m; let n; let o; let p; const b = [16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99]; for (c = 0; c < 64; c++)i = d((b[c] * a + 50) / 100), i < 1 ? i = 1 : i > 255 && (i = 255), e[z[c]] = i; for (j = [17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99], k = 0; k < 64; k++)l = d((j[k] * a + 50) / 100), l < 1 ? l = 1 : l > 255 && (l = 255), f[z[k]] = l; for (m = [1, 1.387039845, 1.306562965, 1.175875602, 1, 0.785694958, 0.5411961, 0.275899379], n = 0, o = 0; o < 8; o++) for (p = 0; p < 8; p++)g[n] = 1 / (8 * e[z[n]] * m[o] * m[p]), h[n] = 1 / (8 * f[z[n]] * m[o] * m[p]), n++ } function J (a, b) { let f; let g; let c = 0; let d = 0; const e = []; for (f = 1; f <= 16; f++) { for (g = 1; g <= a[f]; g++)e[b[d]] = [], e[b[d]][0] = c, e[b[d]][1] = f, d++, c++; c *= 2 } return e } function K () { i = J(A, B), j = J(E, F), k = J(C, D), l = J(G, H) } function L () { let c; let d; let e; let a = 1; let b = 2; for (c = 1; c <= 15; c++) { for (d = a; b > d; d++)n[32767 + d] = c, m[32767 + d] = [], m[32767 + d][1] = c, m[32767 + d][0] = d; for (e = -(b - 1); -a >= e; e++)n[32767 + e] = c, m[32767 + e] = [], m[32767 + e][1] = c, m[32767 + e][0] = b - 1 + e; a <<= 1, b <<= 1 } } function M () { for (let a = 0; a < 256; a++)x[a] = 19595 * a, x[a + 256 >> 0] = 38470 * a, x[a + 512 >> 0] = 7471 * a + 32768, x[a + 768 >> 0] = -11059 * a, x[a + 1024 >> 0] = -21709 * a, x[a + 1280 >> 0] = 32768 * a + 8421375, x[a + 1536 >> 0] = -27439 * a, x[a + 1792 >> 0] = -5329 * a } function N (a) { for (let b = a[0], c = a[1] - 1; c >= 0;)b & 1 << c && (r |= 1 << s), c--, s--, s < 0 && (r == 255 ? (O(255), O(0)) : O(r), s = 7, r = 0) } function O (a) { q.push(w[a]) } function P (a) { O(255 & a >> 8), O(255 & a) } function Q (a, b) { let c; let d; let e; let f; let g; let h; let i; let j; let l; let p; let q; let r; let s; let t; let u; let v; let w; let x; let y; let z; let A; let B; let C; let D; let E; let F; let G; let H; let I; let J; let K; let L; let M; let N; let O; let P; let Q; let R; let S; let T; let U; let V; let W; let X; let Y; let Z; let $; let _; let k = 0; const m = 8; const n = 64; for (l = 0; m > l; ++l)c = a[k], d = a[k + 1], e = a[k + 2], f = a[k + 3], g = a[k + 4], h = a[k + 5], i = a[k + 6], j = a[k + 7], p = c + j, q = c - j, r = d + i, s = d - i, t = e + h, u = e - h, v = f + g, w = f - g, x = p + v, y = p - v, z = r + t, A = r - t, a[k] = x + z, a[k + 4] = x - z, B = 0.707106781 * (A + y), a[k + 2] = y + B, a[k + 6] = y - B, x = w + u, z = u + s, A = s + q, C = 0.382683433 * (x - A), D = 0.5411961 * x + C, E = 1.306562965 * A + C, F = 0.707106781 * z, G = q + F, H = q - F, a[k + 5] = H + D, a[k + 3] = H - D, a[k + 1] = G + E, a[k + 7] = G - E, k += 8; for (k = 0, l = 0; m > l; ++l)c = a[k], d = a[k + 8], e = a[k + 16], f = a[k + 24], g = a[k + 32], h = a[k + 40], i = a[k + 48], j = a[k + 56], I = c + j, J = c - j, K = d + i, L = d - i, M = e + h, N = e - h, O = f + g, P = f - g, Q = I + O, R = I - O, S = K + M, T = K - M, a[k] = Q + S, a[k + 32] = Q - S, U = 0.707106781 * (T + R), a[k + 16] = R + U, a[k + 48] = R - U, Q = P + N, S = N + L, T = L + J, V = 0.382683433 * (Q - T), W = 0.5411961 * Q + V, X = 1.306562965 * T + V, Y = 0.707106781 * S, Z = J + Y, $ = J - Y, a[k + 40] = $ + W, a[k + 24] = $ - W, a[k + 8] = Z + X, a[k + 56] = Z - X, k++; for (l = 0; n > l; ++l)_ = a[l] * b[l], o[l] = _ > 0 ? 0 | _ + 0.5 : 0 | _ - 0.5; return o } function R () { P(65504), P(16), O(74), O(70), O(73), O(70), O(0), O(1), O(1), O(0), P(1), P(1), O(0), O(0) } function S (a, b) { P(65472), P(17), O(8), P(b), P(a), O(3), O(1), O(17), O(0), O(2), O(17), O(1), O(3), O(17), O(1) } function T () { let a, b; for (P(65499), P(132), O(0), a = 0; a < 64; a++)O(e[a]); for (O(1), b = 0; b < 64; b++)O(f[b]) } function U () { let a, b, c, d, e, f, g, h; for (P(65476), P(418), O(0), a = 0; a < 16; a++)O(A[a + 1]); for (b = 0; b <= 11; b++)O(B[b]); for (O(16), c = 0; c < 16; c++)O(C[c + 1]); for (d = 0; d <= 161; d++)O(D[d]); for (O(1), e = 0; e < 16; e++)O(E[e + 1]); for (f = 0; f <= 11; f++)O(F[f]); for (O(17), g = 0; g < 16; g++)O(G[g + 1]); for (h = 0; h <= 161; h++)O(H[h]) } function V () { P(65498), P(12), O(3), O(1), O(0), O(2), O(17), O(3), O(17), O(0), O(63), O(0) } function W (a, b, c, d, e) { let h; let l; let o; let q; let r; let s; let t; let u; let v; let w; const f = e[0]; const g = e[240]; const i = 16; const j = 63; const k = 64; for (l = Q(a, b), o = 0; k > o; ++o)p[z[o]] = l[o]; for (q = p[0] - c, c = p[0], q == 0 ? N(d[0]) : (h = 32767 + q, N(d[n[h]]), N(m[h])), r = 63; r > 0 && p[r] == 0; r--);if (r == 0) return N(f), c; for (s = 1; r >= s;) { for (u = s; p[s] == 0 && r >= s; ++s);if (v = s - u, v >= i) { for (t = v >> 4, w = 1; t >= w; ++w)N(g); v = 15 & v }h = 32767 + p[s], N(e[(v << 4) + n[h]]), N(m[h]), s++ } return r != j && N(f), c } function X () { let b; const a = String.fromCharCode; for (b = 0; b < 256; b++)w[b] = a(b) } function Y (a) { if (a <= 0 && (a = 1), a > 100 && (a = 100), y != a) { let b = 0; b = a < 50 ? Math.floor(5e3 / a) : Math.floor(200 - 2 * a), I(b), y = a, console.log('Quality set to: ' + a + '%') } } function Z () { let c; const b = (new Date()).getTime(); a || (a = 50), X(), K(), L(), M(), Y(a), c = (new Date()).getTime() - b, console.log('Initialization ' + c + 'ms') } let d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H; Math.round, d = Math.floor, e = new Array(64), f = new Array(64), g = new Array(64), h = new Array(64), m = new Array(65535), n = new Array(65535), o = new Array(64), p = new Array(64), q = [], r = 0, s = 7, t = new Array(64), u = new Array(64), v = new Array(64), w = new Array(256), x = new Array(2048), z = [0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63], A = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0], B = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], C = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125], D = [1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250], E = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], F = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], G = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119], H = [0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97, 113, 19, 34, 50, 129, 8, 20, 66, 145, 161, 177, 193, 9, 35, 51, 82, 240, 21, 98, 114, 209, 10, 22, 36, 52, 225, 37, 241, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 130, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 226, 227, 228, 229, 230, 231, 232, 233, 234, 242, 243, 244, 245, 246, 247, 248, 249, 250], this.encode = function (a, b) { let d; let e; let f; let m; let n; let o; let p; let y; let z; let A; let B; let C; let D; let E; let F; let G; let H; let I; let J; let K; const c = (new Date()).getTime(); for (b && Y(b), q = new Array(), r = 0, s = 7, P(65496), R(), T(), S(a.width, a.height), U(), V(), d = 0, e = 0, f = 0, r = 0, s = 7, this.encode.displayName = '_encode_', m = a.data, n = a.width, o = a.height, p = 4 * n, z = 0; o > z;) { for (y = 0; p > y;) { for (D = p * z + y, E = D, F = -1, G = 0, H = 0; H < 64; H++)G = H >> 3, F = 4 * (7 & H), E = D + G * p + F, z + G >= o && (E -= p * (z + 1 + G - o)), y + F >= p && (E -= y + F - p + 4), A = m[E++], B = m[E++], C = m[E++], t[H] = (x[A] + x[B + 256 >> 0] + x[C + 512 >> 0] >> 16) - 128, u[H] = (x[A + 768 >> 0] + x[B + 1024 >> 0] + x[C + 1280 >> 0] >> 16) - 128, v[H] = (x[A + 1280 >> 0] + x[B + 1536 >> 0] + x[C + 1792 >> 0] >> 16) - 128; d = W(t, g, d, i, k), e = W(u, h, e, j, l), f = W(v, h, f, j, l), y += 32 }z += 8 } return s >= 0 && (I = [], I[1] = s + 1, I[0] = (1 << s + 1) - 1, N(I)), P(65497), J = 'data:image/jpeg;base64,' + btoa(q.join('')), q = [], K = (new Date()).getTime() - c, console.log('Encoding time: ' + K + 'ms'), J }, Z() }
86
+ // eslint-disable-next-line no-unused-expressions, no-sequences, eqeqeq, no-array-constructor, no-return-assign, @typescript-eslint/no-unused-expressions
87
+ JPEGEncoder: function (a) { function I (a) { let c; let i; let j; let k; let l; let m; let n; let o; let p; const b = [16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99]; for (c = 0; c < 64; c++)i = d((b[c] * a + 50) / 100), i < 1 ? i = 1 : i > 255 && (i = 255), e[z[c]] = i; for (j = [17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, 47, 66, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99], k = 0; k < 64; k++)l = d((j[k] * a + 50) / 100), l < 1 ? l = 1 : l > 255 && (l = 255), f[z[k]] = l; for (m = [1, 1.387039845, 1.306562965, 1.175875602, 1, 0.785694958, 0.5411961, 0.275899379], n = 0, o = 0; o < 8; o++) for (p = 0; p < 8; p++)g[n] = 1 / (8 * e[z[n]] * m[o] * m[p]), h[n] = 1 / (8 * f[z[n]] * m[o] * m[p]), n++ } function J (a, b) { let f; let g; let c = 0; let d = 0; const e = []; for (f = 1; f <= 16; f++) { for (g = 1; g <= a[f]; g++)e[b[d]] = [], e[b[d]][0] = c, e[b[d]][1] = f, d++, c++; c *= 2 } return e } function K () { i = J(A, B), j = J(E, F), k = J(C, D), l = J(G, H) } function L () { let c; let d; let e; let a = 1; let b = 2; for (c = 1; c <= 15; c++) { for (d = a; b > d; d++)n[32767 + d] = c, m[32767 + d] = [], m[32767 + d][1] = c, m[32767 + d][0] = d; for (e = -(b - 1); -a >= e; e++)n[32767 + e] = c, m[32767 + e] = [], m[32767 + e][1] = c, m[32767 + e][0] = b - 1 + e; a <<= 1, b <<= 1 } } function M () { for (let a = 0; a < 256; a++)x[a] = 19595 * a, x[a + 256 >> 0] = 38470 * a, x[a + 512 >> 0] = 7471 * a + 32768, x[a + 768 >> 0] = -11059 * a, x[a + 1024 >> 0] = -21709 * a, x[a + 1280 >> 0] = 32768 * a + 8421375, x[a + 1536 >> 0] = -27439 * a, x[a + 1792 >> 0] = -5329 * a } function N (a) { for (let b = a[0], c = a[1] - 1; c >= 0;)b & 1 << c && (r |= 1 << s), c--, s--, s < 0 && (r == 255 ? (O(255), O(0)) : O(r), s = 7, r = 0) } function O (a) { q.push(w[a]) } function P (a) { O(255 & a >> 8), O(255 & a) } function Q (a, b) { let c; let d; let e; let f; let g; let h; let i; let j; let l; let p; let q; let r; let s; let t; let u; let v; let w; let x; let y; let z; let A; let B; let C; let D; let E; let F; let G; let H; let I; let J; let K; let L; let M; let N; let O; let P; let Q; let R; let S; let T; let U; let V; let W; let X; let Y; let Z; let $; let _; let k = 0; const m = 8; const n = 64; for (l = 0; m > l; ++l)c = a[k], d = a[k + 1], e = a[k + 2], f = a[k + 3], g = a[k + 4], h = a[k + 5], i = a[k + 6], j = a[k + 7], p = c + j, q = c - j, r = d + i, s = d - i, t = e + h, u = e - h, v = f + g, w = f - g, x = p + v, y = p - v, z = r + t, A = r - t, a[k] = x + z, a[k + 4] = x - z, B = 0.707106781 * (A + y), a[k + 2] = y + B, a[k + 6] = y - B, x = w + u, z = u + s, A = s + q, C = 0.382683433 * (x - A), D = 0.5411961 * x + C, E = 1.306562965 * A + C, F = 0.707106781 * z, G = q + F, H = q - F, a[k + 5] = H + D, a[k + 3] = H - D, a[k + 1] = G + E, a[k + 7] = G - E, k += 8; for (k = 0, l = 0; m > l; ++l)c = a[k], d = a[k + 8], e = a[k + 16], f = a[k + 24], g = a[k + 32], h = a[k + 40], i = a[k + 48], j = a[k + 56], I = c + j, J = c - j, K = d + i, L = d - i, M = e + h, N = e - h, O = f + g, P = f - g, Q = I + O, R = I - O, S = K + M, T = K - M, a[k] = Q + S, a[k + 32] = Q - S, U = 0.707106781 * (T + R), a[k + 16] = R + U, a[k + 48] = R - U, Q = P + N, S = N + L, T = L + J, V = 0.382683433 * (Q - T), W = 0.5411961 * Q + V, X = 1.306562965 * T + V, Y = 0.707106781 * S, Z = J + Y, $ = J - Y, a[k + 40] = $ + W, a[k + 24] = $ - W, a[k + 8] = Z + X, a[k + 56] = Z - X, k++; for (l = 0; n > l; ++l)_ = a[l] * b[l], o[l] = _ > 0 ? 0 | _ + 0.5 : 0 | _ - 0.5; return o } function R () { P(65504), P(16), O(74), O(70), O(73), O(70), O(0), O(1), O(1), O(0), P(1), P(1), O(0), O(0) } function S (a, b) { P(65472), P(17), O(8), P(b), P(a), O(3), O(1), O(17), O(0), O(2), O(17), O(1), O(3), O(17), O(1) } function T () { let a, b; for (P(65499), P(132), O(0), a = 0; a < 64; a++)O(e[a]); for (O(1), b = 0; b < 64; b++)O(f[b]) } function U () { let a, b, c, d, e, f, g, h; for (P(65476), P(418), O(0), a = 0; a < 16; a++)O(A[a + 1]); for (b = 0; b <= 11; b++)O(B[b]); for (O(16), c = 0; c < 16; c++)O(C[c + 1]); for (d = 0; d <= 161; d++)O(D[d]); for (O(1), e = 0; e < 16; e++)O(E[e + 1]); for (f = 0; f <= 11; f++)O(F[f]); for (O(17), g = 0; g < 16; g++)O(G[g + 1]); for (h = 0; h <= 161; h++)O(H[h]) } function V () { P(65498), P(12), O(3), O(1), O(0), O(2), O(17), O(3), O(17), O(0), O(63), O(0) } function W (a, b, c, d, e) { let h; let l; let o; let q; let r; let s; let t; let u; let v; let w; const f = e[0]; const g = e[240]; const i = 16; const j = 63; const k = 64; for (l = Q(a, b), o = 0; k > o; ++o)p[z[o]] = l[o]; for (q = p[0] - c, c = p[0], q == 0 ? N(d[0]) : (h = 32767 + q, N(d[n[h]]), N(m[h])), r = 63; r > 0 && p[r] == 0; r--);if (r == 0) return N(f), c; for (s = 1; r >= s;) { for (u = s; p[s] == 0 && r >= s; ++s);if (v = s - u, v >= i) { for (t = v >> 4, w = 1; t >= w; ++w)N(g); v = 15 & v }h = 32767 + p[s], N(e[(v << 4) + n[h]]), N(m[h]), s++ } return r != j && N(f), c } function X () { let b; const a = String.fromCharCode; for (b = 0; b < 256; b++)w[b] = a(b) } function Y (a) { if (a <= 0 && (a = 1), a > 100 && (a = 100), y != a) { let b = 0; b = a < 50 ? Math.floor(5e3 / a) : Math.floor(200 - 2 * a), I(b), y = a, console.log('Quality set to: ' + a + '%') } } function Z () { let c; const b = (new Date()).getTime(); a || (a = 50), X(), K(), L(), M(), Y(a), c = (new Date()).getTime() - b, console.log('Initialization ' + c + 'ms') } let d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H; Math.round, d = Math.floor, e = new Array(64), f = new Array(64), g = new Array(64), h = new Array(64), m = new Array(65535), n = new Array(65535), o = new Array(64), p = new Array(64), q = [], r = 0, s = 7, t = new Array(64), u = new Array(64), v = new Array(64), w = new Array(256), x = new Array(2048), z = [0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63], A = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0], B = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], C = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125], D = [1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250], E = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], F = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], G = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119], H = [0, 1, 2, 3, 17, 4, 5, 33, 49, 6, 18, 65, 81, 7, 97, 113, 19, 34, 50, 129, 8, 20, 66, 145, 161, 177, 193, 9, 35, 51, 82, 240, 21, 98, 114, 209, 10, 22, 36, 52, 225, 37, 241, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 130, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 226, 227, 228, 229, 230, 231, 232, 233, 234, 242, 243, 244, 245, 246, 247, 248, 249, 250], this.encode = function (a, b) { let d; let e; let f; let m; let n; let o; let p; let y; let z; let A; let B; let C; let D; let E; let F; let G; let H; let I; let J; let K; const c = (new Date()).getTime(); for (b && Y(b), q = [], r = 0, s = 7, P(65496), R(), T(), S(a.width, a.height), U(), V(), d = 0, e = 0, f = 0, r = 0, s = 7, this.encode.displayName = '_encode_', m = a.data, n = a.width, o = a.height, p = 4 * n, z = 0; o > z;) { for (y = 0; p > y;) { for (D = p * z + y, E = D, F = -1, G = 0, H = 0; H < 64; H++)G = H >> 3, F = 4 * (7 & H), E = D + G * p + F, z + G >= o && (E -= p * (z + 1 + G - o)), y + F >= p && (E -= y + F - p + 4), A = m[E++], B = m[E++], C = m[E++], t[H] = (x[A] + x[B + 256 >> 0] + x[C + 512 >> 0] >> 16) - 128, u[H] = (x[A + 768 >> 0] + x[B + 1024 >> 0] + x[C + 1280 >> 0] >> 16) - 128, v[H] = (x[A + 1280 >> 0] + x[B + 1536 >> 0] + x[C + 1792 >> 0] >> 16) - 128; d = W(t, g, d, i, k), e = W(u, h, e, j, l), f = W(v, h, f, j, l), y += 32 }z += 8 } return s >= 0 && (I = [], I[1] = s + 1, I[0] = (1 << s + 1) - 1, N(I)), P(65497), J = 'data:image/jpeg;base64,' + btoa(q.join('')), q = [], K = (new Date()).getTime() - c, console.log('Encoding time: ' + K + 'ms'), J }, Z() }
88
88
  }
89
89
 
90
90
  export function scrollTop (el, from = 0, to, duration = 500) {
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="ActionSheet">
3
- <VButton
3
+ <DpButton
4
4
  width="50%"
5
5
  @click="visible = true"
6
6
  />
@@ -11,14 +11,14 @@
11
11
  </div>
12
12
  </template>
13
13
 
14
- <script>
15
- import { ref } from 'vue'
14
+ <script lang="ts">
15
+ import { ref, defineComponent } from 'vue'
16
16
  // import VButton from '@/components/button'
17
- // import ActionSheet from '@/components/action-sheet'
17
+ // import ActionSheet from '@/components/actionSheet'
18
18
 
19
- export default {
19
+ export default defineComponent({
20
20
  name: 'ViewActionSheet',
21
- // components: { VButton, ActionSheet },
21
+ // components: { ActionSheet },
22
22
  setup () {
23
23
  // 响应式状态
24
24
  const visible = ref(false)
@@ -32,7 +32,7 @@ export default {
32
32
  actionSheet
33
33
  }
34
34
  }
35
- }
35
+ })
36
36
  </script>
37
37
 
38
38
  <style lang="less" scoped>
@@ -0,0 +1,12 @@
1
+ .Badge {
2
+ width: 100%;
3
+ margin-top: 100px;
4
+ display: flex;
5
+ justify-content: space-around;
6
+
7
+ .item {
8
+ width: 45px;
9
+ height: 45px;
10
+ background-color: red;
11
+ }
12
+ }
@@ -0,0 +1,23 @@
1
+ import { defineComponent } from 'vue'
2
+ import './Badge.less'
3
+ import Badge from '@/components/badge/index'
4
+
5
+ export default defineComponent({
6
+ name: 'ViewBadge',
7
+ setup() {
8
+ return () => (
9
+ <div class="Badge">
10
+ <Badge size="sss" number="10">
11
+ <div class="item" />
12
+ </Badge>
13
+ <Badge number="100" max={99} dot={false}>
14
+ <div class="item" />
15
+ </Badge>
16
+ <Badge number="100" max={99} dot={true}>
17
+ <div class="item" />
18
+ </Badge>
19
+ </div>
20
+ )
21
+ }
22
+ })
23
+
@@ -1,6 +1,8 @@
1
1
  <template>
2
2
  <div class="Badge">
3
- <Badge number="10">
3
+ <Badge
4
+ number="10"
5
+ >
4
6
  <div class="item" />
5
7
  </Badge>
6
8
 
@@ -22,7 +24,7 @@
22
24
  </div>
23
25
  </template>
24
26
 
25
- <script>
27
+ <script lang="ts">
26
28
  import { defineComponent } from 'vue'
27
29
  // import Badge from '@/components/badge/badge.vue' // 修改为你实际路径
28
30
 
@@ -1,48 +1,48 @@
1
1
  <template>
2
2
  <div class="Button">
3
- <VButton type="primary">
3
+ <DpButton type="primary">
4
4
  Primary
5
- </VButton>
6
- <VButton
5
+ </DpButton>
6
+ <DpButton
7
7
  type="success"
8
8
  :loading="loading"
9
9
  @click="onClick"
10
10
  >
11
11
  Success
12
- </VButton>
13
- <VButton
12
+ </DpButton>
13
+ <DpButton
14
14
  type="warning"
15
15
  :loading="loading"
16
16
  @click="onClick"
17
17
  >
18
18
  Warning
19
- </VButton>
20
- <VButton type="danger">
19
+ </DpButton>
20
+ <DpButton type="danger">
21
21
  Danger
22
- </VButton>
23
- <VButton type="normal">
22
+ </DpButton>
23
+ <DpButton type="normal">
24
24
  Normal
25
- </VButton>
26
- <VButton
25
+ </DpButton>
26
+ <DpButton
27
27
  type="normal"
28
28
  disabled
29
29
  >
30
30
  Disabled
31
- </VButton>
31
+ </DpButton>
32
32
  </div>
33
33
  </template>
34
34
 
35
- <script>
35
+ <script lang="ts">
36
36
  import { ref } from 'vue'
37
- import VButton from '../components/button'
38
-
37
+ // import DpButton from '../components/button'
38
+ import type { ButtonProps } from '../components/button/types'
39
39
  export default {
40
40
  name: 'ViewButton',
41
41
  components: {
42
- VButton
42
+ // DpButton
43
43
  },
44
44
  setup () {
45
- const loading = ref(false)
45
+ const loading = ref<ButtonProps['loading']>(false)
46
46
 
47
47
  const onClick = () => {
48
48
  // console.trace('onClick triggered')
@@ -23,12 +23,13 @@
23
23
  </div>
24
24
  </template>
25
25
 
26
- <script>
26
+ <script lang="ts">
27
27
  import { ref } from 'vue'
28
28
  // import Card from '../components/card'
29
29
 
30
30
  export default {
31
31
  name: 'ViewCard',
32
+ // components: { Card },
32
33
  setup () {
33
34
  const count = ref(0)
34
35
 
@@ -14,12 +14,13 @@
14
14
  </div>
15
15
  </template>
16
16
 
17
- <script>
18
-
19
- export default {
17
+ <script lang="ts">
18
+ import { defineComponent } from 'vue'
19
+ // import Cell from '../components/cell/'
20
+ export default defineComponent({
20
21
  name: 'ViewCell'
21
-
22
- }
22
+ // components: { Cell }
23
+ })
23
24
  </script>
24
25
 
25
26
  <style lang="less" scoped>
@@ -20,49 +20,61 @@
20
20
  </template>
21
21
  </div>
22
22
  </template>
23
+ <!-- // .setup语法糖需要引入props类型 <script setup lang="ts">
24
+ // import type { RaterProps } from 'dpzvc3-ui'
23
25
 
24
- <script setup>
25
- import { reactive, ref, getCurrentInstance } from 'vue'
26
- import CellSwipe from '../components/cell-swipe'
26
+ // type Rate = RaterProps['modelValue']
27
27
 
28
- const show = ref(true)
29
- const { proxy } = getCurrentInstance() // 用于访问全局 Modal
28
+ // const rate = ref<Rate>(3)
29
+ // </script> -->
30
+ <script lang="ts">
31
+ import { defineComponent, reactive, ref, getCurrentInstance } from 'vue'
32
+ // import CellSwipe from '../components/cellSwipe'
30
33
 
31
- const left = reactive([
32
- {
33
- content: '确定',
34
- style: { backgroundColor: '#eee', color: '#fff' },
35
- handleClick: () => {
36
- proxy.$Modal.info({ body: '点击了确定' })
37
- }
38
- },
39
- {
40
- content: '删除',
41
- style: { backgroundColor: 'red', color: '#fff' },
42
- handleClick: () => {
43
- proxy.$Modal.info({ body: '点击了删除' })
44
- }
45
- }
46
- ])
34
+ export default defineComponent({
35
+ name: 'ViewCellSwipe',
36
+ setup () {
37
+ const show = ref(true)
38
+ const { proxy } = getCurrentInstance()! // 用于访问全局 Modal
47
39
 
48
- const right = reactive([
49
- {
50
- content: '确定',
51
- style: { backgroundColor: '#eee', color: '#fff' },
52
- handleClick: () => {
53
- proxy.$Modal.info({ body: '点击了确定' })
54
- }
55
- },
56
- {
57
- content: '删除',
58
- style: { backgroundColor: 'red', color: '#fff' },
59
- handleClick: () => {
60
- proxy.$Modal.info({ body: '点击了删除' })
40
+ const left = reactive([
41
+ {
42
+ content: '确定',
43
+ style: { backgroundColor: '#eee', color: '#fff' },
44
+ handleClick: () => {
45
+ (proxy! as any).$Modal.info({ body: '点击了确定' })
46
+ }
47
+ },
48
+ {
49
+ content: '删除',
50
+ style: { backgroundColor: 'red', color: '#fff' },
51
+ handleClick: () => {
52
+ (proxy! as any).$Modal.info({ body: '点击了删除' })
53
+ }
54
+ }
55
+ ])
56
+
57
+ const right = reactive([
58
+ {
59
+ content: '确定',
60
+ style: { backgroundColor: '#eee', color: '#fff' },
61
+ handleClick: () => {
62
+ (proxy! as any).$Modal.info({ body: '点击了确定' })
63
+ }
64
+ },
65
+ {
66
+ content: '删除',
67
+ style: { backgroundColor: 'red', color: '#fff' },
68
+ handleClick: () => {
69
+ (proxy! as any).$Modal.info({ body: '点击了删除' })
70
+ }
71
+ }
72
+ ])
73
+ return {
74
+ left,
75
+ right,
76
+ show
61
77
  }
62
78
  }
63
- ])
79
+ })
64
80
  </script>
65
-
66
- <style scoped>
67
- /* 可自行添加样式 */
68
- </style>
@@ -36,16 +36,17 @@
36
36
  </div>
37
37
  </template>
38
38
 
39
- <script>
39
+ <script lang="ts">
40
40
  import { defineComponent, ref } from 'vue'
41
-
41
+ // import { CheckBox, CheckBoxGroup } from '../components/checkBox'
42
+ import type { CheckBoxProps, CheckBoxGroupProps } from '../components/checkBox/types'
42
43
  export default defineComponent({
43
44
  name: 'ViewCheckBox',
44
-
45
+ // components: { CheckBox, CheckBoxGroup },
45
46
  setup () {
46
- const data = ref(['中国'])
47
- const checked = ref(false)
48
- const change = (e) => {
47
+ const data = ref<CheckBoxGroupProps['modelValue']>(['中国'])
48
+ const checked = ref<CheckBoxProps['modelValue']>(false)
49
+ const change = (e: any) => {
49
50
  console.log(e, 'e')
50
51
  }
51
52
  return {
@@ -37,19 +37,20 @@
37
37
  </div>
38
38
  </template>
39
39
 
40
- <script>
41
- import { ref, getCurrentInstance } from 'vue'
42
-
43
- export default {
40
+ <script lang="ts">
41
+ import { ref, getCurrentInstance, defineComponent } from 'vue'
42
+ // import DpHeader from '../components/header'
43
+ export default defineComponent({
44
44
  name: 'ViewHeader',
45
+ // components: { DpHeader },
45
46
  setup () {
46
- const { proxy } = getCurrentInstance()
47
+ const { proxy } = getCurrentInstance()!
47
48
  const fixed = ref(false)
48
49
 
49
50
  const share = () => {
50
51
  // 假设 $Modal 已经在全局挂载
51
52
  if (proxy) {
52
- proxy.$Modal.confirm({
53
+ (proxy as any).$Modal.confirm({
53
54
  showHead: false,
54
55
  body: '点击了分享'
55
56
  })
@@ -58,7 +59,7 @@ export default {
58
59
 
59
60
  return { fixed, share }
60
61
  }
61
- }
62
+ })
62
63
  </script>
63
64
 
64
65
  <style scoped>
@@ -1,58 +1,58 @@
1
1
  <template>
2
2
  <div class="Indicator">
3
3
  <div class="item">
4
- <VButton @click="blade">
4
+ <DpButton @click="blade">
5
5
  blade
6
- </VButton>
6
+ </DpButton>
7
7
  </div>
8
8
  <div class="item">
9
- <VButton @click="snake">
9
+ <DpButton @click="snake">
10
10
  snake
11
- </VButton>
11
+ </DpButton>
12
12
  </div>
13
13
  <div class="item">
14
- <VButton @click="circle">
14
+ <DpButton @click="circle">
15
15
  circle
16
- </VButton>
16
+ </DpButton>
17
17
  </div>
18
18
  <div class="item">
19
- <VButton @click="bounce">
19
+ <DpButton @click="bounce">
20
20
  bounce
21
- </VButton>
21
+ </DpButton>
22
22
  </div>
23
23
  </div>
24
24
  </template>
25
25
 
26
- <script>
26
+ <script lang="ts">
27
27
  import { defineComponent, getCurrentInstance } from 'vue'
28
28
 
29
29
  export default defineComponent({
30
30
  name: 'ViewIndicator',
31
31
  setup () {
32
- const { proxy } = getCurrentInstance()
32
+ const { proxy } = getCurrentInstance()!
33
33
  const removeAfterDelay = (duration = 3000) => {
34
34
  setTimeout(() => {
35
- proxy.$Indicator.remove()
35
+ proxy!.$Indicator.remove()
36
36
  }, duration)
37
37
  }
38
38
 
39
39
  const blade = () => {
40
- proxy.$Indicator.blade()
40
+ proxy!.$Indicator.blade({})
41
41
  removeAfterDelay()
42
42
  }
43
43
 
44
44
  const snake = () => {
45
- proxy.$Indicator.snake()
45
+ proxy!.$Indicator.snake({})
46
46
  removeAfterDelay()
47
47
  }
48
48
 
49
49
  const circle = () => {
50
- proxy.$Indicator.circle()
50
+ proxy!.$Indicator.circle({})
51
51
  removeAfterDelay()
52
52
  }
53
53
 
54
54
  const bounce = () => {
55
- proxy.$Indicator.bounce()
55
+ proxy!.$Indicator.bounce({})
56
56
  removeAfterDelay()
57
57
  }
58
58