stellar-ui-plus 1.16.18

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 (382) hide show
  1. package/README.md +176 -0
  2. package/common/css/common.scss +19 -0
  3. package/common/useProps.js +9 -0
  4. package/components/ste-animate/ATTRIBUTES.md +10 -0
  5. package/components/ste-animate/README.md +115 -0
  6. package/components/ste-animate/animate.scss +247 -0
  7. package/components/ste-animate/config.json +5 -0
  8. package/components/ste-animate/props.ts +9 -0
  9. package/components/ste-animate/ste-animate.easycom.json +39 -0
  10. package/components/ste-animate/ste-animate.scss +113 -0
  11. package/components/ste-animate/ste-animate.vue +67 -0
  12. package/components/ste-badge/ATTRIBUTES.md +17 -0
  13. package/components/ste-badge/README.md +162 -0
  14. package/components/ste-badge/config.json +5 -0
  15. package/components/ste-badge/props.ts +17 -0
  16. package/components/ste-badge/ste-badge.easycom.json +96 -0
  17. package/components/ste-badge/ste-badge.vue +157 -0
  18. package/components/ste-barcode/ATTRIBUTES.md +14 -0
  19. package/components/ste-barcode/README.md +28 -0
  20. package/components/ste-barcode/config.json +5 -0
  21. package/components/ste-barcode/encode.ts +317 -0
  22. package/components/ste-barcode/props.ts +7 -0
  23. package/components/ste-barcode/ste-barcode.easycom.json +44 -0
  24. package/components/ste-barcode/ste-barcode.vue +152 -0
  25. package/components/ste-button/ATTRIBUTES.md +32 -0
  26. package/components/ste-button/README.md +119 -0
  27. package/components/ste-button/config.json +5 -0
  28. package/components/ste-button/props.ts +21 -0
  29. package/components/ste-button/ste-button.easycom.json +168 -0
  30. package/components/ste-button/ste-button.vue +275 -0
  31. package/components/ste-calendar/ATTRIBUTES.md +31 -0
  32. package/components/ste-calendar/README.md +241 -0
  33. package/components/ste-calendar/config.json +5 -0
  34. package/components/ste-calendar/date.ts +110 -0
  35. package/components/ste-calendar/props.ts +26 -0
  36. package/components/ste-calendar/ste-calendar.easycom.json +172 -0
  37. package/components/ste-calendar/ste-calendar.vue +376 -0
  38. package/components/ste-calendar/useData.ts +30 -0
  39. package/components/ste-checkbox/ATTRIBUTES.md +25 -0
  40. package/components/ste-checkbox/README.md +302 -0
  41. package/components/ste-checkbox/config.json +5 -0
  42. package/components/ste-checkbox/props.ts +33 -0
  43. package/components/ste-checkbox/ste-checkbox.easycom.json +151 -0
  44. package/components/ste-checkbox/ste-checkbox.vue +206 -0
  45. package/components/ste-checkbox/type.d.ts +2 -0
  46. package/components/ste-checkbox-group/props.ts +34 -0
  47. package/components/ste-checkbox-group/ste-checkbox-group.vue +34 -0
  48. package/components/ste-code-input/ATTRIBUTES.md +22 -0
  49. package/components/ste-code-input/README.md +56 -0
  50. package/components/ste-code-input/config.json +5 -0
  51. package/components/ste-code-input/props.ts +19 -0
  52. package/components/ste-code-input/ste-code-input.easycom.json +99 -0
  53. package/components/ste-code-input/ste-code-input.vue +222 -0
  54. package/components/ste-date-picker/ATTRIBUTES.md +25 -0
  55. package/components/ste-date-picker/README.md +119 -0
  56. package/components/ste-date-picker/config.json +5 -0
  57. package/components/ste-date-picker/props.ts +62 -0
  58. package/components/ste-date-picker/ste-date-picker.easycom.json +137 -0
  59. package/components/ste-date-picker/ste-date-picker.vue +290 -0
  60. package/components/ste-date-picker/types.d.ts +3 -0
  61. package/components/ste-drag/ATTRIBUTES.md +13 -0
  62. package/components/ste-drag/README.md +88 -0
  63. package/components/ste-drag/config.json +5 -0
  64. package/components/ste-drag/props.ts +10 -0
  65. package/components/ste-drag/ste-drag.easycom.json +50 -0
  66. package/components/ste-drag/ste-drag.vue +172 -0
  67. package/components/ste-dropdown-menu/ATTRIBUTES.md +22 -0
  68. package/components/ste-dropdown-menu/README.md +325 -0
  69. package/components/ste-dropdown-menu/config.json +5 -0
  70. package/components/ste-dropdown-menu/constans.ts +4 -0
  71. package/components/ste-dropdown-menu/props.ts +30 -0
  72. package/components/ste-dropdown-menu/ste-dropdown-menu.easycom.json +111 -0
  73. package/components/ste-dropdown-menu/ste-dropdown-menu.scss +99 -0
  74. package/components/ste-dropdown-menu/ste-dropdown-menu.vue +223 -0
  75. package/components/ste-dropdown-menu-item/props.ts +17 -0
  76. package/components/ste-dropdown-menu-item/ste-dropdown-menu-item.scss +61 -0
  77. package/components/ste-dropdown-menu-item/ste-dropdown-menu-item.vue +84 -0
  78. package/components/ste-dropdown-menu-item/type.d.ts +4 -0
  79. package/components/ste-icon/ATTRIBUTES.md +19 -0
  80. package/components/ste-icon/README.md +72 -0
  81. package/components/ste-icon/config.json +5 -0
  82. package/components/ste-icon/iconfont.css +22 -0
  83. package/components/ste-icon/props.ts +14 -0
  84. package/components/ste-icon/ste-icon.easycom.json +71 -0
  85. package/components/ste-icon/ste-icon.vue +80 -0
  86. package/components/ste-image/ATTRIBUTES.md +21 -0
  87. package/components/ste-image/README.md +118 -0
  88. package/components/ste-image/config.json +5 -0
  89. package/components/ste-image/props.ts +15 -0
  90. package/components/ste-image/ste-image.easycom.json +189 -0
  91. package/components/ste-image/ste-image.vue +146 -0
  92. package/components/ste-index-item/props.ts +4 -0
  93. package/components/ste-index-item/ste-index-item.vue +83 -0
  94. package/components/ste-index-list/ATTRIBUTES.md +15 -0
  95. package/components/ste-index-list/README.md +138 -0
  96. package/components/ste-index-list/config.json +5 -0
  97. package/components/ste-index-list/props.ts +17 -0
  98. package/components/ste-index-list/ste-index-list.easycom.json +48 -0
  99. package/components/ste-index-list/ste-index-list.vue +109 -0
  100. package/components/ste-input/ATTRIBUTES.md +37 -0
  101. package/components/ste-input/README.md +130 -0
  102. package/components/ste-input/config.json +5 -0
  103. package/components/ste-input/props.ts +46 -0
  104. package/components/ste-input/ste-input.easycom.json +282 -0
  105. package/components/ste-input/ste-input.scss +124 -0
  106. package/components/ste-input/ste-input.vue +221 -0
  107. package/components/ste-loading/ATTRIBUTES.md +11 -0
  108. package/components/ste-loading/README.md +74 -0
  109. package/components/ste-loading/config.json +5 -0
  110. package/components/ste-loading/props.ts +8 -0
  111. package/components/ste-loading/ste-loading.easycom.json +54 -0
  112. package/components/ste-loading/ste-loading.vue +127 -0
  113. package/components/ste-media-preview/ATTRIBUTES.md +20 -0
  114. package/components/ste-media-preview/README.md +252 -0
  115. package/components/ste-media-preview/TouchScaleing.ts +117 -0
  116. package/components/ste-media-preview/config.json +5 -0
  117. package/components/ste-media-preview/props.ts +12 -0
  118. package/components/ste-media-preview/ste-media-preview.easycom.json +88 -0
  119. package/components/ste-media-preview/ste-media-preview.vue +201 -0
  120. package/components/ste-media-preview/useData.ts +63 -0
  121. package/components/ste-message-box/ATTRIBUTES.md +6 -0
  122. package/components/ste-message-box/README.md +222 -0
  123. package/components/ste-message-box/config.json +5 -0
  124. package/components/ste-message-box/constants.ts +25 -0
  125. package/components/ste-message-box/ste-message-box.easycom.json +14 -0
  126. package/components/ste-message-box/ste-message-box.ts +1 -0
  127. package/components/ste-message-box/ste-message-box.vue +355 -0
  128. package/components/ste-message-box/use-message-box.ts +26 -0
  129. package/components/ste-message-box/useData.ts +56 -0
  130. package/components/ste-notice-bar/ATTRIBUTES.md +22 -0
  131. package/components/ste-notice-bar/README.md +124 -0
  132. package/components/ste-notice-bar/config.json +5 -0
  133. package/components/ste-notice-bar/props.ts +15 -0
  134. package/components/ste-notice-bar/ste-notice-bar.easycom.json +109 -0
  135. package/components/ste-notice-bar/ste-notice-bar.vue +262 -0
  136. package/components/ste-number-keyboard/ATTRIBUTES.md +31 -0
  137. package/components/ste-number-keyboard/KeyboardVue.vue +142 -0
  138. package/components/ste-number-keyboard/README.md +192 -0
  139. package/components/ste-number-keyboard/config.json +5 -0
  140. package/components/ste-number-keyboard/props.ts +35 -0
  141. package/components/ste-number-keyboard/ste-number-keyboard.easycom.json +177 -0
  142. package/components/ste-number-keyboard/ste-number-keyboard.vue +81 -0
  143. package/components/ste-number-keyboard/useData.ts +144 -0
  144. package/components/ste-picker/props.ts +16 -0
  145. package/components/ste-picker/ste-picker.vue +194 -0
  146. package/components/ste-popup/ATTRIBUTES.md +24 -0
  147. package/components/ste-popup/README.md +135 -0
  148. package/components/ste-popup/config.json +6 -0
  149. package/components/ste-popup/event.ts +0 -0
  150. package/components/ste-popup/props.ts +19 -0
  151. package/components/ste-popup/ste-popup.easycom.json +122 -0
  152. package/components/ste-popup/ste-popup.vue +253 -0
  153. package/components/ste-price/ATTRIBUTES.md +26 -0
  154. package/components/ste-price/README.md +110 -0
  155. package/components/ste-price/config.json +5 -0
  156. package/components/ste-price/props.ts +23 -0
  157. package/components/ste-price/ste-price.easycom.json +154 -0
  158. package/components/ste-price/ste-price.vue +148 -0
  159. package/components/ste-progress/ATTRIBUTES.md +17 -0
  160. package/components/ste-progress/README.md +88 -0
  161. package/components/ste-progress/config.json +5 -0
  162. package/components/ste-progress/props.ts +16 -0
  163. package/components/ste-progress/ste-progress.easycom.json +80 -0
  164. package/components/ste-progress/ste-progress.vue +135 -0
  165. package/components/ste-qrcode/ATTRIBUTES.md +16 -0
  166. package/components/ste-qrcode/README.md +34 -0
  167. package/components/ste-qrcode/config.json +5 -0
  168. package/components/ste-qrcode/props.ts +16 -0
  169. package/components/ste-qrcode/ste-qrcode.easycom.json +56 -0
  170. package/components/ste-qrcode/ste-qrcode.vue +134 -0
  171. package/components/ste-qrcode/uqrcode.d.ts +57 -0
  172. package/components/ste-qrcode/uqrcode.js +34 -0
  173. package/components/ste-radio/ATTRIBUTES.md +25 -0
  174. package/components/ste-radio/README.md +260 -0
  175. package/components/ste-radio/config.json +5 -0
  176. package/components/ste-radio/props.ts +33 -0
  177. package/components/ste-radio/ste-radio.easycom.json +150 -0
  178. package/components/ste-radio/ste-radio.vue +188 -0
  179. package/components/ste-radio/type.d.ts +2 -0
  180. package/components/ste-radio-group/props.ts +33 -0
  181. package/components/ste-radio-group/ste-radio-group.vue +34 -0
  182. package/components/ste-rate/ATTRIBUTES.md +21 -0
  183. package/components/ste-rate/README.md +97 -0
  184. package/components/ste-rate/config.json +5 -0
  185. package/components/ste-rate/props.ts +16 -0
  186. package/components/ste-rate/ste-rate.easycom.json +85 -0
  187. package/components/ste-rate/ste-rate.vue +143 -0
  188. package/components/ste-read-more/ATTRIBUTES.md +16 -0
  189. package/components/ste-read-more/README.md +93 -0
  190. package/components/ste-read-more/config.json +5 -0
  191. package/components/ste-read-more/props.ts +9 -0
  192. package/components/ste-read-more/ste-read-more.easycom.json +54 -0
  193. package/components/ste-read-more/ste-read-more.vue +106 -0
  194. package/components/ste-rich-text/ATTRIBUTES.md +8 -0
  195. package/components/ste-rich-text/README.md +26 -0
  196. package/components/ste-rich-text/config.json +5 -0
  197. package/components/ste-rich-text/props.ts +8 -0
  198. package/components/ste-rich-text/ste-rich-text.easycom.json +40 -0
  199. package/components/ste-rich-text/ste-rich-text.vue +33 -0
  200. package/components/ste-scroll-to/ATTRIBUTES.md +11 -0
  201. package/components/ste-scroll-to/README.md +47 -0
  202. package/components/ste-scroll-to/config.json +5 -0
  203. package/components/ste-scroll-to/props.ts +17 -0
  204. package/components/ste-scroll-to/ste-scroll-to.easycom.json +25 -0
  205. package/components/ste-scroll-to/ste-scroll-to.vue +42 -0
  206. package/components/ste-scroll-to/useData.ts +214 -0
  207. package/components/ste-scroll-to-item/ste-scroll-to-item.vue +24 -0
  208. package/components/ste-search/ATTRIBUTES.md +39 -0
  209. package/components/ste-search/README.md +232 -0
  210. package/components/ste-search/config.json +5 -0
  211. package/components/ste-search/props.ts +124 -0
  212. package/components/ste-search/ste-search.easycom.json +232 -0
  213. package/components/ste-search/ste-search.vue +379 -0
  214. package/components/ste-search/useData.ts +34 -0
  215. package/components/ste-select/ATTRIBUTES.md +39 -0
  216. package/components/ste-select/README.md +324 -0
  217. package/components/ste-select/config.json +5 -0
  218. package/components/ste-select/datapager.vue +54 -0
  219. package/components/ste-select/datetime.vue +109 -0
  220. package/components/ste-select/defaultDate.ts +138 -0
  221. package/components/ste-select/props.ts +67 -0
  222. package/components/ste-select/ste-select.easycom.json +287 -0
  223. package/components/ste-select/ste-select.vue +437 -0
  224. package/components/ste-select/useData.ts +471 -0
  225. package/components/ste-signature/ATTRIBUTES.md +18 -0
  226. package/components/ste-signature/README.md +97 -0
  227. package/components/ste-signature/config.json +5 -0
  228. package/components/ste-signature/props.ts +12 -0
  229. package/components/ste-signature/ste-signature.easycom.json +74 -0
  230. package/components/ste-signature/ste-signature.vue +183 -0
  231. package/components/ste-signature/types.d.ts +4 -0
  232. package/components/ste-slider/ATTRIBUTES.md +25 -0
  233. package/components/ste-slider/README.md +149 -0
  234. package/components/ste-slider/config.json +5 -0
  235. package/components/ste-slider/props.ts +32 -0
  236. package/components/ste-slider/ste-slider.easycom.json +128 -0
  237. package/components/ste-slider/ste-slider.scss +150 -0
  238. package/components/ste-slider/ste-slider.vue +293 -0
  239. package/components/ste-slider/type.d.ts +4 -0
  240. package/components/ste-slider/useData.ts +79 -0
  241. package/components/ste-step/props.ts +10 -0
  242. package/components/ste-step/ste-step.scss +104 -0
  243. package/components/ste-step/ste-step.vue +122 -0
  244. package/components/ste-stepper/ATTRIBUTES.md +33 -0
  245. package/components/ste-stepper/README.md +172 -0
  246. package/components/ste-stepper/config.json +5 -0
  247. package/components/ste-stepper/props.ts +41 -0
  248. package/components/ste-stepper/ste-stepper.easycom.json +220 -0
  249. package/components/ste-stepper/ste-stepper.vue +249 -0
  250. package/components/ste-steps/ATTRIBUTES.md +12 -0
  251. package/components/ste-steps/README.md +139 -0
  252. package/components/ste-steps/config.json +5 -0
  253. package/components/ste-steps/props.ts +18 -0
  254. package/components/ste-steps/ste-steps.easycom.json +46 -0
  255. package/components/ste-steps/ste-steps.vue +44 -0
  256. package/components/ste-sticky/ATTRIBUTES.md +15 -0
  257. package/components/ste-sticky/README.md +56 -0
  258. package/components/ste-sticky/config.json +5 -0
  259. package/components/ste-sticky/props.ts +7 -0
  260. package/components/ste-sticky/ste-sticky.easycom.json +48 -0
  261. package/components/ste-sticky/ste-sticky.vue +88 -0
  262. package/components/ste-swipe-action/ATTRIBUTES.md +16 -0
  263. package/components/ste-swipe-action/README.md +195 -0
  264. package/components/ste-swipe-action/config.json +5 -0
  265. package/components/ste-swipe-action/props.ts +23 -0
  266. package/components/ste-swipe-action/ste-swipe-action.easycom.json +74 -0
  267. package/components/ste-swipe-action/ste-swipe-action.vue +138 -0
  268. package/components/ste-swipe-action/useData.ts +204 -0
  269. package/components/ste-swipe-action-group/ATTRIBUTES.md +17 -0
  270. package/components/ste-swipe-action-group/props.ts +22 -0
  271. package/components/ste-swipe-action-group/ste-swipe-action-group.easycom.json +90 -0
  272. package/components/ste-swipe-action-group/ste-swipe-action-group.vue +57 -0
  273. package/components/ste-swiper/ATTRIBUTES.md +24 -0
  274. package/components/ste-swiper/README.md +156 -0
  275. package/components/ste-swiper/config.json +5 -0
  276. package/components/ste-swiper/props.ts +41 -0
  277. package/components/ste-swiper/ste-swiper.easycom.json +123 -0
  278. package/components/ste-swiper/ste-swiper.vue +98 -0
  279. package/components/ste-swiper/useData.ts +365 -0
  280. package/components/ste-swiper-item/ste-swiper-item.vue +41 -0
  281. package/components/ste-switch/ATTRIBUTES.md +17 -0
  282. package/components/ste-switch/README.md +105 -0
  283. package/components/ste-switch/config.json +5 -0
  284. package/components/ste-switch/props.ts +9 -0
  285. package/components/ste-switch/ste-switch.easycom.json +60 -0
  286. package/components/ste-switch/ste-switch.vue +96 -0
  287. package/components/ste-tab/ATTRIBUTES.md +14 -0
  288. package/components/ste-tab/props.ts +25 -0
  289. package/components/ste-tab/ste-tab.easycom.json +56 -0
  290. package/components/ste-tab/ste-tab.vue +26 -0
  291. package/components/ste-table/ATTRIBUTES.md +41 -0
  292. package/components/ste-table/README.md +638 -0
  293. package/components/ste-table/config.json +5 -0
  294. package/components/ste-table/props.ts +72 -0
  295. package/components/ste-table/ste-table.easycom.json +188 -0
  296. package/components/ste-table/ste-table.vue +427 -0
  297. package/components/ste-table/types.d.ts +3 -0
  298. package/components/ste-table/useData.ts +233 -0
  299. package/components/ste-table/utils.ts +11 -0
  300. package/components/ste-table-column/checkbox-icon.vue +35 -0
  301. package/components/ste-table-column/common.scss +52 -0
  302. package/components/ste-table-column/props.ts +18 -0
  303. package/components/ste-table-column/radio-icon.vue +99 -0
  304. package/components/ste-table-column/ste-table-column.vue +169 -0
  305. package/components/ste-table-column/var.scss +1 -0
  306. package/components/ste-tabs/ATTRIBUTES.md +52 -0
  307. package/components/ste-tabs/README.md +165 -0
  308. package/components/ste-tabs/config.json +5 -0
  309. package/components/ste-tabs/props.ts +133 -0
  310. package/components/ste-tabs/ste-tabs.easycom.json +278 -0
  311. package/components/ste-tabs/ste-tabs.vue +447 -0
  312. package/components/ste-tabs/useData.ts +364 -0
  313. package/components/ste-text/ATTRIBUTES.md +9 -0
  314. package/components/ste-text/README.md +58 -0
  315. package/components/ste-text/config.json +6 -0
  316. package/components/ste-text/props.ts +10 -0
  317. package/components/ste-text/ste-text.easycom.json +30 -0
  318. package/components/ste-text/ste-text.vue +46 -0
  319. package/components/ste-toast/ATTRIBUTES.md +15 -0
  320. package/components/ste-toast/README.md +222 -0
  321. package/components/ste-toast/config.json +5 -0
  322. package/components/ste-toast/props.ts +7 -0
  323. package/components/ste-toast/ste-toast.easycom.json +73 -0
  324. package/components/ste-toast/ste-toast.vue +209 -0
  325. package/components/ste-toast/use-toast.ts +26 -0
  326. package/components/ste-touch-swipe/ATTRIBUTES.md +18 -0
  327. package/components/ste-touch-swipe/README.md +89 -0
  328. package/components/ste-touch-swipe/TouchEvent.ts +79 -0
  329. package/components/ste-touch-swipe/config.json +5 -0
  330. package/components/ste-touch-swipe/props.ts +23 -0
  331. package/components/ste-touch-swipe/ste-touch-swipe.easycom.json +83 -0
  332. package/components/ste-touch-swipe/ste-touch-swipe.vue +283 -0
  333. package/components/ste-touch-swipe/useData.ts +51 -0
  334. package/components/ste-touch-swipe-item/ste-touch-swipe-item.vue +32 -0
  335. package/components/ste-tour/ATTRIBUTES.md +26 -0
  336. package/components/ste-tour/README.md +134 -0
  337. package/components/ste-tour/config.json +5 -0
  338. package/components/ste-tour/props.ts +45 -0
  339. package/components/ste-tour/ste-tour.easycom.json +120 -0
  340. package/components/ste-tour/ste-tour.vue +152 -0
  341. package/components/ste-tour/useData.ts +220 -0
  342. package/components/ste-tree/ATTRIBUTES.md +19 -0
  343. package/components/ste-tree/README.md +217 -0
  344. package/components/ste-tree/config.json +5 -0
  345. package/components/ste-tree/props.ts +24 -0
  346. package/components/ste-tree/ste-tree.easycom.json +106 -0
  347. package/components/ste-tree/ste-tree.vue +140 -0
  348. package/components/ste-tree/useData.ts +219 -0
  349. package/components/ste-upload/ATTRIBUTES.md +35 -0
  350. package/components/ste-upload/README.md +208 -0
  351. package/components/ste-upload/ReadFile.ts +305 -0
  352. package/components/ste-upload/config.json +5 -0
  353. package/components/ste-upload/props.ts +25 -0
  354. package/components/ste-upload/ste-upload.easycom.json +267 -0
  355. package/components/ste-upload/ste-upload.vue +386 -0
  356. package/components/ste-upload/useData.ts +46 -0
  357. package/components/ste-video/ATTRIBUTES.md +34 -0
  358. package/components/ste-video/README.md +48 -0
  359. package/components/ste-video/config.json +5 -0
  360. package/components/ste-video/props.ts +86 -0
  361. package/components/ste-video/ste-video.easycom.json +226 -0
  362. package/components/ste-video/ste-video.scss +201 -0
  363. package/components/ste-video/ste-video.vue +390 -0
  364. package/components/ste-video/types.d.ts +4 -0
  365. package/components/ste-video/useData.ts +140 -0
  366. package/composables.ts +2 -0
  367. package/config/color.ts +16 -0
  368. package/config/index.ts +48 -0
  369. package/index.ts +118 -0
  370. package/package.json +22 -0
  371. package/store/color.ts +24 -0
  372. package/store/index.ts +12 -0
  373. package/store/message-box.ts +54 -0
  374. package/store/toast.ts +50 -0
  375. package/types/components.d.ts +124 -0
  376. package/types/event.d.ts +51 -0
  377. package/types/index.d.ts +112 -0
  378. package/types/refComponents.d.ts +118 -0
  379. package/utils/Color.ts +66 -0
  380. package/utils/System.ts +114 -0
  381. package/utils/mixin.ts +122 -0
  382. package/utils/utils.ts +520 -0
