@nutui/nutui 4.3.14 → 4.3.15-beta.2

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 (316) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +2 -2
  3. package/dist/nutui.es.js +2 -14
  4. package/dist/nutui.umd.js +19829 -1
  5. package/dist/packages/{Interceptor-CBzqGJrl.js → Interceptor-aNUpilAP.js} +1 -1
  6. package/dist/packages/actionsheet/ActionSheet.js +17 -11
  7. package/dist/packages/address/Address.js +139 -121
  8. package/dist/packages/addresslist/AddressList.js +22 -11
  9. package/dist/packages/animate/Animate.js +1 -1
  10. package/dist/packages/avatar/Avatar.js +1 -1
  11. package/dist/packages/avatarcropper/AvatarCropper.js +329 -126
  12. package/dist/packages/avatargroup/AvatarGroup.js +17 -10
  13. package/dist/packages/backtop/Backtop.js +42 -88
  14. package/dist/packages/badge/Badge.js +4 -2
  15. package/dist/packages/barrage/Barrage.js +76 -130
  16. package/dist/packages/button/Button.js +15 -8
  17. package/dist/packages/calendar/Calendar.js +173 -152
  18. package/dist/packages/calendarcard/CalendarCard.js +33 -61
  19. package/dist/packages/card/Card.js +12 -4
  20. package/dist/packages/cascader/Cascader.js +49 -37
  21. package/dist/packages/category/Category.js +13 -12
  22. package/dist/packages/categorypane/CategoryPane.js +13 -8
  23. package/dist/packages/cell/Cell.js +10 -16
  24. package/dist/packages/cellgroup/CellGroup.js +4 -2
  25. package/dist/packages/checkbox/Checkbox.js +1 -1
  26. package/dist/packages/circleprogress/CircleProgress.js +53 -69
  27. package/dist/packages/col/Col.js +1 -1
  28. package/dist/packages/collapse/Collapse.js +1 -1
  29. package/dist/packages/collapseitem/CollapseItem.js +74 -39
  30. package/dist/packages/comment/Comment.js +46 -24
  31. package/dist/packages/configprovider/ConfigProvider.js +1 -1
  32. package/dist/packages/countdown/Countdown.js +2 -2
  33. package/dist/packages/countup/Countup.js +53 -66
  34. package/dist/packages/datepicker/DatePicker.js +12 -7
  35. package/dist/packages/dialog/Dialog.js +27 -96
  36. package/dist/packages/dialog/index.mjs +1 -2
  37. package/dist/packages/divider/Divider.js +1 -1
  38. package/dist/packages/drag/Drag.js +95 -58
  39. package/dist/packages/ecard/Ecard.js +19 -16
  40. package/dist/packages/elevator/Elevator.js +86 -73
  41. package/dist/packages/ellipsis/Ellipsis.js +223 -121
  42. package/dist/packages/empty/Empty.js +5 -3
  43. package/dist/packages/fixednav/FixedNav.js +12 -7
  44. package/dist/packages/form/Form.js +2 -2
  45. package/dist/packages/formitem/FormItem.js +3 -1
  46. package/dist/packages/grid/Grid.js +1 -1
  47. package/dist/packages/griditem/GridItem.js +5 -15
  48. package/dist/packages/imagepreview/ImagePreview.js +192 -400
  49. package/dist/packages/imagepreview/index.mjs +1 -2
  50. package/dist/packages/{index-BOB4ytqZ.js → index-IxPZmHlb.js} +2 -2
  51. package/dist/packages/index-m0Wcof-q.js +69 -0
  52. package/dist/packages/{index-wLaOjIn1.js → index.taro-CNxLoYer.js} +6 -7
  53. package/dist/packages/index.taro.vue_vue_type_script_setup_true_lang-JJ7hr71Y.js +17 -0
  54. package/dist/packages/indicator/Indicator.js +2 -2
  55. package/dist/packages/input/Input.js +87 -70
  56. package/dist/packages/inputnumber/InputNumber.js +22 -14
  57. package/dist/packages/invoice/Invoice.js +3 -2
  58. package/dist/packages/list/List.js +114 -56
  59. package/dist/packages/menu/Menu.js +45 -40
  60. package/dist/packages/menuitem/MenuItem.js +53 -47
  61. package/dist/packages/navbar/Navbar.js +31 -17
  62. package/dist/packages/noticebar/Noticebar.js +68 -43
  63. package/dist/packages/notify/Notify.js +10 -157
  64. package/dist/packages/notify/index.mjs +1 -2
  65. package/dist/packages/numberkeyboard/NumberKeyboard.js +103 -109
  66. package/dist/packages/overlay/Overlay.js +6 -34
  67. package/dist/packages/pagination/Pagination.js +8 -5
  68. package/dist/packages/picker/Picker.js +113 -26
  69. package/dist/packages/popover/Popover.js +158 -88
  70. package/dist/packages/popup/Popup.js +1 -1
  71. package/dist/packages/price/Price.js +16 -3
  72. package/dist/packages/progress/Progress.js +7 -4
  73. package/dist/packages/radio/Radio.js +11 -12
  74. package/dist/packages/radiogroup/RadioGroup.js +2 -2
  75. package/dist/packages/{raf-c01wDYCo.js → raf-CzJhCkQo.js} +0 -9
  76. package/dist/packages/range/Range.js +139 -71
  77. package/dist/packages/rate/Rate.js +15 -49
  78. package/dist/packages/row/Row.js +1 -1
  79. package/dist/packages/searchbar/Searchbar.js +35 -27
  80. package/dist/packages/shortpassword/ShortPassword.js +51 -43
  81. package/dist/packages/sidenavbar/SideNavbar.js +3 -14
  82. package/dist/packages/sidenavbaritem/SideNavbarItem.js +2 -2
  83. package/dist/packages/signature/Signature.js +148 -106
  84. package/dist/packages/skeleton/Skeleton.js +6 -3
  85. package/dist/packages/sku/Sku.js +66 -42
  86. package/dist/packages/space/Space.js +2 -2
  87. package/dist/packages/step/Step.js +5 -2
  88. package/dist/packages/steps/Steps.js +1 -1
  89. package/dist/packages/sticky/Sticky.js +32 -71
  90. package/dist/packages/subsidenavbar/SubSideNavbar.js +13 -5
  91. package/dist/packages/swipe/Swipe.js +37 -14
  92. package/dist/packages/swipegroup/SwipeGroup.js +2 -2
  93. package/dist/packages/swiper/Swiper.js +73 -24
  94. package/dist/packages/switch/Switch.js +6 -4
  95. package/dist/packages/tabbar/Tabbar.js +23 -24
  96. package/dist/packages/tabbaritem/TabbarItem.js +8 -3
  97. package/dist/packages/table/Table.js +10 -6
  98. package/dist/packages/tabs/Tabs.js +146 -150
  99. package/dist/packages/tag/Tag.js +5 -5
  100. package/dist/packages/textarea/Textarea.js +144 -69
  101. package/dist/packages/timedetail/TimeDetail.js +2 -2
  102. package/dist/packages/timepannel/TimePannel.js +2 -2
  103. package/dist/packages/timeselect/TimeSelect.js +9 -11
  104. package/dist/packages/toast/Toast.js +50 -186
  105. package/dist/packages/toast/index.mjs +1 -2
  106. package/dist/packages/tour/Tour.js +145 -99
  107. package/dist/packages/trendarrow/TrendArrow.js +7 -4
  108. package/dist/packages/uploader/Uploader.js +263 -106
  109. package/dist/packages/{util-D1pvnUYu.js → util-2G3mRQeF.js} +5 -17
  110. package/dist/packages/watermark/Watermark.js +95 -35
  111. package/dist/smartips/web-types.json +380 -770
  112. package/dist/style.css +1 -1
  113. package/dist/styles/base-jda.css +1 -0
  114. package/dist/styles/themes/default.scss +0 -1
  115. package/dist/styles/themes/jda.scss +106 -0
  116. package/dist/styles/themes/jdb.scss +0 -1
  117. package/dist/styles/themes/jddkh.scss +0 -1
  118. package/dist/styles/themes/jdt.scss +0 -1
  119. package/dist/styles/variables-jda.scss +945 -0
  120. package/dist/types/__VUE/actionsheet/{index.vue.d.ts → index.taro.vue.d.ts} +5 -112
  121. package/dist/types/__VUE/address/{index.vue.d.ts → index.taro.vue.d.ts} +139 -412
  122. package/dist/types/__VUE/addresslist/components/{GeneralShell.vue.d.ts → GeneralShell.taro.vue.d.ts} +45 -134
  123. package/dist/types/__VUE/addresslist/components/ItemContents.taro.vue.d.ts +27 -0
  124. package/dist/types/__VUE/addresslist/{index.vue.d.ts → index.taro.vue.d.ts} +85 -155
  125. package/dist/types/__VUE/animate/{index.d.ts → index.taro.d.ts} +2 -2
  126. package/dist/types/__VUE/avatarcropper/{index.vue.d.ts → index.taro.vue.d.ts} +90 -147
  127. package/dist/types/__VUE/backtop/{backtop.vue.d.ts → backtop.taro.vue.d.ts} +8 -19
  128. package/dist/types/__VUE/backtop/{index.d.ts → index.taro.d.ts} +2 -2
  129. package/dist/types/__VUE/badge/{index.d.ts → index.taro.d.ts} +2 -2
  130. package/dist/types/__VUE/barrage/{index.vue.d.ts → index.taro.vue.d.ts} +10 -5
  131. package/dist/types/__VUE/button/{button.vue.d.ts → button.taro.vue.d.ts} +7 -1
  132. package/dist/types/__VUE/button/{index.d.ts → index.taro.d.ts} +2 -2
  133. package/dist/types/__VUE/calendar/{index.vue.d.ts → index.taro.vue.d.ts} +59 -94
  134. package/dist/types/__VUE/calendarcard/{index.d.ts → index.taro.d.ts} +2 -2
  135. package/dist/types/__VUE/calendaritem/{index.vue.d.ts → index.taro.vue.d.ts} +22 -4
  136. package/dist/types/__VUE/card/{index.vue.d.ts → index.taro.vue.d.ts} +13 -13
  137. package/dist/types/__VUE/cascader/{cascader-item.vue.d.ts → cascader-item.taro.vue.d.ts} +47 -229
  138. package/dist/types/__VUE/cascader/{index.vue.d.ts → index.taro.vue.d.ts} +50 -287
  139. package/dist/types/__VUE/category/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
  140. package/dist/types/__VUE/cell/{cell.vue.d.ts → cell.taro.vue.d.ts} +0 -15
  141. package/dist/types/__VUE/cell/{index.d.ts → index.taro.d.ts} +2 -2
  142. package/dist/types/__VUE/cellgroup/{index.d.ts → index.taro.d.ts} +2 -2
  143. package/dist/types/__VUE/circleprogress/{circle-progress.vue.d.ts → circle-progress.taro.vue.d.ts} +0 -4
  144. package/dist/types/__VUE/circleprogress/{index.d.ts → index.taro.d.ts} +2 -2
  145. package/dist/types/__VUE/col/{index.d.ts → index.taro.d.ts} +2 -2
  146. package/dist/types/__VUE/collapse/{index.d.ts → index.taro.d.ts} +2 -2
  147. package/dist/types/__VUE/collapseitem/collapse-item.taro.vue.d.ts +94 -0
  148. package/dist/types/__VUE/collapseitem/{index.d.ts → index.taro.d.ts} +2 -2
  149. package/dist/types/__VUE/comment/components/CmtBottom.taro.vue.d.ts +47 -0
  150. package/dist/types/__VUE/comment/components/CmtHeader.taro.vue.d.ts +122 -0
  151. package/dist/types/__VUE/comment/components/{CmtImages.vue.d.ts → CmtImages.taro.vue.d.ts} +2 -55
  152. package/dist/types/__VUE/comment/index.taro.vue.d.ts +333 -0
  153. package/dist/types/__VUE/countdown/{index.d.ts → index.taro.d.ts} +2 -2
  154. package/dist/types/__VUE/countup/{index.vue.d.ts → index.taro.vue.d.ts} +5 -7
  155. package/dist/types/__VUE/datepicker/{index.vue.d.ts → index.taro.vue.d.ts} +31 -2
  156. package/dist/types/__VUE/dialog/{index.vue.d.ts → index.taro.vue.d.ts} +52 -85
  157. package/dist/types/__VUE/divider/{index.d.ts → index.taro.d.ts} +2 -2
  158. package/dist/types/__VUE/drag/{index.vue.d.ts → index.taro.vue.d.ts} +2 -0
  159. package/dist/types/__VUE/elevator/{index.vue.d.ts → index.taro.vue.d.ts} +40 -5
  160. package/dist/types/__VUE/ellipsis/{index.vue.d.ts → index.taro.vue.d.ts} +11 -6
  161. package/dist/types/__VUE/empty/{index.d.ts → index.taro.d.ts} +2 -2
  162. package/dist/types/__VUE/fixednav/{index.vue.d.ts → index.taro.vue.d.ts} +2 -55
  163. package/dist/types/__VUE/form/{index.d.ts → index.taro.d.ts} +2 -2
  164. package/dist/types/__VUE/formitem/{index.d.ts → index.taro.d.ts} +2 -2
  165. package/dist/types/__VUE/grid/{index.d.ts → index.taro.d.ts} +2 -2
  166. package/dist/types/__VUE/griditem/{grid-item.vue.d.ts → grid-item.taro.vue.d.ts} +3 -21
  167. package/dist/types/__VUE/griditem/{index.d.ts → index.taro.d.ts} +2 -2
  168. package/dist/types/__VUE/imagepreview/index.taro.vue.d.ts +732 -0
  169. package/dist/types/__VUE/indicator/{index.d.ts → index.taro.d.ts} +2 -2
  170. package/dist/types/__VUE/input/{index.d.ts → index.taro.d.ts} +2 -2
  171. package/dist/types/__VUE/input/{input.vue.d.ts → input.taro.vue.d.ts} +14 -6
  172. package/dist/types/__VUE/inputnumber/{index.d.ts → index.taro.d.ts} +2 -2
  173. package/dist/types/__VUE/invoice/{index.d.ts → index.taro.d.ts} +2 -2
  174. package/dist/types/__VUE/layout/{index.d.ts → index.taro.d.ts} +1 -1
  175. package/dist/types/__VUE/list/{index.vue.d.ts → index.taro.vue.d.ts} +32 -4
  176. package/dist/types/__VUE/menu/index.taro.vue.d.ts +104 -0
  177. package/dist/types/__VUE/menuitem/{index.vue.d.ts → index.taro.vue.d.ts} +22 -114
  178. package/dist/types/__VUE/navbar/{index.d.ts → index.taro.d.ts} +2 -2
  179. package/dist/types/__VUE/noticebar/{index.vue.d.ts → index.taro.vue.d.ts} +9 -116
  180. package/dist/types/__VUE/notify/{index.vue.d.ts → index.taro.vue.d.ts} +2 -66
  181. package/dist/types/__VUE/numberkeyboard/{index.vue.d.ts → index.taro.vue.d.ts} +14 -60
  182. package/dist/types/__VUE/overlay/{index.d.ts → index.taro.d.ts} +2 -2
  183. package/dist/types/__VUE/picker/{index.vue.d.ts → index.taro.vue.d.ts} +31 -2
  184. package/dist/types/__VUE/popover/{index.vue.d.ts → index.taro.vue.d.ts} +4 -56
  185. package/dist/types/__VUE/popup/{index.vue.d.ts → index.taro.vue.d.ts} +3 -56
  186. package/dist/types/__VUE/price/{index.d.ts → index.taro.d.ts} +2 -2
  187. package/dist/types/__VUE/progress/{index.d.ts → index.taro.d.ts} +2 -2
  188. package/dist/types/__VUE/radio/{index.d.ts → index.taro.d.ts} +2 -2
  189. package/dist/types/__VUE/radiogroup/{index.d.ts → index.taro.d.ts} +2 -2
  190. package/dist/types/__VUE/range/{index.vue.d.ts → index.taro.vue.d.ts} +3 -2
  191. package/dist/types/__VUE/rate/{index.d.ts → index.taro.d.ts} +2 -2
  192. package/dist/types/__VUE/rate/rate.taro.vue.d.ts +95 -0
  193. package/dist/types/__VUE/row/{index.d.ts → index.taro.d.ts} +2 -2
  194. package/dist/types/__VUE/scroll-view/index.taro.vue.d.ts +9 -0
  195. package/dist/types/__VUE/searchbar/{index.vue.d.ts → index.taro.vue.d.ts} +23 -121
  196. package/dist/types/__VUE/shortpassword/{index.vue.d.ts → index.taro.vue.d.ts} +5 -112
  197. package/dist/types/__VUE/sidenavbar/{index.vue.d.ts → index.taro.vue.d.ts} +0 -9
  198. package/dist/types/__VUE/signature/{index.vue.d.ts → index.taro.vue.d.ts} +53 -31
  199. package/dist/types/__VUE/skeleton/{index.d.ts → index.taro.d.ts} +2 -2
  200. package/dist/types/__VUE/sku/components/{SkuHeader.vue.d.ts → SkuHeader.taro.vue.d.ts} +6 -6
  201. package/dist/types/__VUE/sku/{index.vue.d.ts → index.taro.vue.d.ts} +25 -62
  202. package/dist/types/__VUE/step/{index.d.ts → index.taro.d.ts} +2 -2
  203. package/dist/types/__VUE/steps/{index.d.ts → index.taro.d.ts} +2 -2
  204. package/dist/types/__VUE/sticky/{index.vue.d.ts → index.taro.vue.d.ts} +7 -26
  205. package/dist/types/__VUE/subsidenavbar/index.taro.vue.d.ts +45 -0
  206. package/dist/types/__VUE/swipe/{index.d.ts → index.taro.d.ts} +2 -2
  207. package/dist/types/__VUE/swipegroup/{index.d.ts → index.taro.d.ts} +2 -2
  208. package/dist/types/__VUE/swiper/{index.vue.d.ts → index.taro.vue.d.ts} +6 -5
  209. package/dist/types/__VUE/switch/{index.d.ts → index.taro.d.ts} +2 -2
  210. package/dist/types/__VUE/tabbar/{index.d.ts → index.taro.d.ts} +2 -2
  211. package/dist/types/__VUE/tabbaritem/{index.d.ts → index.taro.d.ts} +2 -2
  212. package/dist/types/__VUE/table/{index.vue.d.ts → index.taro.vue.d.ts} +2 -55
  213. package/dist/types/__VUE/tabs/{index.vue.d.ts → index.taro.vue.d.ts} +27 -118
  214. package/dist/types/__VUE/tag/{index.d.ts → index.taro.d.ts} +2 -2
  215. package/dist/types/__VUE/textarea/{index.d.ts → index.taro.d.ts} +2 -2
  216. package/dist/types/__VUE/textarea/{textarea.vue.d.ts → textarea.taro.vue.d.ts} +1 -1
  217. package/dist/types/__VUE/timeselect/{index.vue.d.ts → index.taro.vue.d.ts} +3 -66
  218. package/dist/types/__VUE/toast/{index.vue.d.ts → index.taro.vue.d.ts} +16 -12
  219. package/dist/types/__VUE/tour/{index.vue.d.ts → index.taro.vue.d.ts} +13 -121
  220. package/dist/types/__VUE/trendarrow/{index.d.ts → index.taro.d.ts} +2 -2
  221. package/dist/types/__VUE/uploader/{index.vue.d.ts → index.taro.vue.d.ts} +268 -286
  222. package/dist/types/__VUE/watermark/{index.d.ts → index.taro.d.ts} +2 -2
  223. package/dist/types/index.d.ts +145 -155
  224. package/package.json +1 -1
  225. package/dist/nutui.js +0 -15854
  226. package/dist/packages/audio/Audio.js +0 -271
  227. package/dist/packages/audio/index.mjs +0 -2
  228. package/dist/packages/audiooperate/AudioOperate.js +0 -125
  229. package/dist/packages/audiooperate/index.mjs +0 -2
  230. package/dist/packages/image/Image.js +0 -167
  231. package/dist/packages/image/index.mjs +0 -2
  232. package/dist/packages/index-B1qsj2XR.js +0 -33
  233. package/dist/packages/index-BvmDLUYP.js +0 -31
  234. package/dist/packages/index-aiGQ-EiA.js +0 -8
  235. package/dist/packages/infiniteloading/InfiniteLoading.js +0 -184
  236. package/dist/packages/infiniteloading/index.mjs +0 -2
  237. package/dist/packages/mountComponent-CLi4Nz91.js +0 -39
  238. package/dist/packages/pullrefresh/PullRefresh.js +0 -240
  239. package/dist/packages/pullrefresh/index.mjs +0 -2
  240. package/dist/packages/types-BMA1Y94E.js +0 -4
  241. package/dist/packages/video/Video.js +0 -449
  242. package/dist/packages/video/index.mjs +0 -2
  243. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +0 -134
  244. package/dist/types/__VUE/audio/index.vue.d.ts +0 -323
  245. package/dist/types/__VUE/audio/types.d.ts +0 -3
  246. package/dist/types/__VUE/audiooperate/index.vue.d.ts +0 -229
  247. package/dist/types/__VUE/collapseitem/collapse-item.vue.d.ts +0 -201
  248. package/dist/types/__VUE/comment/components/CmtBottom.vue.d.ts +0 -208
  249. package/dist/types/__VUE/comment/components/CmtHeader.vue.d.ts +0 -248
  250. package/dist/types/__VUE/comment/index.vue.d.ts +0 -728
  251. package/dist/types/__VUE/dialog/index.d.ts +0 -44
  252. package/dist/types/__VUE/image/image.vue.d.ts +0 -111
  253. package/dist/types/__VUE/image/index.d.ts +0 -6
  254. package/dist/types/__VUE/image/types.d.ts +0 -2
  255. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +0 -267
  256. package/dist/types/__VUE/imagepreview/index.d.ts +0 -36
  257. package/dist/types/__VUE/imagepreview/index.vue.d.ts +0 -1088
  258. package/dist/types/__VUE/infiniteloading/index.vue.d.ts +0 -140
  259. package/dist/types/__VUE/menu/index.vue.d.ts +0 -210
  260. package/dist/types/__VUE/notify/index.d.ts +0 -22
  261. package/dist/types/__VUE/pullrefresh/index.vue.d.ts +0 -200
  262. package/dist/types/__VUE/rate/rate.vue.d.ts +0 -208
  263. package/dist/types/__VUE/subsidenavbar/index.vue.d.ts +0 -152
  264. package/dist/types/__VUE/toast/index.d.ts +0 -12
  265. package/dist/types/__VUE/video/index.vue.d.ts +0 -149
  266. package/dist/packages/{index-Do4_KY74.js → index.taro-Do4_KY74.js} +0 -0
  267. package/dist/types/__VUE/animate/{animate.vue.d.ts → animate.taro.vue.d.ts} +0 -0
  268. package/dist/types/__VUE/avatar/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  269. package/dist/types/__VUE/avatargroup/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  270. package/dist/types/__VUE/badge/{badge.vue.d.ts → badge.taro.vue.d.ts} +0 -0
  271. package/dist/types/__VUE/calendarcard/{calendar-card.vue.d.ts → calendar-card.taro.vue.d.ts} +0 -0
  272. package/dist/types/__VUE/calendarcard/{icon.d.ts → icon.taro.d.ts} +0 -0
  273. package/dist/types/__VUE/categorypane/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  274. package/dist/types/__VUE/cellgroup/{cell-group.vue.d.ts → cell-group.taro.vue.d.ts} +0 -0
  275. package/dist/types/__VUE/checkbox/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  276. package/dist/types/__VUE/checkboxgroup/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  277. package/dist/types/__VUE/col/{col.vue.d.ts → col.taro.vue.d.ts} +0 -0
  278. package/dist/types/__VUE/collapse/{collapse.vue.d.ts → collapse.taro.vue.d.ts} +0 -0
  279. package/dist/types/__VUE/configprovider/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  280. package/dist/types/__VUE/countdown/{countdown.vue.d.ts → countdown.taro.vue.d.ts} +0 -0
  281. package/dist/types/__VUE/divider/{divider.vue.d.ts → divider.taro.vue.d.ts} +0 -0
  282. package/dist/types/__VUE/ecard/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  283. package/dist/types/__VUE/empty/{empty.vue.d.ts → empty.taro.vue.d.ts} +0 -0
  284. package/dist/types/__VUE/form/{form.vue.d.ts → form.taro.vue.d.ts} +0 -0
  285. package/dist/types/__VUE/formitem/{form-item.vue.d.ts → form-item.taro.vue.d.ts} +0 -0
  286. package/dist/types/__VUE/grid/{grid.vue.d.ts → grid.taro.vue.d.ts} +0 -0
  287. package/dist/types/__VUE/indicator/{indicator.vue.d.ts → indicator.taro.vue.d.ts} +0 -0
  288. package/dist/types/__VUE/inputnumber/{input-number.vue.d.ts → input-number.taro.vue.d.ts} +0 -0
  289. package/dist/types/__VUE/invoice/{invoice.vue.d.ts → invoice.taro.vue.d.ts} +0 -0
  290. package/dist/types/__VUE/layout/{layout.vue.d.ts → layout.taro.vue.d.ts} +0 -0
  291. package/dist/types/__VUE/navbar/{navbar.vue.d.ts → navbar.taro.vue.d.ts} +0 -0
  292. package/dist/types/__VUE/overlay/{overlay.vue.d.ts → overlay.taro.vue.d.ts} +0 -0
  293. package/dist/types/__VUE/pagination/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  294. package/dist/types/__VUE/price/{price.vue.d.ts → price.taro.vue.d.ts} +0 -0
  295. package/dist/types/__VUE/progress/{progress.vue.d.ts → progress.taro.vue.d.ts} +0 -0
  296. package/dist/types/__VUE/radio/{radio.vue.d.ts → radio.taro.vue.d.ts} +0 -0
  297. package/dist/types/__VUE/radiogroup/{radio-group.vue.d.ts → radio-group.taro.vue.d.ts} +0 -0
  298. package/dist/types/__VUE/row/{row.vue.d.ts → row.taro.vue.d.ts} +0 -0
  299. package/dist/types/__VUE/sidenavbaritem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  300. package/dist/types/__VUE/skeleton/{skeleton.vue.d.ts → skeleton.taro.vue.d.ts} +2 -2
  301. package/dist/types/__VUE/sku/components/{SkuStepper.vue.d.ts → SkuStepper.taro.vue.d.ts} +0 -0
  302. package/dist/types/__VUE/space/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  303. package/dist/types/__VUE/step/{step.vue.d.ts → step.taro.vue.d.ts} +0 -0
  304. package/dist/types/__VUE/steps/{steps.vue.d.ts → steps.taro.vue.d.ts} +0 -0
  305. package/dist/types/__VUE/swipe/{swipe.vue.d.ts → swipe.taro.vue.d.ts} +0 -0
  306. package/dist/types/__VUE/swipegroup/{swipe-group.vue.d.ts → swipe-group.taro.vue.d.ts} +0 -0
  307. package/dist/types/__VUE/swiperitem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  308. package/dist/types/__VUE/switch/{switch.vue.d.ts → switch.taro.vue.d.ts} +0 -0
  309. package/dist/types/__VUE/tabbar/{tabbar.vue.d.ts → tabbar.taro.vue.d.ts} +0 -0
  310. package/dist/types/__VUE/tabbaritem/{tabbar-item.vue.d.ts → tabbar-item.taro.vue.d.ts} +0 -0
  311. package/dist/types/__VUE/tabpane/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  312. package/dist/types/__VUE/tag/{tag.vue.d.ts → tag.taro.vue.d.ts} +0 -0
  313. package/dist/types/__VUE/timedetail/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  314. package/dist/types/__VUE/timepannel/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  315. package/dist/types/__VUE/trendarrow/{trend-arrow.vue.d.ts → trend-arrow.taro.vue.d.ts} +1 -1
  316. package/dist/types/__VUE/watermark/{watermark.vue.d.ts → watermark.taro.vue.d.ts} +2 -2
