fusions-ui 1.2.7 → 1.2.8

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 (547) hide show
  1. package/LICENSE +1 -1
  2. package/changelog.md +2 -0
  3. package/components/avatar/index.ts +1 -0
  4. package/components/avatar/src/avatar.ts +131 -0
  5. package/components/avatar/src/avatar.vue +104 -0
  6. package/components/avatar/src/composables/index.ts +1 -0
  7. package/components/avatar/src/composables/use-avatar.ts +61 -0
  8. package/components/avatar-group/index.ts +1 -0
  9. package/components/avatar-group/src/avatar-group.ts +86 -0
  10. package/components/{fu-avatar-group/fu-avatar-group.vue → avatar-group/src/avatar-group.vue} +27 -34
  11. package/components/avatar-group/src/composables/index.ts +1 -0
  12. package/components/avatar-group/src/composables/use-avatar-group.ts +17 -0
  13. package/components/badge/index.ts +1 -0
  14. package/components/badge/src/badge.ts +126 -0
  15. package/components/{fu-badge/fu-badge.vue → badge/src/badge.vue} +26 -62
  16. package/components/badge/src/composables/badge-custom.ts +51 -0
  17. package/components/badge/src/composables/index.ts +1 -0
  18. package/components/banner-arc/index.ts +1 -0
  19. package/components/banner-arc/src/banner-arc.ts +41 -0
  20. package/components/banner-arc/src/banner-arc.vue +49 -0
  21. package/components/banner-arc/src/composables/banner-arc-custom.ts +19 -0
  22. package/components/banner-arc/src/composables/index.ts +1 -0
  23. package/components/button/index.ts +1 -0
  24. package/components/button/src/button.ts +332 -0
  25. package/components/{fu-button/fu-button.vue → button/src/button.vue} +57 -163
  26. package/components/button/src/composables/button-custom.ts +90 -0
  27. package/components/button/src/composables/index.ts +2 -0
  28. package/components/button/src/composables/use-button.ts +137 -0
  29. package/components/cell/index.ts +1 -0
  30. package/components/cell/src/cell.ts +167 -0
  31. package/components/{fu-cell/fu-cell.vue → cell/src/cell.vue} +29 -38
  32. package/components/cell/src/composables/index.ts +1 -0
  33. package/components/cell/src/composables/use-cell.ts +20 -0
  34. package/components/cell-group/index.ts +1 -0
  35. package/components/cell-group/src/cell-group.ts +23 -0
  36. package/components/{fu-cell-group/fu-cell-group.vue → cell-group/src/cell-group.vue} +8 -13
  37. package/components/checkbox/index.ts +1 -0
  38. package/components/checkbox/src/checkbox.ts +144 -0
  39. package/components/checkbox/src/checkbox.vue +270 -0
  40. package/components/checkbox/src/composables/checkbox-custom.ts +15 -0
  41. package/components/checkbox/src/composables/index.ts +2 -0
  42. package/components/checkbox/src/composables/use-checkbox.ts +200 -0
  43. package/components/code-input/index.ts +1 -0
  44. package/components/code-input/src/code-input.ts +157 -0
  45. package/components/code-input/src/code-input.vue +158 -0
  46. package/components/code-input/src/composables/code-input-custom.ts +74 -0
  47. package/components/code-input/src/composables/index.ts +2 -0
  48. package/components/code-input/src/composables/use-code-input.ts +67 -0
  49. package/components/code-verify/index.ts +1 -0
  50. package/components/code-verify/src/code-verify.ts +160 -0
  51. package/components/code-verify/src/code-verify.vue +87 -0
  52. package/components/code-verify/src/composables/code-verify-custom.ts +23 -0
  53. package/components/code-verify/src/composables/index.ts +2 -0
  54. package/components/code-verify/src/composables/use-code-verify.ts +132 -0
  55. package/components/collapse/index.ts +1 -0
  56. package/components/collapse/src/collapse.ts +41 -0
  57. package/components/collapse/src/collapse.vue +48 -0
  58. package/components/collapse/src/composables/index.ts +1 -0
  59. package/components/collapse/src/composables/use-collapse.ts +150 -0
  60. package/components/collapse-item/index.ts +1 -0
  61. package/components/collapse-item/src/collapse-item.ts +102 -0
  62. package/components/{fu-collapse-item/fu-collapse-item.vue → collapse-item/src/collapse-item.vue} +20 -159
  63. package/components/collapse-item/src/composables/index.ts +1 -0
  64. package/components/collapse-item/src/composables/use-collapse-item.ts +139 -0
  65. package/components/countdown/index.ts +1 -0
  66. package/components/countdown/src/composables/index.ts +1 -0
  67. package/components/countdown/src/composables/use-countdown.ts +133 -0
  68. package/components/countdown/src/countdown.ts +63 -0
  69. package/components/countdown/src/countdown.vue +60 -0
  70. package/components/{fu-countdown/util.js → countdown/src/util.ts} +5 -5
  71. package/components/datetime-picker/index.ts +1 -0
  72. package/components/datetime-picker/src/composables/index.ts +1 -0
  73. package/components/datetime-picker/src/composables/use-datetime-picker.ts +325 -0
  74. package/components/datetime-picker/src/datetime-picker.ts +223 -0
  75. package/components/datetime-picker/src/datetime-picker.vue +96 -0
  76. package/components/form/index.ts +1 -0
  77. package/components/form/src/composables/index.ts +1 -0
  78. package/components/form/src/composables/use-form.ts +256 -0
  79. package/components/form/src/form.ts +108 -0
  80. package/components/form/src/form.vue +64 -0
  81. package/components/{fu-form/utils.js → form/src/utils.ts} +49 -42
  82. package/components/{fu-form/validate.js → form/src/validate.ts} +58 -49
  83. package/components/form-item/index.ts +1 -0
  84. package/components/form-item/src/composables/index.ts +1 -0
  85. package/components/form-item/src/composables/use-form-item.ts +292 -0
  86. package/components/form-item/src/form-item.ts +81 -0
  87. package/components/form-item/src/form-item.vue +229 -0
  88. package/components/fusions-ui/src/fusions-ui.vue +8 -0
  89. package/components/grid/index.ts +1 -0
  90. package/components/grid/src/composables/index.ts +1 -0
  91. package/components/grid/src/composables/use-grid.ts +67 -0
  92. package/components/grid/src/grid.ts +54 -0
  93. package/components/grid/src/grid.vue +69 -0
  94. package/components/grid-item/index.ts +1 -0
  95. package/components/grid-item/src/composables/grid-item-custom.ts +16 -0
  96. package/components/grid-item/src/composables/index.ts +2 -0
  97. package/components/grid-item/src/composables/use-grid-item.ts +55 -0
  98. package/components/grid-item/src/grid-item.ts +15 -0
  99. package/components/grid-item/src/grid-item.vue +102 -0
  100. package/components/icon/index.ts +1 -0
  101. package/components/icon/src/composables/icon-custom.ts +41 -0
  102. package/components/icon/src/composables/index.ts +2 -0
  103. package/components/icon/src/composables/use-icon.ts +14 -0
  104. package/components/{fu-icon → icon/src}/fuicon.css +584 -584
  105. package/components/icon/src/fuicon.ts +1023 -0
  106. package/components/icon/src/icon.ts +84 -0
  107. package/components/icon/src/icon.vue +92 -0
  108. package/components/image/index.ts +1 -0
  109. package/components/image/src/composables/image-custom.ts +36 -0
  110. package/components/image/src/composables/index.ts +2 -0
  111. package/components/image/src/composables/use-image.ts +135 -0
  112. package/components/image/src/image.ts +185 -0
  113. package/components/image/src/image.vue +152 -0
  114. package/components/index-anchor/index.ts +1 -0
  115. package/components/index-anchor/src/composables/index.ts +1 -0
  116. package/components/index-anchor/src/composables/use-index-anchor.ts +44 -0
  117. package/components/index-anchor/src/index-anchor.ts +45 -0
  118. package/components/index-anchor/src/index-anchor.vue +60 -0
  119. package/components/index-item/index.ts +1 -0
  120. package/components/index-item/src/composables/index.ts +1 -0
  121. package/components/index-item/src/composables/use-index-item.ts +75 -0
  122. package/components/index-item/src/index-item.ts +13 -0
  123. package/components/index-item/src/index-item.vue +32 -0
  124. package/components/index-list/index.ts +1 -0
  125. package/components/index-list/src/composables/index.ts +1 -0
  126. package/components/index-list/src/composables/use-index-list.ts +297 -0
  127. package/components/index-list/src/index-list.ts +52 -0
  128. package/components/index-list/src/index-list.vue +178 -0
  129. package/components/index.ts +62 -0
  130. package/components/input/index.ts +1 -0
  131. package/components/input/src/composables/index.ts +2 -0
  132. package/components/input/src/composables/input-custom.ts +69 -0
  133. package/components/input/src/composables/use-input.ts +117 -0
  134. package/components/input/src/input.ts +360 -0
  135. package/components/input/src/input.vue +241 -0
  136. package/components/keyboard/index.ts +1 -0
  137. package/components/keyboard/src/composables/index.ts +3 -0
  138. package/components/keyboard/src/composables/use-keyboard-car.ts +99 -0
  139. package/components/keyboard/src/composables/use-keyboard-number.ts +81 -0
  140. package/components/keyboard/src/composables/use-keyboard.ts +61 -0
  141. package/components/keyboard/src/keyboard-car.ts +53 -0
  142. package/components/{fu-keyboard → keyboard/src}/keyboard-car.vue +37 -199
  143. package/components/keyboard/src/keyboard-number.ts +44 -0
  144. package/components/keyboard/src/keyboard-number.vue +108 -0
  145. package/components/keyboard/src/keyboard.ts +174 -0
  146. package/components/{fu-keyboard/fu-keyboard.vue → keyboard/src/keyboard.vue} +38 -63
  147. package/components/line/index.ts +1 -0
  148. package/components/line/src/composables/index.ts +1 -0
  149. package/components/line/src/composables/line-custom.ts +30 -0
  150. package/components/line/src/line.ts +82 -0
  151. package/components/line/src/line.vue +44 -0
  152. package/components/link/index.ts +1 -0
  153. package/components/link/src/composables/index.ts +2 -0
  154. package/components/link/src/composables/link-custom.ts +19 -0
  155. package/components/link/src/composables/use-link.ts +33 -0
  156. package/components/link/src/link.ts +61 -0
  157. package/components/link/src/link.vue +62 -0
  158. package/components/loading/index.ts +1 -0
  159. package/{libs/function/colorGradient.js → components/loading/src/composables/colorGradient.ts} +4 -4
  160. package/components/loading/src/composables/index.ts +2 -0
  161. package/components/loading/src/composables/loading-custom.ts +21 -0
  162. package/components/loading/src/composables/use-loading.ts +100 -0
  163. package/components/loading/src/loading.ts +77 -0
  164. package/components/{fu-loading/fu-loading.vue → loading/src/loading.vue} +23 -119
  165. package/components/loading-more/index.ts +1 -0
  166. package/components/loading-more/src/loading-more.ts +75 -0
  167. package/components/{fu-loading-more/fu-loading-more.vue → loading-more/src/loading-more.vue} +18 -19
  168. package/components/modal/index.ts +1 -0
  169. package/components/modal/src/composables/index.ts +2 -0
  170. package/components/modal/src/composables/modal-custom.ts +17 -0
  171. package/components/modal/src/composables/use-modal.ts +56 -0
  172. package/components/modal/src/modal.ts +152 -0
  173. package/components/{fu-modal/fu-modal.vue → modal/src/modal.vue} +41 -69
  174. package/components/navbar/index.ts +1 -0
  175. package/components/navbar/src/composables/index.ts +2 -0
  176. package/components/navbar/src/composables/navbar-custom.ts +62 -0
  177. package/components/navbar/src/composables/use-navbar.ts +42 -0
  178. package/components/navbar/src/navbar.ts +151 -0
  179. package/components/navbar/src/navbar.vue +249 -0
  180. package/components/notice-bar/index.ts +3 -0
  181. package/components/notice-bar/src/composables/index.ts +5 -0
  182. package/components/notice-bar/src/composables/notice-column-custom.ts +43 -0
  183. package/components/notice-bar/src/composables/notice-row-custom.ts +26 -0
  184. package/components/notice-bar/src/composables/use-notice-bar.ts +34 -0
  185. package/components/notice-bar/src/composables/use-notice-column.ts +31 -0
  186. package/components/notice-bar/src/composables/use-notice-row.ts +88 -0
  187. package/components/notice-bar/src/notice-bar.ts +197 -0
  188. package/components/{fu-notice-bar/fu-notice-bar.vue → notice-bar/src/notice-bar.vue} +28 -41
  189. package/components/notice-bar/src/notice-column.ts +172 -0
  190. package/components/notice-bar/src/notice-column.vue +129 -0
  191. package/components/notice-bar/src/notice-row.ts +155 -0
  192. package/components/notice-bar/src/notice-row.vue +135 -0
  193. package/components/number-box/index.ts +1 -0
  194. package/components/number-box/src/composables/index.ts +2 -0
  195. package/components/number-box/src/composables/number-box-custom.ts +16 -0
  196. package/components/number-box/src/composables/use-number-box.ts +84 -0
  197. package/components/number-box/src/number-box.ts +98 -0
  198. package/components/number-box/src/number-box.vue +123 -0
  199. package/components/parse/index.ts +1 -0
  200. package/components/parse/src/app-plus/html/js/handler.js +254 -0
  201. package/components/parse/src/app-plus/html/js/uni.webview.min.js +188 -0
  202. package/components/parse/src/app-plus/html/local.html +32 -0
  203. package/components/parse/src/composables/index.ts +1 -0
  204. package/components/parse/src/composables/use-parse.ts +428 -0
  205. package/components/parse/src/node/node.vue +635 -0
  206. package/components/parse/src/parse.ts +156 -0
  207. package/components/parse/src/parse.vue +131 -0
  208. package/components/parse/src/parser.ts +1402 -0
  209. package/components/picker/index.ts +1 -0
  210. package/components/picker/src/composables/index.ts +2 -0
  211. package/components/picker/src/composables/picker-custom.ts +40 -0
  212. package/components/picker/src/composables/use-picker.ts +179 -0
  213. package/components/picker/src/picker.ts +172 -0
  214. package/components/picker/src/picker.vue +197 -0
  215. package/components/popup/index.ts +1 -0
  216. package/components/popup/src/composables/index.ts +1 -0
  217. package/components/popup/src/composables/use-popup.ts +346 -0
  218. package/components/popup/src/keypress.ts +55 -0
  219. package/components/popup/src/popup.ts +101 -0
  220. package/components/popup/src/popup.vue +204 -0
  221. package/components/progress/index.ts +1 -0
  222. package/components/progress/src/composables/index.ts +2 -0
  223. package/components/progress/src/composables/progress-custom.ts +24 -0
  224. package/components/progress/src/composables/use-progress.ts +159 -0
  225. package/components/progress/src/progress.ts +84 -0
  226. package/components/progress/src/progress.vue +150 -0
  227. package/components/rate/index.ts +1 -0
  228. package/components/rate/src/composables/index.ts +1 -0
  229. package/components/rate/src/composables/use-rate.ts +196 -0
  230. package/components/rate/src/rate.ts +114 -0
  231. package/components/rate/src/rate.vue +113 -0
  232. package/components/read-more/index.ts +1 -0
  233. package/components/read-more/src/composables/index.ts +2 -0
  234. package/components/read-more/src/composables/read-more-custom.ts +46 -0
  235. package/components/read-more/src/composables/use-read-more.ts +72 -0
  236. package/components/read-more/src/read-more.ts +102 -0
  237. package/components/read-more/src/read-more.vue +104 -0
  238. package/components/safe-bottom/index.ts +1 -0
  239. package/components/safe-bottom/src/composables/index.ts +2 -0
  240. package/components/safe-bottom/src/composables/safe-bottom-custom.ts +18 -0
  241. package/components/safe-bottom/src/composables/use-safe-bottom.ts +17 -0
  242. package/components/safe-bottom/src/safe-bottom.ts +8 -0
  243. package/components/safe-bottom/src/safe-bottom.vue +43 -0
  244. package/components/scroll-list/index.ts +1 -0
  245. package/components/scroll-list/src/composables/index.ts +2 -0
  246. package/components/scroll-list/src/composables/scroll-list-custom.ts +41 -0
  247. package/components/scroll-list/src/composables/use-scroll-list.ts +126 -0
  248. package/components/scroll-list/src/scroll-list.ts +57 -0
  249. package/components/scroll-list/src/scroll-list.vue +143 -0
  250. package/components/{fu-scroll-list/scrollWxs.wxs → scroll-list/src/scroll-wxs.wxs} +2 -2
  251. package/components/search/index.ts +1 -0
  252. package/components/search/src/composables/index.ts +2 -0
  253. package/components/search/src/composables/search-custom.ts +25 -0
  254. package/components/search/src/composables/use-search.ts +106 -0
  255. package/components/search/src/search.ts +186 -0
  256. package/components/{fu-search/fu-search.vue → search/src/search.vue} +42 -154
  257. package/components/section/index.ts +1 -0
  258. package/components/section/src/composables/index.ts +1 -0
  259. package/components/section/src/composables/use-section.ts +19 -0
  260. package/components/section/src/section.ts +83 -0
  261. package/components/{fu-section/fu-section.vue → section/src/section.vue} +36 -35
  262. package/components/sign-board/index.ts +1 -0
  263. package/components/sign-board/src/composables/index.ts +1 -0
  264. package/components/sign-board/src/composables/use-sign-board.ts +552 -0
  265. package/components/sign-board/src/sign-board.ts +48 -0
  266. package/components/sign-board/src/sign-board.vue +191 -0
  267. package/components/skeleton/index.ts +1 -0
  268. package/components/skeleton/src/composables/index.ts +2 -0
  269. package/components/skeleton/src/composables/skeleton-custom.ts +23 -0
  270. package/components/skeleton/src/composables/use-skeleton.ts +102 -0
  271. package/components/skeleton/src/skeleton.ts +37 -0
  272. package/components/skeleton/src/skeleton.vue +147 -0
  273. package/components/status-bar/src/composables/index.ts +1 -0
  274. package/components/status-bar/src/composables/use-status-bar.ts +29 -0
  275. package/components/status-bar/src/status-bar.vue +21 -0
  276. package/components/steps/index.ts +1 -0
  277. package/components/steps/src/composables/index.ts +1 -0
  278. package/components/steps/src/composables/use-steps.ts +27 -0
  279. package/components/steps/src/steps.ts +65 -0
  280. package/components/steps/src/steps.vue +46 -0
  281. package/components/steps-item/index.ts +1 -0
  282. package/components/steps-item/src/composables/index.ts +2 -0
  283. package/components/steps-item/src/composables/steps-item-custom.ts +81 -0
  284. package/components/steps-item/src/composables/use-steps-item.ts +87 -0
  285. package/components/steps-item/src/steps-item.ts +38 -0
  286. package/components/steps-item/src/steps-item.vue +224 -0
  287. package/components/sticky/index.ts +1 -0
  288. package/components/sticky/src/composables/index.ts +2 -0
  289. package/components/sticky/src/composables/sticky-custom.ts +57 -0
  290. package/components/sticky/src/composables/use-sticky.ts +152 -0
  291. package/components/sticky/src/sticky.ts +62 -0
  292. package/components/sticky/src/sticky.vue +65 -0
  293. package/components/subsection/index.ts +1 -0
  294. package/components/subsection/src/composables/index.ts +2 -0
  295. package/components/subsection/src/composables/subsection-custom.ts +71 -0
  296. package/components/subsection/src/composables/use-subsection.ts +85 -0
  297. package/components/subsection/src/subsection.ts +107 -0
  298. package/components/subsection/src/subsection.vue +165 -0
  299. package/components/swipe-action/src/composables/index.ts +1 -0
  300. package/components/swipe-action/src/composables/use-swipe-action.ts +58 -0
  301. package/components/swipe-action/src/swipe-action.vue +81 -0
  302. package/components/swipe-action-item/index.ts +1 -0
  303. package/components/{fu-swipe-action-item/mpwxs.js → swipe-action-item/src/mpwxs.ts} +22 -27
  304. package/components/swipe-action-item/src/swipe-action-item.ts +68 -0
  305. package/components/{fu-swipe-action-item/fu-swipe-action-item.vue → swipe-action-item/src/swipe-action-item.vue} +24 -17
  306. package/components/{fu-swipe-action-item → swipe-action-item/src}/wx.wxs +2 -2
  307. package/components/swiper/index.ts +1 -0
  308. package/components/swiper/src/composables/index.ts +2 -0
  309. package/components/swiper/src/composables/swiper-custom.ts +40 -0
  310. package/components/swiper/src/composables/use-swiper.ts +75 -0
  311. package/components/swiper/src/swiper.ts +189 -0
  312. package/components/{fu-swiper/fu-swiper.vue → swiper/src/swiper.vue} +49 -118
  313. package/components/switch/index.ts +1 -0
  314. package/components/switch/src/composables/index.ts +2 -0
  315. package/components/switch/src/composables/switch-custom.ts +32 -0
  316. package/components/switch/src/composables/use-switch.ts +38 -0
  317. package/components/switch/src/switch.ts +115 -0
  318. package/components/{fu-switch/fu-switch.vue → switch/src/switch.vue} +25 -73
  319. package/components/tabs/index.ts +1 -0
  320. package/components/tabs/src/composables/index.ts +2 -0
  321. package/components/tabs/src/composables/tabs-custom.ts +43 -0
  322. package/components/tabs/src/composables/use-tabs.ts +210 -0
  323. package/components/tabs/src/tabs.ts +123 -0
  324. package/components/tabs/src/tabs.vue +153 -0
  325. package/components/tag/index.ts +1 -0
  326. package/components/tag/src/composables/index.ts +2 -0
  327. package/components/tag/src/composables/tag-custom.ts +61 -0
  328. package/components/tag/src/composables/use-tag.ts +23 -0
  329. package/components/tag/src/tag.ts +159 -0
  330. package/components/{fu-tag/fu-tag.vue → tag/src/tag.vue} +53 -93
  331. package/components/text/index.ts +1 -0
  332. package/components/text/src/composables/index.ts +2 -0
  333. package/components/text/src/composables/text-custom.ts +120 -0
  334. package/components/text/src/composables/use-text.ts +83 -0
  335. package/components/text/src/text.ts +261 -0
  336. package/components/text/src/text.vue +186 -0
  337. package/components/textarea/index.ts +1 -0
  338. package/components/textarea/src/composables/index.ts +2 -0
  339. package/components/textarea/src/composables/textarea-custom.ts +50 -0
  340. package/components/textarea/src/composables/use-textarea.ts +88 -0
  341. package/components/textarea/src/textarea.ts +250 -0
  342. package/components/textarea/src/textarea.vue +162 -0
  343. package/components/{fu-timeaxis/fu-timeaxis.vue → timeaxis/src/timeaxis.vue} +3 -9
  344. package/components/timeaxis-item/index.ts +1 -0
  345. package/components/timeaxis-item/src/timeaxis-item.ts +20 -0
  346. package/components/timeaxis-item/src/timeaxis-item.vue +50 -0
  347. package/components/transition/index.ts +1 -0
  348. package/components/transition/src/composables/createAnimation.ts +171 -0
  349. package/components/transition/src/composables/index.ts +2 -0
  350. package/components/transition/src/composables/transform-custom.ts +18 -0
  351. package/components/transition/src/composables/use-transition.ts +251 -0
  352. package/components/transition/src/transition.ts +64 -0
  353. package/components/transition/src/transition.vue +70 -0
  354. package/components/upload/index.ts +1 -0
  355. package/components/upload/src/composables/index.ts +5 -0
  356. package/components/upload/src/composables/upload-file-custom.ts +68 -0
  357. package/components/upload/src/composables/upload-image-custom.ts +76 -0
  358. package/components/upload/src/composables/use-upload-file.ts +27 -0
  359. package/components/upload/src/composables/use-upload-image.ts +38 -0
  360. package/components/upload/src/composables/use-upload.ts +388 -0
  361. package/components/upload/src/upload-file.ts +84 -0
  362. package/components/upload/src/upload-file.vue +193 -0
  363. package/components/upload/src/upload-image.ts +90 -0
  364. package/components/upload/src/upload-image.vue +158 -0
  365. package/components/upload/src/upload.ts +196 -0
  366. package/components/upload/src/upload.vue +151 -0
  367. package/components/{fu-upload/utils.js → upload/src/utils.ts} +12 -12
  368. package/components/vtabs/index.ts +1 -0
  369. package/components/vtabs/src/composables/index.ts +2 -0
  370. package/components/vtabs/src/composables/use-vtabs.ts +276 -0
  371. package/components/vtabs/src/composables/vtabs-custom.ts +54 -0
  372. package/components/vtabs/src/vtabs.ts +130 -0
  373. package/components/vtabs/src/vtabs.vue +189 -0
  374. package/components/vtabs-item/index.ts +1 -0
  375. package/components/vtabs-item/src/composables/index.ts +1 -0
  376. package/components/vtabs-item/src/composables/use-vtabs-item.ts +60 -0
  377. package/components/vtabs-item/src/vtabs-item.ts +10 -0
  378. package/components/vtabs-item/src/vtabs-item.vue +20 -0
  379. package/components/waterfall/index.ts +1 -0
  380. package/components/waterfall/src/composables/index.ts +2 -0
  381. package/components/waterfall/src/composables/use-waterfall.ts +139 -0
  382. package/components/waterfall/src/composables/waterfall-custom.ts +18 -0
  383. package/components/waterfall/src/waterfall.ts +114 -0
  384. package/components/waterfall/src/waterfall.vue +104 -0
  385. package/{libs/config/config.js → config/config.ts} +13 -7
  386. package/constants/images.ts +18 -0
  387. package/constants/index.ts +6 -0
  388. package/constants/open-types.ts +33 -0
  389. package/constants/props.ts +18 -0
  390. package/constants/shapes.ts +6 -0
  391. package/constants/types.ts +10 -0
  392. package/constants/z-index.ts +27 -0
  393. package/global.d.ts +103 -0
  394. package/hooks/index.ts +25 -0
  395. package/index.scss +3 -5
  396. package/index.ts +56 -0
  397. package/package.json +1 -1
  398. package/{libs/route/min.route.config.js → route/min.route.config.ts} +62 -23
  399. package/route/route.config.ts +93 -0
  400. package/style/color.scss +26 -0
  401. package/{libs/style → style}/common.scss +1 -14
  402. package/{libs/function/applyEven.js → utils/applyEven.ts} +21 -12
  403. package/utils/check.ts +276 -0
  404. package/{libs/function/chooseUploadFile.js → utils/chooseUploadFile.ts} +22 -26
  405. package/utils/common.ts +609 -0
  406. package/{libs/function/digit.js → utils/digit.ts} +63 -33
  407. package/{components/fu-swipe-action-item/isPC.js → utils/isPC.ts} +1 -1
  408. package/utils/toast.ts +42 -0
  409. package/components/fu-avatar/fu-avatar.vue +0 -157
  410. package/components/fu-avatar/props.js +0 -117
  411. package/components/fu-avatar-group/props.js +0 -74
  412. package/components/fu-badge/props.js +0 -112
  413. package/components/fu-banner-arc/fu-banner-arc.vue +0 -58
  414. package/components/fu-banner-arc/props.js +0 -35
  415. package/components/fu-button/props.js +0 -228
  416. package/components/fu-cell/props.js +0 -108
  417. package/components/fu-cell-group/props.js +0 -19
  418. package/components/fu-checkbox/fu-checkbox.vue +0 -469
  419. package/components/fu-checkbox/props.js +0 -126
  420. package/components/fu-code-input/fu-code-input.vue +0 -269
  421. package/components/fu-code-input/props.js +0 -136
  422. package/components/fu-code-verify/fu-code-verify.vue +0 -221
  423. package/components/fu-code-verify/props.js +0 -136
  424. package/components/fu-collapse/fu-collapse.vue +0 -143
  425. package/components/fu-collapse/props.js +0 -29
  426. package/components/fu-collapse-item/props.js +0 -101
  427. package/components/fu-countdown/fu-countdown.vue +0 -164
  428. package/components/fu-countdown/props.js +0 -35
  429. package/components/fu-datetime-picker/fu-datetime-picker.vue +0 -375
  430. package/components/fu-datetime-picker/props.js +0 -194
  431. package/components/fu-form/fu-form.vue +0 -284
  432. package/components/fu-form/props.js +0 -74
  433. package/components/fu-form-item/fu-form-item.vue +0 -535
  434. package/components/fu-form-item/props.js +0 -66
  435. package/components/fu-grid/fu-grid.vue +0 -113
  436. package/components/fu-grid/props.js +0 -44
  437. package/components/fu-grid-item/fu-grid-item.vue +0 -136
  438. package/components/fu-grid-item/props.js +0 -27
  439. package/components/fu-icon/fu-icon.vue +0 -110
  440. package/components/fu-icon/fuicon.js +0 -1031
  441. package/components/fu-icon/props.js +0 -55
  442. package/components/fu-image/fu-image.vue +0 -268
  443. package/components/fu-image/props.js +0 -145
  444. package/components/fu-index-anchor/fu-index-anchor.vue +0 -91
  445. package/components/fu-index-anchor/props.js +0 -43
  446. package/components/fu-index-item/fu-index-item.vue +0 -79
  447. package/components/fu-index-list/fu-index-list.vue +0 -426
  448. package/components/fu-index-list/props.js +0 -42
  449. package/components/fu-input/fu-input.vue +0 -393
  450. package/components/fu-input/props.js +0 -291
  451. package/components/fu-keyboard/keyboard-number.vue +0 -195
  452. package/components/fu-keyboard/props.js +0 -138
  453. package/components/fu-line/fu-line.vue +0 -64
  454. package/components/fu-line/props.js +0 -58
  455. package/components/fu-link/fu-link.vue +0 -91
  456. package/components/fu-link/props.js +0 -49
  457. package/components/fu-loading/props.js +0 -60
  458. package/components/fu-loading-more/props.js +0 -59
  459. package/components/fu-modal/props.js +0 -128
  460. package/components/fu-navbar/fu-navbar.vue +0 -271
  461. package/components/fu-navbar/props.js +0 -72
  462. package/components/fu-navbar/status-bar.vue +0 -27
  463. package/components/fu-notice-bar/notice-column.vue +0 -313
  464. package/components/fu-notice-bar/notice-row.vue +0 -363
  465. package/components/fu-notice-bar/props.js +0 -173
  466. package/components/fu-number-box/fu-number-box.vue +0 -210
  467. package/components/fu-number-box/props.js +0 -79
  468. package/components/fu-parse/fu-parse.vue +0 -508
  469. package/components/fu-parse/node/node.vue +0 -576
  470. package/components/fu-parse/parser.js +0 -1335
  471. package/components/fu-picker/fu-picker.vue +0 -347
  472. package/components/fu-picker/props.js +0 -150
  473. package/components/fu-popup/fu-popup.vue +0 -475
  474. package/components/fu-popup/keypress.js +0 -45
  475. package/components/fu-popup/props.js +0 -83
  476. package/components/fu-progress/fu-progress.vue +0 -292
  477. package/components/fu-progress/props.js +0 -76
  478. package/components/fu-rate/fu-rate.vue +0 -301
  479. package/components/fu-rate/props.js +0 -103
  480. package/components/fu-read-more/fu-read-more.vue +0 -191
  481. package/components/fu-read-more/props.js +0 -72
  482. package/components/fu-ribbon/fu-ribbon.vue +0 -106
  483. package/components/fu-ribbon/props.js +0 -35
  484. package/components/fu-safe-area/fu-safe-area.vue +0 -61
  485. package/components/fu-scroll-list/fu-scroll-list.vue +0 -196
  486. package/components/fu-scroll-list/nvue.js +0 -28
  487. package/components/fu-scroll-list/props.js +0 -43
  488. package/components/fu-search/props.js +0 -149
  489. package/components/fu-section/props.js +0 -59
  490. package/components/fu-sign-board/fu-sign-board.vue +0 -730
  491. package/components/fu-sign-board/props.js +0 -34
  492. package/components/fu-skeleton/fu-skeleton.vue +0 -238
  493. package/components/fu-skeleton/props.js +0 -35
  494. package/components/fu-steps/fu-steps.vue +0 -81
  495. package/components/fu-steps/props.js +0 -55
  496. package/components/fu-steps-item/fu-steps-item.vue +0 -274
  497. package/components/fu-steps-item/props.js +0 -34
  498. package/components/fu-sticky/fu-sticky.vue +0 -232
  499. package/components/fu-sticky/props.js +0 -54
  500. package/components/fu-subsection/fu-subsection.vue +0 -288
  501. package/components/fu-subsection/props.js +0 -88
  502. package/components/fu-swipe-action/fu-swipe-action.vue +0 -64
  503. package/components/fu-swipe-action-item/props.js +0 -54
  504. package/components/fu-swiper/props.js +0 -163
  505. package/components/fu-switch/props.js +0 -102
  506. package/components/fu-tabs/fu-tabs.vue +0 -361
  507. package/components/fu-tabs/props.js +0 -109
  508. package/components/fu-tag/props.js +0 -135
  509. package/components/fu-text/button.js +0 -13
  510. package/components/fu-text/fu-text.vue +0 -254
  511. package/components/fu-text/openType.js +0 -47
  512. package/components/fu-text/props.js +0 -173
  513. package/components/fu-text/value.js +0 -88
  514. package/components/fu-textarea/fu-textarea.vue +0 -288
  515. package/components/fu-textarea/props.js +0 -206
  516. package/components/fu-timeaxis-item/fu-timeaxis-item.vue +0 -68
  517. package/components/fu-transition/createAnimation.js +0 -131
  518. package/components/fu-transition/fu-transition.vue +0 -292
  519. package/components/fu-transition/props.js +0 -21
  520. package/components/fu-upload/fu-upload.vue +0 -563
  521. package/components/fu-upload/props.js +0 -171
  522. package/components/fu-upload/upload-file.vue +0 -332
  523. package/components/fu-upload/upload-image.vue +0 -304
  524. package/components/fu-vtabs/fu-vtabs.vue +0 -443
  525. package/components/fu-vtabs/props.js +0 -114
  526. package/components/fu-vtabs-item/fu-vtabs-item.vue +0 -71
  527. package/components/fu-waterfall/fu-waterfall.vue +0 -238
  528. package/components/fu-waterfall/props.js +0 -85
  529. package/index.js +0 -71
  530. package/libs/function/check.js +0 -215
  531. package/libs/function/common.js +0 -527
  532. package/libs/function/message.js +0 -47
  533. package/libs/mixin/button.js +0 -85
  534. package/libs/mixin/mixin.js +0 -94
  535. package/libs/mixin/mpMixin.js +0 -8
  536. package/libs/mixin/mpShare.js +0 -15
  537. package/libs/route/route.config.js +0 -66
  538. package/libs/style/color.scss +0 -24
  539. /package/components/{fu-icon → icon/src}/fuicon.ttf +0 -0
  540. /package/components/{fu-swipe-action-item → swipe-action-item/src}/bindingx.js +0 -0
  541. /package/components/{fu-swipe-action-item → swipe-action-item/src}/mpalipay.js +0 -0
  542. /package/components/{fu-swipe-action-item → swipe-action-item/src}/mpother.js +0 -0
  543. /package/components/{fu-swipe-action-item → swipe-action-item/src}/render.js +0 -0
  544. /package/{libs/style → style}/components.scss +0 -0
  545. /package/{libs/style → style}/style.h5.scss +0 -0
  546. /package/{libs/style → style}/style.mp.scss +0 -0
  547. /package/{libs/function → utils}/dayjs.js +0 -0