@@ -0,0 +1,118 @@
1
+ import steAnimate from "../components/ste-animate/ste-animate.vue"
2
+ import steBadge from "../components/ste-badge/ste-badge.vue"
3
+ import steBarcode from "../components/ste-barcode/ste-barcode.vue"
4
+ import steButton from "../components/ste-button/ste-button.vue"
5
+ import steCalendar from "../components/ste-calendar/ste-calendar.vue"
6
+ import steCheckbox from "../components/ste-checkbox/ste-checkbox.vue"
7
+ import steCheckboxGroup from "../components/ste-checkbox-group/ste-checkbox-group.vue"
8
+ import steCodeInput from "../components/ste-code-input/ste-code-input.vue"
9
+ import steDatePicker from "../components/ste-date-picker/ste-date-picker.vue"
10
+ import steDrag from "../components/ste-drag/ste-drag.vue"
11
+ import steDropdownMenu from "../components/ste-dropdown-menu/ste-dropdown-menu.vue"
12
+ import steDropdownMenuItem from "../components/ste-dropdown-menu-item/ste-dropdown-menu-item.vue"
13
+ import steIcon from "../components/ste-icon/ste-icon.vue"
14
+ import steImage from "../components/ste-image/ste-image.vue"
15
+ import steIndexItem from "../components/ste-index-item/ste-index-item.vue"
16
+ import steIndexList from "../components/ste-index-list/ste-index-list.vue"
17
+ import steInput from "../components/ste-input/ste-input.vue"
18
+ import steLoading from "../components/ste-loading/ste-loading.vue"
19
+ import steMediaPreview from "../components/ste-media-preview/ste-media-preview.vue"
20
+ import steMessageBox from "../components/ste-message-box/ste-message-box.vue"
21
+ import steNoticeBar from "../components/ste-notice-bar/ste-notice-bar.vue"
22
+ import steNumberKeyboard from "../components/ste-number-keyboard/ste-number-keyboard.vue"
23
+ import stePicker from "../components/ste-picker/ste-picker.vue"
24
+ import stePopup from "../components/ste-popup/ste-popup.vue"
25
+ import stePrice from "../components/ste-price/ste-price.vue"
26
+ import steProgress from "../components/ste-progress/ste-progress.vue"
27
+ import steQrcode from "../components/ste-qrcode/ste-qrcode.vue"
28
+ import steRadio from "../components/ste-radio/ste-radio.vue"
29
+ import steRadioGroup from "../components/ste-radio-group/ste-radio-group.vue"
30
+ import steRate from "../components/ste-rate/ste-rate.vue"
31
+ import steReadMore from "../components/ste-read-more/ste-read-more.vue"
32
+ import steRichText from "../components/ste-rich-text/ste-rich-text.vue"
33
+ import steScrollTo from "../components/ste-scroll-to/ste-scroll-to.vue"
34
+ import steScrollToItem from "../components/ste-scroll-to-item/ste-scroll-to-item.vue"
35
+ import steSearch from "../components/ste-search/ste-search.vue"
36
+ import steSelect from "../components/ste-select/ste-select.vue"
37
+ import steSignature from "../components/ste-signature/ste-signature.vue"
38
+ import steSlider from "../components/ste-slider/ste-slider.vue"
39
+ import steStep from "../components/ste-step/ste-step.vue"
40
+ import steStepper from "../components/ste-stepper/ste-stepper.vue"
41
+ import steSteps from "../components/ste-steps/ste-steps.vue"
42
+ import steSticky from "../components/ste-sticky/ste-sticky.vue"
43
+ import steSwipeAction from "../components/ste-swipe-action/ste-swipe-action.vue"
44
+ import steSwipeActionGroup from "../components/ste-swipe-action-group/ste-swipe-action-group.vue"
45
+ import steSwiper from "../components/ste-swiper/ste-swiper.vue"
46
+ import steSwiperItem from "../components/ste-swiper-item/ste-swiper-item.vue"
47
+ import steSwitch from "../components/ste-switch/ste-switch.vue"
48
+ import steTab from "../components/ste-tab/ste-tab.vue"
49
+ import steTable from "../components/ste-table/ste-table.vue"
50
+ import steTableColumn from "../components/ste-table-column/ste-table-column.vue"
51
+ import steTabs from "../components/ste-tabs/ste-tabs.vue"
52
+ import steText from "../components/ste-text/ste-text.vue"
53
+ import steToast from "../components/ste-toast/ste-toast.vue"
54
+ import steTouchSwipe from "../components/ste-touch-swipe/ste-touch-swipe.vue"
55
+ import steTouchSwipeItem from "../components/ste-touch-swipe-item/ste-touch-swipe-item.vue"
56
+ import steTour from "../components/ste-tour/ste-tour.vue"
57
+ import steTree from "../components/ste-tree/ste-tree.vue"
58
+ import steUpload from "../components/ste-upload/ste-upload.vue"
59
+ import steVideo from "../components/ste-video/ste-video.vue"
60
+ export type RefAnimate = InstanceType<typeof steAnimate>
61
+ export type RefBadge = InstanceType<typeof steBadge>
62
+ export type RefBarcode = InstanceType<typeof steBarcode>
63
+ export type RefButton = InstanceType<typeof steButton>
64
+ export type RefCalendar = InstanceType<typeof steCalendar>
65
+ export type RefCheckbox = InstanceType<typeof steCheckbox>
66
+ export type RefCheckboxGroup = InstanceType<typeof steCheckboxGroup>
67
+ export type RefCodeInput = InstanceType<typeof steCodeInput>
68
+ export type RefDatePicker = InstanceType<typeof steDatePicker>
69
+ export type RefDrag = InstanceType<typeof steDrag>
70
+ export type RefDropdownMenu = InstanceType<typeof steDropdownMenu>
71
+ export type RefDropdownMenuItem = InstanceType<typeof steDropdownMenuItem>
72
+ export type RefIcon = InstanceType<typeof steIcon>
73
+ export type RefImage = InstanceType<typeof steImage>
74
+ export type RefIndexItem = InstanceType<typeof steIndexItem>
75
+ export type RefIndexList = InstanceType<typeof steIndexList>
76
+ export type RefInput = InstanceType<typeof steInput>
77
+ export type RefLoading = InstanceType<typeof steLoading>
78
+ export type RefMediaPreview = InstanceType<typeof steMediaPreview>
79
+ export type RefMessageBox = InstanceType<typeof steMessageBox>
80
+ export type RefNoticeBar = InstanceType<typeof steNoticeBar>
81
+ export type RefNumberKeyboard = InstanceType<typeof steNumberKeyboard>
82
+ export type RefPicker = InstanceType<typeof stePicker>
83
+ export type RefPopup = InstanceType<typeof stePopup>
84
+ export type RefPrice = InstanceType<typeof stePrice>
85
+ export type RefProgress = InstanceType<typeof steProgress>
86
+ export type RefQrcode = InstanceType<typeof steQrcode>
87
+ export type RefRadio = InstanceType<typeof steRadio>
88
+ export type RefRadioGroup = InstanceType<typeof steRadioGroup>
89
+ export type RefRate = InstanceType<typeof steRate>
90
+ export type RefReadMore = InstanceType<typeof steReadMore>
91
+ export type RefRichText = InstanceType<typeof steRichText>
92
+ export type RefScrollTo = InstanceType<typeof steScrollTo>
93
+ export type RefScrollToItem = InstanceType<typeof steScrollToItem>
94
+ export type RefSearch = InstanceType<typeof steSearch>
95
+ export type RefSelect = InstanceType<typeof steSelect>
96
+ export type RefSignature = InstanceType<typeof steSignature>
97
+ export type RefSlider = InstanceType<typeof steSlider>
98
+ export type RefStep = InstanceType<typeof steStep>
99
+ export type RefStepper = InstanceType<typeof steStepper>
100
+ export type RefSteps = InstanceType<typeof steSteps>
101
+ export type RefSticky = InstanceType<typeof steSticky>
102
+ export type RefSwipeAction = InstanceType<typeof steSwipeAction>
103
+ export type RefSwipeActionGroup = InstanceType<typeof steSwipeActionGroup>
104
+ export type RefSwiper = InstanceType<typeof steSwiper>
105
+ export type RefSwiperItem = InstanceType<typeof steSwiperItem>
106
+ export type RefSwitch = InstanceType<typeof steSwitch>
107
+ export type RefTab = InstanceType<typeof steTab>
108
+ export type RefTable = InstanceType<typeof steTable>
109
+ export type RefTableColumn = InstanceType<typeof steTableColumn>
110
+ export type RefTabs = InstanceType<typeof steTabs>
111
+ export type RefText = InstanceType<typeof steText>
112
+ export type RefToast = InstanceType<typeof steToast>
113
+ export type RefTouchSwipe = InstanceType<typeof steTouchSwipe>
114
+ export type RefTouchSwipeItem = InstanceType<typeof steTouchSwipeItem>
115
+ export type RefTour = InstanceType<typeof steTour>
116
+ export type RefTree = InstanceType<typeof steTree>
117
+ export type RefUpload = InstanceType<typeof steUpload>
118
+ export type RefVideo = InstanceType<typeof steVideo>
package/utils/Color.ts ADDED
@@ -0,0 +1,66 @@
1
+ const rgbReg = /^rgb\(\s?(\d{1,3})\s?\,\s?(\d{1,3})\s?\,\s?(\d{1,3})\s?\)/
2
+ const rgbaReg = /^rgba\(\s?(\d{1,3}\s?\,\s?\d{1,3}\s?\,\s?\d{1,3})\s?\,\s?([\d\.]+)\s?\)/
3
+ const hexReg = /^\#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/
4
+ const hexaReg = /^\#([0-9a-fA-F]{4}|[0-9a-fA-F]{8})$/
5
+
6
+ class Color {
7
+ static hex2rgba(hex: string, a = 1) {
8
+ const str = hex.toLowerCase()
9
+ const result = []
10
+ let sColor = str.replace(hexReg, '$1')
11
+ if (sColor.length === 3)
12
+ sColor = sColor.split('').map(s => s + s).join('')
13
+
14
+ for (let i = 0; i < 6; i += 2)
15
+ result.push(Number.parseInt(sColor.slice(i, i + 2), 16))
16
+
17
+ return `rgba(${result.join(',')},${a})`
18
+ }
19
+
20
+ static hexa2rgba(hexa: string, a: number) {
21
+ const str = hexa.toLowerCase()
22
+ const result = []
23
+
24
+ let sColor = str.replace(hexaReg, '$1')
25
+ if (sColor.length === 4)
26
+ sColor = sColor.split('').map(s => s + s).join('')
27
+
28
+ for (let i = 0; i < 6; i += 2)
29
+ result.push(Number.parseInt(sColor.slice(i, i + 2), 16))
30
+
31
+ const _a = a || Number(Number.parseInt(sColor.slice(6, 8), 16) / 255).toFixed(2)
32
+ return `rgba(${result.join(',')},${_a})`
33
+ }
34
+
35
+ static rgb2rgba(rgb: string, a = 1) {
36
+ const result = []
37
+ for (let i = 1; i <= 3; i++)
38
+ result.push(rgb.replace(rgbReg, `$${i}`))
39
+
40
+ return `rgba(${result.join(',')},${a})`
41
+ }
42
+
43
+ static setRgbaDiaphaneity(rgba: string, a: number) {
44
+ const _rgb = rgba.replace(rgbaReg, '$1')
45
+ const _a = a || rgba.replace(rgbaReg, '$2')
46
+ return `rgba(${_rgb},${_a})`
47
+ }
48
+
49
+ static formatColor(color: string, a: number) {
50
+ if (hexReg.test(color))
51
+ return Color.hex2rgba(color, a)
52
+
53
+ if (hexaReg.test(color))
54
+ return Color.hexa2rgba(color, a)
55
+
56
+ if (rgbReg.test(color))
57
+ return Color.rgb2rgba(color, a)
58
+
59
+ if (rgbaReg.test(color) && a)
60
+ return Color.setRgbaDiaphaneity(color, a)
61
+
62
+ return color
63
+ }
64
+ }
65
+
66
+ export default Color
@@ -0,0 +1,114 @@
1
+ export default class System {
2
+ /**
3
+ * 获取设备设置
4
+ */
5
+ static getSystemSetting() {
6
+ // #ifdef MP-WEIXIN
7
+ return wx.getSystemSetting()
8
+ // #endif
9
+
10
+ // #ifndef MP-WEIXIN
11
+ return uni.getSystemInfoSync()
12
+ // #endif
13
+ }
14
+
15
+ /**
16
+ * 获取微信APP授权设置
17
+ */
18
+ static getAppAuthorizeSetting() {
19
+ // #ifdef MP-WEIXIN
20
+ return wx.getAppAuthorizeSetting()
21
+ // #endif
22
+
23
+ // #ifndef MP-WEIXIN
24
+ return uni.getSystemInfoSync()
25
+ // #endif
26
+ }
27
+
28
+ /**
29
+ * 获取设备基础信息
30
+ */
31
+ static getDeviceInfo() {
32
+ // #ifdef MP-WEIXIN
33
+ return wx.getDeviceInfo()
34
+ // #endif
35
+
36
+ // #ifndef MP-WEIXIN
37
+ return uni.getSystemInfoSync()
38
+ // #endif
39
+ }
40
+
41
+ /**
42
+ * 获取窗口信息
43
+ */
44
+ static getWindowInfo() {
45
+ // #ifdef MP-WEIXIN
46
+ const res: any = wx.getWindowInfo()
47
+ res.safeAreaInsets = {
48
+ bottom: res.screenHeight - res.safeArea.bottom,
49
+ }
50
+ return wx.getWindowInfo()
51
+ // #endif
52
+
53
+ // #ifndef MP-WEIXIN
54
+ return uni.getSystemInfoSync()
55
+ // #endif
56
+ }
57
+
58
+ /**
59
+ * 获取微信APP基础信息
60
+ */
61
+ static getAppBaseInfo() {
62
+ // #ifdef MP-WEIXIN
63
+ return wx.getAppBaseInfo()
64
+ // #endif
65
+
66
+ // #ifndef MP-WEIXIN
67
+ return uni.getSystemInfoSync()
68
+ // #endif
69
+ }
70
+
71
+ /**
72
+ * 获取屏幕宽度
73
+ */
74
+ static getWindowWidth() {
75
+ return System.getWindowInfo().windowWidth
76
+ }
77
+
78
+ /**
79
+ * 获取屏幕高度
80
+ */
81
+ static getWindowHeight() {
82
+ return System.getWindowInfo().windowHeight
83
+ }
84
+
85
+ /**
86
+ * 获取手机顶部安全区域距离顶部的距离(状态栏高度)
87
+ */
88
+ static getStatusBarHeight() {
89
+ return System.getWindowInfo().statusBarHeight
90
+ }
91
+
92
+ /**
93
+ * 获取导航栏底部安全区域距离底部的距离(底部安全区距离状态栏的距离)
94
+ */
95
+ static getNavbarBottom() {
96
+ // #ifdef H5 || APP
97
+ return 44
98
+ // #endif
99
+ const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
100
+ return menuButtonInfo.bottom + 8
101
+ }
102
+
103
+ static getElementBoundary(el: UniApp.NodeInfo) {
104
+ const vw = System.getWindowWidth() // 计算vw单位
105
+ const vh = System.getWindowHeight() // 计算vh单位
106
+ const { top = 0, left = 0, bottom = 0, right = 0 } = el
107
+ return {
108
+ top,
109
+ left,
110
+ bottom: vh - bottom,
111
+ right: vw - right,
112
+ }
113
+ }
114
+ }
package/utils/mixin.ts ADDED
@@ -0,0 +1,122 @@
1
+ import { computed, getCurrentInstance, inject, markRaw, onUnmounted, provide, ref, shallowReactive } from 'vue'
2
+ import type { ComponentInternalInstance, ConcreteComponent, InjectionKey, VNode, VNodeNormalizedChildren } from 'vue'
3
+ import type { Obj } from '../types'
4
+
5
+ export interface SelfComponentInternalInstance extends ComponentInternalInstance {
6
+ selfValue?: Obj
7
+ }
8
+
9
+ type ParentProvide<T> = T & {
10
+ add(child: SelfComponentInternalInstance): void
11
+ remove(child: SelfComponentInternalInstance): void
12
+ internalChildren: SelfComponentInternalInstance[]
13
+ }
14
+
15
+ export function useInject<T>(key: InjectionKey<ParentProvide<T>>, selfValue: Obj = {}) {
16
+ const parent = inject(key, null)
17
+ if (parent) {
18
+ const instance: SelfComponentInternalInstance = getCurrentInstance()!
19
+ const { add, remove, internalChildren } = parent
20
+
21
+ if (instance)
22
+ instance.selfValue = selfValue
23
+
24
+ add(instance)
25
+ onUnmounted(() => remove(instance))
26
+
27
+ const index = computed(() => internalChildren.indexOf(instance))
28
+
29
+ return {
30
+ parent,
31
+ index,
32
+ instance,
33
+ }
34
+ }
35
+
36
+ return {
37
+ parent: null,
38
+ index: ref(-1),
39
+ instance: null,
40
+ }
41
+ }
42
+
43
+ // TODO: uniapp 不支持 vue 直接导出的 isVNode
44
+ export function isVNode(value: any): value is VNode {
45
+ return value ? value.__v_isVNode === true : false
46
+ }
47
+
48
+ export function flattenVNodes(shouldTraverseChildren: VNodeNormalizedChildren, childName?: string) {
49
+ const result: VNode[] = []
50
+
51
+ const traverse = (children: VNodeNormalizedChildren) => {
52
+ if (!Array.isArray(children))
53
+ return
54
+ children.forEach((child) => {
55
+ if (!isVNode(child))
56
+ return
57
+
58
+ if (childName) {
59
+ if (child.type && (child.type as ConcreteComponent).name === childName) {
60
+ result.push(child)
61
+ return
62
+ }
63
+ }
64
+ else {
65
+ result.push(child)
66
+ }
67
+
68
+ if (child.component?.subTree)
69
+ traverse(child.component.subTree.children)
70
+
71
+ if (child.children)
72
+ traverse(child.children)
73
+ })
74
+ }
75
+
76
+ traverse(shouldTraverseChildren)
77
+
78
+ return result
79
+ }
80
+
81
+ export function sortChildren(parent: SelfComponentInternalInstance, internalChildren: SelfComponentInternalInstance[], childName?: string) {
82
+ const vnodes = flattenVNodes(parent && parent.subTree && parent.subTree.children, childName)
83
+ internalChildren.sort((a, b) => {
84
+ return vnodes.indexOf(a.vnode) - vnodes.indexOf(b.vnode)
85
+ })
86
+ }
87
+
88
+ // 如果指定组件名称,则只查找此组件并且查到后结束。也就是不关心此组件下的内容,在大部分场景下节省查找消耗。
89
+ export function useProvide<ProvideValue>(key: InjectionKey<ProvideValue>, childName?: string) {
90
+ const internalChildren: SelfComponentInternalInstance[] = shallowReactive([])
91
+ const publicChildren = shallowReactive<any[]>([])
92
+ const parent = getCurrentInstance()!
93
+
94
+ const add = (child: SelfComponentInternalInstance) => {
95
+ if (!child.proxy)
96
+ return
97
+ internalChildren.push(markRaw(child))
98
+ publicChildren.push(markRaw(child.proxy))
99
+ sortChildren(parent, internalChildren, childName)
100
+ }
101
+
102
+ const remove = (child: SelfComponentInternalInstance) => {
103
+ if (child.proxy) {
104
+ internalChildren.splice(internalChildren.indexOf(markRaw(child)), 1)
105
+ publicChildren.splice(publicChildren.indexOf(markRaw(child.proxy)), 1)
106
+ }
107
+ }
108
+
109
+ return (value?: ProvideValue) => {
110
+ provide(key, {
111
+ add,
112
+ remove,
113
+ internalChildren,
114
+ ...value,
115
+ } as any)
116
+
117
+ return {
118
+ internalChildren,
119
+ children: publicChildren,
120
+ }
121
+ }
122
+ }