@@ -17,22 +17,24 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, ref, computed, onMounted, nextTick, openBlock, createElementBlock, normalizeStyle, createElementVNode, normalizeClass, renderSlot, createVNode, unref, createCommentVNode, toDisplayString } from "vue";
21
- import { Left } from "@nutui/icons-vue";
20
+ import { defineComponent, ref, computed, onMounted, openBlock, createElementBlock, normalizeStyle, createElementVNode, unref, normalizeClass, renderSlot, createVNode, createCommentVNode, createTextVNode, toDisplayString } from "vue";
21
+ import { Left } from "@nutui/icons-vue-taro";
22
+ import { u as useTaroRect } from "../index-m0Wcof-q.js";
22
23
  import { w as withInstall } from "../with-install-Ch3FF0uS.js";
23
- const _hoisted_1 = {
24
+ const _hoisted_1 = ["id"];
25
+ const _hoisted_2 = {
24
26
  key: 1,
25
27
  class: "nut-navbar__text"
26
28
  };
27
- const _hoisted_2 = { class: "nut-navbar__title" };
28
- const _hoisted_3 = {
29
+ const _hoisted_3 = { class: "nut-navbar__title" };
30
+ const _hoisted_4 = {
29
31
  key: 0,
30
32
  class: "nut-navbar__text"
31
33
  };
32
34
  const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
33
35
  name: "NutNavbar"
34
36
  }), {
35
- __name: "navbar",
37
+ __name: "navbar.taro",
36
38
  props: {
37
39
  leftShow: { type: Boolean, default: false },
38
40
  title: { default: "" },
@@ -59,8 +61,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
59
61
  setup(__props, { emit: __emit }) {
60
62
  const props = __props;
61
63
  const emit = __emit;
64
+ const refRandomId = Math.random().toString(36).slice(-8);
62
65
  const navHeight = ref("auto");
63
- const navbarRef = ref();
66
+ const navbarRef = ref(null);
64
67
  const classes = computed(() => {
65
68
  const prefixCls = "nut-navbar";
66
69
  return {
@@ -79,16 +82,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
79
82
  return {};
80
83
  });
81
84
  const getNavHeight = () => {
82
- if (navbarRef.value) {
83
- const rect = navbarRef.value.getBoundingClientRect();
84
- navHeight.value = `${rect.height}px`;
85
- }
85
+ useTaroRect(navbarRef).then(
86
+ (rect) => {
87
+ navHeight.value = `${rect.height}px`;
88
+ },
89
+ () => {
90
+ }
91
+ );
86
92
  };
87
93
  onMounted(() => {
88
94
  if (props.fixed && props.placeholder) {
89
- nextTick(() => {
95
+ setTimeout(() => {
90
96
  getNavHeight();
91
- });
97
+ }, 100);
92
98
  }
93
99
  });
94
100
  const handleLeft = () => {
@@ -113,6 +119,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
113
119
  style: normalizeStyle(rootStyle.value)
114
120
  }, [
115
121
  createElementVNode("view", {
122
+ id: "navbarRef-" + unref(refRandomId),
116
123
  ref_key: "navbarRef",
117
124
  ref: navbarRef,
118
125
  class: normalizeClass(classes.value),
@@ -128,15 +135,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
128
135
  color: "#979797"
129
136
  })
130
137
  ]) : createCommentVNode("", true),
131
- _ctx.leftText ? (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(_ctx.leftText), 1)) : createCommentVNode("", true),
138
+ _cache[0] || (_cache[0] = createTextVNode()),
139
+ _ctx.leftText ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.leftText), 1)) : createCommentVNode("", true),
140
+ _cache[1] || (_cache[1] = createTextVNode()),
132
141
  renderSlot(_ctx.$slots, "left")