@@ -0,0 +1,174 @@
1
+ import type { ExtractPropTypes } from 'vue';
2
+ import { ZIndex } from '../../../constants';
3
+
4
+ /**
5
+ * 键盘 mode 有效值
6
+ */
7
+ export const keyboardModes = ['number', 'card', 'car'] as const;
8
+
9
+ export const keyboardProps = {
10
+ /**
11
+ * @description 键盘的类型
12
+ * @values 'number' - 数字键盘, 'card' - 身份证键盘, 'car' - 车牌号键盘
13
+ */
14
+ mode: {
15
+ type: String,
16
+ values: keyboardModes,
17
+ default: 'number'
18
+ },
19
+ /**
20
+ * @description 是否显示键盘的"."符号
21
+ * @default false
22
+ */
23
+ dotDisabled: {
24
+ type: Boolean,
25
+ default: false
26
+ },
27
+ /**
28
+ * @description 是否显示顶部工具条
29
+ * @default true
30
+ */
31
+ tooltip: {
32
+ type: Boolean,
33
+ default: true
34
+ },
35
+ /**
36
+ * @description 是否显示工具条中间的提示
37
+ * @default true
38
+ */
39
+ showTips: {
40
+ type: Boolean,
41
+ default: true
42
+ },
43
+ /**
44
+ * @description 工具条中间的提示文字
45
+ */
46
+ tips: {
47
+ type: String,
48
+ default: ''
49
+ },
50
+ /**
51
+ * @description 是否显示工具条左边的"取消"按钮
52
+ * @default true
53
+ */
54
+ showCancel: {
55
+ type: Boolean,
56
+ default: true
57
+ },
58
+ /**
59
+ * @description 是否显示工具条右边的"完成"按钮
60
+ * @default true
61
+ */
62
+ showConfirm: {
63
+ type: Boolean,
64
+ default: true
65
+ },
66
+ /**
67
+ * @description 是否打乱键盘按键的顺序
68
+ * @default false
69
+ */
70
+ random: {
71
+ type: Boolean,
72
+ default: false
73
+ },
74
+ /**
75
+ * @description 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距
76
+ * @default true
77
+ */
78
+ safeArea: {
79
+ type: Boolean,
80
+ default: true
81
+ },
82
+ /**
83
+ * @description 是否允许通过点击遮罩关闭键盘
84
+ * @default true
85
+ */
86
+ isMaskClick: {
87
+ type: Boolean,
88
+ default: true
89
+ },
90
+ /**
91
+ * @description 是否允许点击确认按钮关闭组件
92
+ * @default true
93
+ */
94
+ closeOnClickConfirm: {
95
+ type: Boolean,
96
+ default: true
97
+ },
98
+ /**
99
+ * @description 层级
100
+ */
101
+ zIndex: {
102
+ type: [String, Number],
103
+ default: ZIndex.keyboard
104
+ },
105
+ /**
106
+ * @description 取消按钮的文字
107
+ * @default '取消'
108
+ */
109
+ cancelText: {
110
+ type: String,
111
+ default: '取消'
112
+ },
113
+ /**
114
+ * @description 确认按钮的文字
115
+ * @default '确定'
116
+ */
117
+ confirmText: {
118
+ type: String,
119
+ default: '确定'
120
+ },
121
+ /**
122
+ * @description 输入一个中文后,是否自动切换到英文
123
+ * @default false
124
+ */
125
+ autoChange: {
126
+ type: Boolean,
127
+ default: false
128
+ },
129
+ /**
130
+ * @description 被禁用的键
131
+ */
132
+ disKeys: {
133
+ type: Array,
134
+ default: () => []
135
+ },
136
+ /**
137
+ * @description 是否自定义abc
138
+ * @default false
139
+ */
140
+ customabc: {
141
+ type: Boolean,
142
+ default: false
143
+ }
144
+ };
145
+
146
+ export const keyboardEmits = {
147
+ /**
148
+ * @description 键盘关闭时触发
149
+ */
150
+ close: () => true,
151
+ /**
152
+ * @description 按键被点击(不包含退格键被点击)
153
+ */
154
+ change: (_e: any) => true,
155
+ /**
156
+ * @description 键盘顶部工具条右边的"完成"按钮被点击
157
+ */
158
+ confirm: () => true,
159
+ /**
160
+ * @description 键盘顶部工具条左边的"取消"按钮被点击
161
+ */
162
+ cancel: () => true,
163
+ /**
164
+ * @description 键盘退格键被点击
165
+ */
166
+ backspace: () => true,
167
+ /**
168
+ * @description car模式切换中英文时触发
169
+ */
170
+ changeCarInputMode: (_e: any) => true
171
+ };
172
+
173
+ export type KeyboardProps = ExtractPropTypes<typeof keyboardProps>;
174
+ export type KeyboardEmits = typeof keyboardEmits;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <fu-popup ref="popup" mode="bottom" :isMaskClick="isMaskClick" :safeArea="safeArea" :zIndex="zIndex">
2
+ <fu-popup ref="popupRef" mode="bottom" :isMaskClick="isMaskClick" :safeArea="safeArea" :zIndex="zIndex">
3
3
  <view class="fu-keyboard">