133
142
  ]),
134
- createElementVNode("view", _hoisted_2, [
143
+ _cache[5] || (_cache[5] = createTextVNode()),
144
+ createElementVNode("view", _hoisted_3, [
135
145
  _ctx.title ? (openBlock(), createElementBlock("view", {
136
146
  key: 0,
137
147
  class: "title",
138
148
  onClick: handleCenter
139
149
  }, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
150
+ _cache[2] || (_cache[2] = createTextVNode()),
140
151
  _ctx.titleIcon ? (openBlock(), createElementBlock("view", {
141
152
  key: 1,
142
153
  class: "icon",
@@ -144,16 +155,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
144
155
  }, [
145
156
  renderSlot(_ctx.$slots, "title-icon", { onClick: handleCenterIcon })
146
157
  ])) : createCommentVNode("", true),
158
+ _cache[3] || (_cache[3] = createTextVNode()),
147
159
  renderSlot(_ctx.$slots, "content")
148
160
  ]),
161
+ _cache[6] || (_cache[6] = createTextVNode()),
149
162
  createElementVNode("view", {
150
163
  class: "nut-navbar__right",
151
164
  onClick: handleRight
152
165
  }, [
153
- _ctx.desc ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(_ctx.desc), 1)) : createCommentVNode("", true),
166
+ _ctx.desc ? (openBlock(), createElementBlock("view", _hoisted_4, toDisplayString(_ctx.desc), 1)) : createCommentVNode("", true),
167
+ _cache[4] || (_cache[4] = createTextVNode()),
154
168
  renderSlot(_ctx.$slots, "right")
155
169
  ])
156
- ], 6)
170
+ ], 14, _hoisted_1)
157
171
  ], 4);
158
172
  };
159
173
  }
@@ -17,10 +17,12 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { h, ref, reactive, computed, watch, onMounted, onActivated, onDeactivated, onUnmounted, toRefs, resolveComponent, openBlock, createElementBlock, withDirectives, normalizeClass, normalizeStyle, renderSlot, createVNode, createCommentVNode, createElementVNode, createTextVNode, toDisplayString, withModifiers, createBlock, vShow, Fragment, renderList } from "vue";
21
- import { Notice, CircleClose } from "@nutui/icons-vue";
20
+ import { h, ref, reactive, computed, watch, onMounted, onActivated, onDeactivated, onUnmounted, toRefs, resolveComponent, openBlock, createElementBlock, withDirectives, normalizeClass, normalizeStyle, renderSlot, createVNode, createCommentVNode, createTextVNode, createElementVNode, toDisplayString, withModifiers, vShow, Fragment, renderList, createBlock } from "vue";
21
+ import { Notice, CircleClose } from "@nutui/icons-vue-taro";
22
22
  import { c as createComponent } from "../component-DQf3CENX.js";
23
+ import { r as renderIcon } from "../renderIcon-CfE94nuJ.js";
23
24
  import { p as pxCheck } from "../pxCheck-DN6FYV6q.js";
25
+ import Taro from "@tarojs/taro";
24
26
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
25
27
  const { create } = createComponent("noticebar");