4
4
  <slot />
5
5
  <view class="fu-keyboard__tooltip" v-if="tooltip">
@@ -17,7 +17,7 @@
17
17
  <keyboard-number :random="random" @backspace="backspace" @change="change" :mode="mode" :dotDisabled="dotDisabled"></keyboard-number>
18
18
  </template>
19
19
  <template v-else>
20
- <keyboard-car ref="fuKeyboardCarRef" :random="random" :autoChange="autoChange" :disKeys="disKeys" :customabc="customabc" @backspace="backspace" @change="change" @changeCarInputMode="changeCarInputMode">
20
+ <keyboard-car ref="keyboardCarRef" :random="random" :autoChange="autoChange" :disKeys="disKeys" :customabc="customabc" @backspace="backspace" @change="change" @changeCarInputMode="changeCarInputMode">
21
21
  <slot name="abc"></slot>
22
22
  </keyboard-car>
23
23
  </template>
@@ -25,14 +25,11 @@
25
25
  </fu-popup>
26
26
  </template>
27
27
 
28
- <script>
29
- import KeyboardCar from './keyboard-car.vue'
30
- import KeyboardNumber from './keyboard-number.vue'
31
- import mpMixin from '../../libs/mixin/mpMixin.js'
32
- import props from './props.js';
28
+ <script lang="ts" setup>
33
29
  /**
34
30
  * keyboard 键盘
35
31
  * @description 此组件键盘面板,内含了数字键盘,车牌号键,身份证号键盘3中模式,都有可以打乱按键顺序的选项。
32
+ * @tutorial http://www.fusions.top/components/keyboard.html
36
33
  * @property {String} mode = [number|card|car] 键盘类型(默认 'number' )
37
34
  * @value number 数字键盘
38
35
  * @value card 身份证键盘
@@ -46,7 +43,7 @@
46
43
  * @property {Boolean} random = [true|false] 是否打乱键盘按键的顺序 (默认 false )
47
44
  * @property {Boolean} safeArea = [true|false] 是否开启底部安全区适配 (默认 true )
48
45
  * @property {Boolean} isMaskClick = [true|false] 是否允许点击遮罩收起键盘 (默认 true )
49
- * @property {String,Number} zIndex 弹出键盘的z-index值 (默认 1025 )
46
+ * @property {String | Number} zIndex 弹出键盘的z-index值 (默认 1025 )
50
47
  * @property {String} cancelText 取消按钮的文字 (默认 '取消')
51
48
  * @property {String} confirmText 确认按钮的文字 (默认 '确定')
52
49
  *
@@ -56,68 +53,46 @@
56
53
  * @event {Function} backspace 键盘退格键被点击
57
54
  * @example <fu-keyboard ref="keyboardRef" mode="number"></fu-keyboard>
58
55
  */