26
28
  const _sfc_main = create({
@@ -57,7 +59,10 @@ const _sfc_main = create({
57
59
  type: Boolean,
58
60
  default: false
59
61
  },
60
- leftIcon: { type: Boolean, default: true },
62
+ leftIcon: {
63
+ type: Boolean,
64
+ default: true
65
+ },
61
66
  color: {
62
67
  type: String,
63
68
  default: ""
@@ -82,7 +87,6 @@ const _sfc_main = create({
82
87
  components: {
83
88
  ScrollItem: function(props) {
84
89
  props.item.props.style = props.style;
85
- props.item.key = props.key;
86
90
  return h(props.item);
87
91
  },
88
92
  Notice,
@@ -105,11 +109,12 @@ const _sfc_main = create({
105
109
  timer: null,
106
110
  keepAlive: false,
107
111
  isCanScroll: null,
108
- showNotica: true
112
+ showNotica: true,
113
+ id: Math.round(Math.random() * 1e5)
109
114
  });
110
115
  const isEllipsis = computed(() => {
111
116
  if (state.isCanScroll == null) {
112
- return props.wrapable;
117
+ return false;
113
118
  } else {
114
119
  return !state.isCanScroll && !props.wrapable;
115
120
  }
@@ -118,6 +123,7 @@ const _sfc_main = create({
118
123
  return {
119
124
  "nut-noticebar__page-wrap-content": true,
120
125
  "nut-ellipsis": isEllipsis.value,
126
+ [`content${state.id}`]: true,
121
127
  [state.animationClass]: true
122
128
  };
123
129
  });
@@ -145,9 +151,8 @@ const _sfc_main = create({
145
151
  };
146
152
  } else {
147
153
  if (state.animate) {
148
- let a = ~~(props.height / props.speed / 4);
149
154
  styles = {
150
- transition: `all ${a == 0 ? ~~(props.height / props.speed) : a}s`,
155
+ transition: `all ${~~(props.height / props.speed / 4)}s`,
151
156
  "margin-top": `-${props.height}px`
152
157
  };
153
158
  }
@@ -166,6 +171,13 @@ const _sfc_main = create({
166
171
  state.scrollList = [].concat(value);
167
172
  }
168
173
  );
174
+ const getRect = (selector) => {
175
+ return new Promise((resolve) => {
176
+ Taro.createSelectorQuery().select(selector).boundingClientRect().exec((rect = []) => {
177
+ resolve(rect[0]);
178
+ });
179
+ });
180
+ };
169
181
  const initScrollWrap = () => {
170
182
  if (state.showNoticebar == false) {
171
183
  return;
@@ -174,18 +186,24 @@ const _sfc_main = create({
174
186
  if (!wrap.value || !content.value) {
175
187
  return;
176
188
  }
177
- const wrapWidth = wrap.value.getBoundingClientRect().width;
178
- const offsetWidth = content.value.getBoundingClientRect().width;
179
- state.isCanScroll = props.scrollable == null ? offsetWidth > wrapWidth : props.scrollable;
180
- if (state.isCanScroll) {
181
- state.wrapWidth = wrapWidth;
182
- state.offsetWidth = offsetWidth;
183
- state.duration = offsetWidth / props.speed;
184
- state.animationClass = "play";
185
- } else {
186
- state.animationClass = "";
187
- }
188
- }, 0);
189
+ let wrapWidth = 0;
190
+ let offsetWidth = 0;
191
+ getRect(`.wrap${state.id}`).then((rect) => {
192
+ if ((rect == null ? void 0 : rect.width) > 0) wrapWidth = rect.width;
193
+ getRect(`.content${state.id}`).then((rect2) => {
194
+ if ((rect2 == null ? void 0 : rect2.width) > 0) offsetWidth = rect2.width;
195
+ state.isCanScroll = props.scrollable == null ? offsetWidth > wrapWidth : props.scrollable;
196
+ if (state.isCanScroll) {
197
+ state.wrapWidth = wrapWidth;
198
+ state.offsetWidth = offsetWidth;
199
+ state.duration = offsetWidth / props.speed;
200
+ state.animationClass = "play";
201
+ } else {
202
+ state.animationClass = "";
203
+ }
204
+ });
205
+ });
206
+ }, 100);
189
207
  };
190
208
  const handleClick = (event) => {
191
209
  emit("click", event);
@@ -206,7 +224,7 @@ const _sfc_main = create({
206
224
  };
207
225
  const startRollEasy = () => {
208
226
  showhorseLamp();
209
- state.timer = setInterval(showhorseLamp, ~~(props.height / props.speed / 4 * 1e3) + props.standTime);
227
+ state.timer = setInterval(showhorseLamp, ~~(props.height / props.speed / 4) * 1e3 + props.standTime);
210
228
  };
211
229
  const showhorseLamp = () => {
212
230
  state.animate = true;
@@ -216,7 +234,7 @@ const _sfc_main = create({
216
234
  state.scrollList.shift();
217
235
  state.animate = false;
218
236
  },
219
- ~~(props.height / props.speed / 4 * 1e3)
237
+ ~~(props.height / props.speed / 4) * 1e3
220
238
  );
221
239
  };
222
240
  const startRoll = () => {
@@ -311,7 +329,8 @@ const _sfc_main = create({
311
329
  handleClickIcon,
312
330
  slots,
313
331
  pxCheck,
314
- wrapContentClass
332
+ wrapContentClass,
333
+ renderIcon
315
334
  });
316
335
  }
317
336
  });
@@ -320,13 +339,9 @@ const _hoisted_2 = {
320
339
  key: 0,
321
340
  class: "nut-noticebar__page-lefticon"
322
341
  };
323
- const _hoisted_3 = {
324
- ref: "wrap",
325
- class: "nut-noticebar__page-wrap"
326
- };
327
- const _hoisted_4 = { class: "showNotica" };
328
- const _hoisted_5 = { class: "nut-noticebar-custom-item" };
329
- const _hoisted_6 = ["onClick"];
342
+ const _hoisted_3 = { class: "showNotica" };
343
+ const _hoisted_4 = { class: "nut-noticebar-custom-item" };
344
+ const _hoisted_5 = ["onClick"];
330
345
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
331
346
  const _component_Notice = resolveComponent("Notice");
332
347
  const _component_CircleClose = resolveComponent("CircleClose");
@@ -347,7 +362,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
347
362
  createVNode(_component_Notice, { size: "16px" })
348
363
  ])
349
364
  ])) : createCommentVNode("", true),
350
- createElementVNode("view", _hoisted_3, [
365
+ _cache[5] || (_cache[5] = createTextVNode()),
366
+ createElementVNode("view", {
367
+ ref: "wrap",
368
+ class: normalizeClass(`nut-noticebar__page-wrap wrap${_ctx.id}`)
369
+ }, [
351
370
  createElementVNode("view", {
352
371
  ref: "content",
353
372
  class: normalizeClass(_ctx.wrapContentClass),
@@ -359,17 +378,21 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
359
378
  createTextVNode(toDisplayString(_ctx.text), 1)
360
379
  ])
361
380
  ], 38)
362
- ], 512),
381
+ ], 2),
382
+ _cache[6] || (_cache[6] = createTextVNode()),
363
383
  _ctx.closeMode || _ctx.$slots["right-icon"] ? (openBlock(), createElementBlock("view", {
364
384
  key: 1,
365
385
  class: "nut-noticebar__page-righticon",
366
386
  onClick: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.onClickIcon && _ctx.onClickIcon(...args), ["stop"]))
367
387
  }, [
368
- _ctx.$slots["right-icon"] ? renderSlot(_ctx.$slots, "right-icon", { key: 0 }) : (openBlock(), createBlock(_component_CircleClose, { key: 1 }))
388
+ renderSlot(_ctx.$slots, "right-icon", {}, () => [
389
+ createVNode(_component_CircleClose)
390
+ ])
369
391
  ])) : createCommentVNode("", true)
370
392
  ], 6)), [
371
393
  [vShow, _ctx.showNoticebar]
372
394
  ]) : createCommentVNode("", true),
395
+ _cache[9] || (_cache[9] = createTextVNode()),
373
396
  _ctx.scrollList.length > 0 && _ctx.direction == "vertical" && _ctx.showNoticebar ? (openBlock(), createElementBlock("view", {
374
397
  key: 1,
375
398
  class: "nut-noticebar__vertical",
@@ -380,17 +403,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
380
403
  class: "nut-noticebar__vertical-list",
381
404
  style: normalizeStyle(_ctx.horseLampStyle)
382
405
  }, [
383
- createElementVNode("div", _hoisted_4, [
384
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scrollList, (item, index2) => {
406
+ createElementVNode("view", _hoisted_3, [
407
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scrollList, (item, index) => {
385
408
  return openBlock(), createBlock(_component_ScrollItem, {
386
- key: index2,
409
+ key: index,
387
410
  style: normalizeStyle({ height: _ctx.height + "px", "line-height": _ctx.height + "px" }),
388
411
  item
389
412
  }, null, 8, ["style", "item"]);
390
413
  }), 128))
391
414
  ])
392
415
  ], 4),
393
- createElementVNode("view", _hoisted_5, [
416
+ _cache[7] || (_cache[7] = createTextVNode()),
417
+ createElementVNode("view", _hoisted_4, [
394
418
  renderSlot(_ctx.$slots, "default")
395
419
  ])
396
420
  ], 64)) : (openBlock(), createElementBlock("ul", {
@@ -398,18 +422,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
398
422
  class: "nut-noticebar__vertical-list",
399
423
  style: normalizeStyle(_ctx.horseLampStyle)
400
424
  }, [
401
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scrollList, (item, index2) => {
425
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scrollList, (item, index) => {
402
426
  return openBlock(), createElementBlock("li", {
403
- key: index2,
427
+ key: index,
404
428
  class: "nut-noticebar__vertical-item",
405
429
  style: normalizeStyle({ height: _ctx.pxCheck(_ctx.height), lineHeight: _ctx.pxCheck(_ctx.height) }),
406
430
  onClick: ($event) => _ctx.go(item)
407
- }, toDisplayString(item), 13, _hoisted_6);
431
+ }, toDisplayString(item), 13, _hoisted_5);
408
432
  }), 128))