59
- export default {
60
- name: "FuKeyboard",
61
- mixins: [mpMixin, props],
62
- emits: ['close','change','confirm','cancel','backspace','changeCarInputMode'],
63
- components: {
64
- KeyboardCar,
65
- KeyboardNumber
66
- },
67
- methods: {
68
- // 打开
69
- open() {
70
- this.$refs.popup.open();
71
- },
72
-
73
- // 关闭
74
- close() {
75
- this.$refs.popup.close();
76
- this.$emit('close')
77
- },
78
-
79
- change(e) {
80
- this.$emit('change', e);
81
- },
82
-
83
- // 输入完成
84
- handleConfirm() {
85
- this.$emit('confirm');
86
- if(this.closeOnClickConfirm) this.close();
87
- },
88
-
89
- // 取消输入
90
- handleCancel() {
91
- this.$emit('cancel');
92
- this.close();
93
- },
94
-
95
- // 退格键
96
- backspace() {
97
- this.$emit('backspace');
98
- },
99
-
100
- // car模式切换中文|英文方法
101
- changeCarInputMode(e) {
102
- this.$emit('changeCarInputMode',e);
103
- },
104
-
105
- changeCarMode() {
106
- this.$refs.fuKeyboardCarRef && this.$refs.fuKeyboardCarRef.changeCarInputMode();
107
- }
108
- }
109
- }
56
+ import KeyboardCar from './keyboard-car.vue'
57
+ import KeyboardNumber from './keyboard-number.vue'
58
+ import { keyboardProps, keyboardEmits } from './keyboard';
59
+ import { useKeyboard } from './composables';
60
+
61
+ defineOptions({ name: 'FuKeyboard', options: { virtualHost: true } });
62
+
63
+ const props = defineProps(keyboardProps);
64
+ const $emit = defineEmits(keyboardEmits);
65
+
66
+ const {
67
+ popupRef,
68
+ keyboardCarRef,
69
+ open,
70
+ close,
71
+ change,
72
+ handleConfirm,
73
+ handleCancel,
74
+ backspace,
75
+ changeCarInputMode,
76
+ changeCarMode
77
+ } = useKeyboard(props, $emit);
78
+
79
+ // 暴露方法给父组件
80
+ defineExpose({
81
+ open,
82
+ close,
83
+ changeCarMode
84
+ });
110
85
  </script>
111
86
 
112
87
  <style lang="scss" scoped>
113
- @import '../../libs/style/components.scss';
114
- @import '../../libs/style/color.scss';
88
+ @use '../../../style/components.scss';
89
+ @use '../../../style/color.scss' as *;
115
90
  $show-hover: 1;
116
91
 
117
92
  .fu-keyboard {
118
93
 
119
94
  &__tooltip {
120
- @include flex(row);
95
+ @include components.flex(row);
121
96
  justify-content: space-between;
122
97
  background-color: #FFFFFF;
123
98
  padding: 14px 12px;
@@ -131,7 +106,7 @@
131
106
 
132
107
  &__submit {
133
108
  text-align: right;
134
- color: $fu-primary;
109
+ color: $fu-color-primary;
135
110
  }
136
111
 
137
112
  &__cancel {
@@ -0,0 +1 @@
1
+ export * from './src/line'
@@ -0,0 +1 @@
1
+ export * from './line-custom'
@@ -0,0 +1,30 @@
1
+ import { computed, type CSSProperties } from 'vue';
2
+ import type { LineProps } from '../line';
3
+
4
+ export const useLineCustomStyle = (props: LineProps) => {
5
+ const lineStyle = computed<CSSProperties>(() => {
6
+ const style: Record<string, any> = {
7
+ margin: uni.$fu.addUnit(props.margin),
8
+ borderColor: props.color
9
+ };
10
+ // 如果是水平线条,边框高度为1px,再通过transform缩小一半,就是0.5px了
11
+ if (props.direction === 'row') {
12
+ // 此处采用兼容分开写,兼容nvue的写法
13
+ style.borderBottomWidth = uni.$fu.addUnit(props.borderWidth) || '1px';
14
+ style.borderBottomStyle = props.borderStyle || 'solid';
15
+ style.width = uni.$fu.addUnit(props.length);
16
+ if (props.hairline) style.transform = 'scaleY(0.5)'
17
+ } else {
18
+ // 如果是竖向线条,边框宽度为1px,再通过transform缩小一半,就是0.5px了
19
+ style.borderLeftWidth = uni.$fu.addUnit(props.borderWidth) || '1px';
20
+ style.borderLeftStyle = props.borderStyle || 'solid';
21
+ style.height = uni.$fu.addUnit(props.length);
22
+ if (props.hairline) style.transform = 'scaleX(0.5)'
23
+ }
24
+ return uni.$fu.deepMerge(style, uni.$fu.addStyle(props.customStyle))
25
+ });
26
+
27
+ return {
28
+ lineStyle
29
+ }
30
+ }
@@ -0,0 +1,82 @@
1
+ import type { ExtractPropTypes } from 'vue';
2
+ import { componentProps } from "../../../constants";
3
+
4
+ /**
5
+ * 线条direction有效值
6
+ */
7
+ export const lineDirections = ['col', 'row'] as const;
8
+
9
+ /**
10
+ * 线条borderStyle有效值
11
+ */
12
+ export const lineBorderStyles = ['solid', 'dashed', 'dotted'] as const;
13
+
14
+ export const lineProps = {
15
+ /**
16
+ * @description 线条的颜色
17
+ * @default '#d8d9da'
18
+ * @example <fu-line color="red"></fu-line>
19
+ */
20
+ color: {
21
+ type: String,
22
+ default: '#d8d9da'
23
+ },
24
+ /**
25
+ * @description 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
26
+ * @example <fu-line length="100px"></fu-line>
27
+ */
28
+ length: {
29
+ type: [String, Number],
30
+ default: '100%'
31
+ },
32
+ /**
33
+ * @description 线条方向
34
+ * @values 'col' - 竖向, 'row' - 横向
35
+ * @default 'row'
36
+ * @example <fu-line direction="col"></fu-line>
37
+ */
38
+ direction: {
39
+ type: String,
40
+ values: lineDirections,
41
+ default: 'row'
42
+ },
43
+ /**
44
+ * @description 是否显示细边框
45
+ * @default true
46
+ * @example <fu-line :hairline="false"></fu-line>
47
+ */
48
+ hairline: {
49
+ type: Boolean,
50
+ default: true
51
+ },
52
+ /**
53
+ * @description 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
54
+ * @example <fu-line margin="30rpx 20rpx"></fu-line>
55
+ */
56
+ margin: {
57
+ type: [String, Number],
58
+ default: ''
59
+ },
60
+ /**
61
+ * @description 设置线条类型
62
+ * @values 'solid' - 实线, 'dashed' - 方形虚线, 'dotted' - 圆点虚线
63
+ * @default 'solid'
64
+ * @example <fu-line borderStyle="dashed"></fu-line>
65
+ */
66
+ borderStyle: {
67
+ type: String,
68
+ values: lineBorderStyles,
69
+ default: 'solid'
70
+ },
71
+ /**
72
+ * @description 设置线条宽度
73
+ * @example <fu-line borderWidth="2px"></fu-line>
74
+ */
75
+ borderWidth: {
76
+ type: [String, Number],
77
+ default: ''
78
+ },
79
+ ...componentProps
80
+ };
81
+
82
+ export type LineProps = ExtractPropTypes<typeof lineProps>
@@ -0,0 +1,44 @@
1
+ <template>
2
+ <view class="fu-line" :class="[customClass]" :style="[lineStyle]"></view>
3
+ </template>
4
+
5
+ <script lang="ts" setup>
6
+ /**
7
+ * line 线条
8
+ * @description 此组件一般用于显示一根线条,用于分隔内容块,有横向和竖向两种模式,且能设置0.5px线条,使用也很简单
9
+ * @tutorial http://www.fusions.top/components/line.html
10
+ * @property {String} color 线条的颜色 (默认 '#d8d9da')
11
+ * @property {String | Number} length 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等 (默认 '100%')
12
+ * @property {String} direction = [row|col] 线条的方向,row 横向,col 竖向 (默认 'row')
13
+ * @value row 横向
14
+ * @value col 竖向
15
+ * @property {Boolean} hairline = [true|false] 是否显示细线条 (默认 true)
16
+ * @property {String | Number} margin 线条与上下左右元素的间距,字符串形式,如"30px" (默认 0)
17
+ * @property {String} borderStyle = [solid|dashed|dotted] 设置线条类型 (默认 solid)
18
+ * @value solid 实线
19
+ * @value dashed 方形虚线
20
+ * @value dotted 圆点虚线
21
+ * @property {String | Number} borderWidth 设置线条宽度(默认 1px)
22
+ * @property {String} customClass 定义需要用到的外部类
23
+ * @property {String | Object} customStyle 定义需要用到的外部样式
24
+ *
25
+ * @example <fu-line color="red"></fu-line>
26
+ */
27
+ import { lineProps } from './line';
28
+ import { useLineCustomStyle } from './composables';
29
+
30
+ defineOptions({ name: 'FuLine', options: { virtualHost: true } });
31
+
32
+ const props = defineProps(lineProps);
33
+ const {
34
+ lineStyle
35
+ } = useLineCustomStyle(props);
36
+ </script>
37
+
38
+ <style lang="scss" scoped>
39
+ .fu-line {
40
+ /* #ifndef APP-NVUE */
41
+ vertical-align: middle;
42
+ /* #endif */
43
+ }
44
+ </style>
@@ -0,0 +1 @@
1
+ export * from './src/link'
@@ -0,0 +1,2 @@
1
+ export * from './link-custom'
2
+ export * from './use-link'
@@ -0,0 +1,19 @@
1
+ import { computed, type CSSProperties } from 'vue';
2
+ import type { LinkProps } from '../link';
3
+
4
+ export const useLinkCustomStyle = (props: LinkProps) => {
5
+ const linkStyle = computed<CSSProperties>(() => {
6
+ const style = {
7
+ color: props.color,
8
+ fontSize: uni.$fu.addUnit(props.size),
9
+ // line-height设置为比字体大小多2px
10
+ lineHeight: uni.$fu.addUnit(uni.$fu.getPx(props.size) + 2),
11
+ textDecoration: props.underLine ? 'underline' : 'none'
12
+ }
13
+ return uni.$fu.deepMerge(style, uni.$fu.addStyle(props.customStyle))
14
+ });
15
+
16
+ return {
17
+ linkStyle
18
+ }
19
+ }
@@ -0,0 +1,33 @@
1
+ import { SetupContext, nextTick } from 'vue';
2
+ import type { LinkProps, LinkEmits } from '../link';
3
+
4
+ export const useLink = (props: LinkProps, $emit: SetupContext<LinkEmits>['emit']) => {
5
+ const handleClick = (e: any) => {
6
+ // #ifdef APP-PLUS
7
+ plus.runtime.openURL(props.href)
8
+ // #endif
9
+ // #ifdef H5
10
+ window.open(props.href)
11
+ // #endif
12
+ // #ifdef MP
13
+ uni.setClipboardData({
14
+ data: props.href,
15
+ success: () => {
16
+ uni.hideToast();
17
+ nextTick(() => {
18
+ uni.showToast({
19
+ title: props.mpTips,
20
+ icon: 'none',
21
+ mask: true,
22
+ })
23
+ })
24
+ }
25
+ });
26
+ // #endif
27
+ $emit('click', e)
28
+ }
29
+
30
+ return {
31
+ handleClick
32
+ }
33
+ }
@@ -0,0 +1,61 @@
1
+ import type { ExtractPropTypes } from "vue";
2
+ import { componentProps } from "../../../constants";
3
+
4
+ export const linkProps = {
5
+ /**
6
+ * @description 文字颜色
7
+ */
8
+ color: {
9
+ type: String,
10
+ default: ''
11
+ },
12
+ /**
13
+ * @description 字体大小
14
+ * @default 15
15
+ */
16
+ size: {
17
+ type: [String, Number],
18
+ default: 15
19
+ },
20
+ /**
21
+ * @description 是否显示下划线
22
+ * @default false
23
+ */
24
+ underLine: {
25
+ type: Boolean,
26
+ default: false
27
+ },
28
+ /**
29
+ * @description 要跳转的链接
30
+ */
31
+ href: {
32
+ type: String,
33
+ default: ''
34
+ },
35
+ /**
36
+ * @description 小程序中复制到粘贴板的提示语
37
+ * @default '链接已复制,请在浏览器打开'
38
+ */
39
+ mpTips: {
40
+ type: String,
41
+ default: '链接已复制,请在浏览器打开'
42
+ },
43
+ /**
44
+ * @description 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
45
+ */
46
+ text: {
47
+ type: String,
48
+ default: ''
49
+ },
50
+ ...componentProps
51
+ }
52
+
53
+ export const linkEmits = {
54
+ /**
55
+ * 超链接点击事件
56
+ */
57
+ click: (_e: any) => true
58
+ }
59
+
60
+ export type LinkProps = ExtractPropTypes<typeof linkProps>;
61
+ export type LinkEmits = typeof linkEmits;
@@ -0,0 +1,62 @@
1
+ <template>
2
+ <text
3
+ class="fu-link"
4
+ :class="[customClass]"
5
+ :style="[linkStyle]"
6
+ @tap.stop="handleClick">
7
+ <slot>
8
+ {{ text }}
9
+ </slot>
10
+ </text>
11
+ </template>
12
+
13
+ <script lang="ts" setup>
14
+ /**
15
+ * Link 超链接
16
+ * @description 此组件为超链接组件,在不同平台有不同表现形式:在APP平台会通过plus环境打开内置浏览器,在小程序中把链接复制到粘贴板,同时提示信息,在H5中通过window.open打开链接。
17
+ * @tutorial http://www.fusions.top/components/link.html
18
+ * @property {String} color 文字颜色
19
+ * @property {String | Number} size 字体大小(默认 15)
20
+ * @property {Boolean} underLine = [true|false] 是否显示下划线 (默认 false)
21
+ * @property {String} href 跳转的链接,要带上http(s)
22
+ * @property {String} mpTips 各个小程序平台把链接复制到粘贴板后的提示语(默认“链接已复制,请在浏览器打开”)
23
+ * @property {String} text 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
24
+ * @property {String} customClass 定义需要用到的外部类
25
+ * @property {String | Object} customStyle 定义需要用到的外部样式
26
+ *
27
+ * @event {Function} click 点击链接触发
28
+ * @example <fu-link text="不同平台有不同表现形式" href="http://www.fusions.top"></fu-link>
29
+ */
30
+ import { computed } from 'vue';
31
+ import { linkEmits, linkProps } from './link';
32
+ import { useLink, useLinkCustomStyle } from './composables';
33
+
34
+ defineOptions({ name: 'FuLink', options: { virtualHost: true } });
35
+
36
+ const props = defineProps(linkProps);
37
+ const $emit = defineEmits(linkEmits);
38
+
39
+ const {
40
+ handleClick
41
+ } = useLink(props, $emit);
42
+
43
+ const {
44
+ linkStyle
45
+ } = useLinkCustomStyle(props);
46
+ </script>
47
+
48
+ <style lang="scss" scoped>
49
+ @use '../../../style/components.scss';
50
+ @use '../../../style/color.scss' as *;
51
+ $fu-link-line-height:1 !default;
52
+
53
+ .fu-link {
54
+ /* #ifndef APP-NVUE */
55
+ line-height: $fu-link-line-height;
56
+ /* #endif */
57
+ @include components.flex;
58
+ flex: 1;
59
+ flex-wrap: wrap;
60
+ color: $fu-color-primary;
61
+ }
62
+ </style>
@@ -0,0 +1 @@
1
+ export * from './src/loading'