409
433
  ], 4)),
434
+ _cache[8] || (_cache[8] = createTextVNode()),
410
435
  createElementVNode("view", {
411
436
  class: "go",
412
- onClick: _cache[4] || (_cache[4] = ($event) => !_ctx.slots.rightIcon && _ctx.handleClickIcon())
437
+ onClick: _cache[4] || (_cache[4] = ($event) => _ctx.handleClickIcon())
413
438
  }, [
414
439
  renderSlot(_ctx.$slots, "right-icon", {}, () => [
415
440
  _ctx.closeMode ? (openBlock(), createBlock(_component_CircleClose, {
@@ -422,7 +447,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
422
447
  ], 4)) : createCommentVNode("", true)
423
448
  ]);
424
449
  }
425
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
450
+ const index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
426
451
  export {
427
- index as default
452
+ index_taro as default
428
453
  };
@@ -1,25 +1,6 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { ref, watch, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, Fragment, createTextVNode, toDisplayString, createVNode, render, onMounted, h } from "vue";
1
+ import { ref, watch, onUnmounted, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, Fragment, createTextVNode, toDisplayString } from "vue";
21
2
  import { c as createComponent } from "../component-DQf3CENX.js";
22
- import { N as NutPopup } from "../index-wLaOjIn1.js";
3
+ import { N as NutPopup } from "../index.taro-CNxLoYer.js";
23
4
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
24
5
  const { create } = createComponent("notify");
25
6
  const _sfc_main = create({
@@ -60,10 +41,6 @@ const _sfc_main = create({
60
41
  type: String,
61
42
  default: "top"
62
43
  },
63
- teleportDisable: {
64
- type: Boolean,
65
- default: true
66
- },
67
44
  onClose: Function,
68
45
  onClick: Function,
69
46
  unmount: Function
@@ -82,7 +59,7 @@ const _sfc_main = create({
82
59
  emit("update:visible", false);
83
60
  };
84
61
  const isShowPopup = ref(false);
85
- const unWatch = watch(
62
+ watch(
86
63
  () => props.visible,
87
64
  (newVal) => {
88
65
  isShowPopup.value = props.visible;
@@ -95,13 +72,10 @@ const _sfc_main = create({
95
72
  },
96
73
  { immediate: true }
97
74
  );
98
- const onAfterLeave = () => {
75
+ onUnmounted(() => {
99
76
  clearTimer();
100
- unWatch && unWatch();
101
- props.unmount && props.unmount(props.id);
102
- props.onClose && props.onClose();
103
- };
104
- return { onAfterLeave, clickCover, isShowPopup };
77
+ });
78
+ return { clickCover, isShowPopup };
105
79
  }
106
80
  });
107
81
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -110,8 +84,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
110
84
  visible: _ctx.isShowPopup,
111
85
  "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => _ctx.isShowPopup = $event),
112
86
  position: _ctx.position,
113
- overlay: false,
114
- "teleport-disable": _ctx.teleportDisable
87
+ overlay: false
115
88
  }, {
116
89
  default: withCtx(() => [
117
90
  createElementVNode("div", {
@@ -125,129 +98,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
125
98
  ], 6)
126
99
  ]),
127
100
  _: 3
128
- }, 8, ["visible", "position", "teleport-disable"]);
101
+ }, 8, ["visible", "position"]);
129
102
  }
130
- const Notify = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
131
- const defaultOptions = {
132
- type: "base",
133
- visible: true,
134
- msg: "",
135
- color: void 0,
136
- background: void 0,
137
- duration: 3e3,
138
- className: "",
139
- onClose: Function,
140
- // onClick: null,
141
- // onOpened: null,
142
- // textTimer: null,
143
- teleport: "",
144
- unmount: new Function()
145
- };
146
- let idsMap = [];
147
- let optsMap = [];
148
- const clearNotify = (id) => {
149
- if (id) {
150
- const container = document.getElementById(id);
151
- optsMap = optsMap.filter((item) => item.id !== id);
152
- idsMap = idsMap.filter((item) => item !== id);
153
- if (container) {
154
- document.body.removeChild(container);
155
- }
156
- } else {
157
- idsMap.forEach((item) => {
158
- const container = document.getElementById(item);
159
- if (container) {
160
- document.body.removeChild(container);
161
- }
162
- });
163
- optsMap = [];
164
- idsMap = [];
165
- }
166
- };
167
- const updateNotify = (opts) => {
168
- const container = document.getElementById(opts.id);
169
- if (container) {
170
- const currentOpt = optsMap.find((item) => item.id === opts.id);
171
- if (currentOpt) {
172
- opts = __spreadValues(__spreadValues(__spreadValues({}, defaultOptions), currentOpt), opts);
173
- } else {
174
- opts = __spreadValues(__spreadValues({}, defaultOptions), opts);
175
- }
176
- const instance = createVNode(Notify, opts);
177
- render(instance, container);
178
- return instance.component.data;
179
- }
180
- };
181
- const mountNotify = (opts) => {
182
- opts.unmount = clearNotify;
183
- let _id;
184
- if (opts.id) {
185
- _id = opts.id;
186
- if (idsMap.find((item) => item === opts.id)) {
187
- return updateNotify(opts);
188
- }
189
- } else {
190
- _id = (/* @__PURE__ */ new Date()).getTime() + "";
191
- }
192
- opts = __spreadValues(__spreadValues({}, defaultOptions), opts);
193
- opts.id = _id;
194
- idsMap.push(opts.id);
195
- optsMap.push(opts);
196
- const root = document.createElement("view");
197
- root.id = "notify-" + opts.id;
198
- const Wrapper = {
199
- setup() {
200
- opts.teleport = `#notify-${opts.id}`;
201
- onMounted(() => {
202
- setTimeout(() => {
203
- opts.onClose && opts.onClose();
204
- document.body.removeChild(root);
205
- }, opts.duration);
206
- });
207
- return () => {
208
- return h(Notify, opts);
209
- };
210
- }
211
- };
212
- const instance = createVNode(Wrapper);
213
- document.body.appendChild(root);
214
- render(instance, root);
215
- };
216
- const errorMsg = (msg) => {
217
- if (!msg) {
218
- console.warn("[NutUI Notify]: msg不能为空");
219
- return;
220
- }
221
- };
222
- const showNotify = {
223
- text(msg, obj = {}) {
224
- errorMsg(msg);
225
- return mountNotify(__spreadProps(__spreadValues({}, obj), { msg }));
226
- },
227
- primary(msg, obj = {}) {
228
- errorMsg(msg);
229
- return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "primary" }));
230
- },
231
- success(msg, obj = {}) {
232
- errorMsg(msg);
233
- return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "success" }));
234
- },
235
- danger(msg, obj = {}) {
236
- errorMsg(msg);
237
- return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "danger" }));
238
- },
239
- warn(msg, obj = {}) {
240
- errorMsg(msg);
241
- return mountNotify(__spreadProps(__spreadValues({}, obj), { msg, type: "warning" }));
242
- },
243
- hide() {
244
- clearNotify();
245
- },
246
- install(app) {
247
- app.use(Notify);
248
- }
249
- };
103
+ const index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
250
104
  export {
251
- Notify as default,
252
- showNotify
105
+ index_taro as default
253
106
  };
@@ -1,3 +1,2 @@
1
1
  import Notify from './Notify.js';
2
- import { showNotify } from './Notify.js';
3
- export { Notify, showNotify, Notify as default };
2
+ export { Notify, Notify as default };