@nutui/nutui 3.2.5-beta.1 → 3.2.6-beta.1

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 (240) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/nutui.es.js +4214 -4444
  3. package/dist/nutui.umd.js +4213 -4543
  4. package/dist/packages/_es/ActionSheet.js +18 -19
  5. package/dist/packages/_es/Address.js +94 -85
  6. package/dist/packages/_es/AddressList.js +25 -12
  7. package/dist/packages/_es/Animate.js +3 -3
  8. package/dist/packages/_es/Audio.js +9 -2
  9. package/dist/packages/_es/AudioOperate.js +5 -1
  10. package/dist/packages/_es/Avatar.js +10 -10
  11. package/dist/packages/_es/AvatarGroup.js +5 -5
  12. package/dist/packages/_es/BackTop.js +55 -108
  13. package/dist/packages/_es/Badge.js +6 -4
  14. package/dist/packages/_es/Barrage.js +79 -103
  15. package/dist/packages/_es/Button.js +5 -3
  16. package/dist/packages/_es/Calendar.js +36 -23
  17. package/dist/packages/_es/CalendarItem.js +4 -3
  18. package/dist/packages/_es/Card.js +15 -5
  19. package/dist/packages/_es/Cascader.js +12 -11
  20. package/dist/packages/_es/Category.js +13 -12
  21. package/dist/packages/_es/CategoryPane.js +17 -13
  22. package/dist/packages/_es/Cell.js +9 -12
  23. package/dist/packages/_es/CellGroup.js +4 -2
  24. package/dist/packages/_es/Checkbox.js +1 -1
  25. package/dist/packages/_es/CheckboxGroup.js +2 -2
  26. package/dist/packages/_es/CircleProgress.js +98 -82
  27. package/dist/packages/_es/Col.js +1 -1
  28. package/dist/packages/_es/Collapse.js +65 -34
  29. package/dist/packages/_es/CollapseItem.js +93 -60
  30. package/dist/packages/_es/Comment.js +43 -19
  31. package/dist/packages/_es/ConfigProvider.js +1 -1
  32. package/dist/packages/_es/CountDown.js +3 -3
  33. package/dist/packages/_es/CountUp.js +47 -52
  34. package/dist/packages/_es/DatePicker.js +37 -54
  35. package/dist/packages/_es/Dialog.js +9 -88
  36. package/dist/packages/_es/Divider.js +3 -3
  37. package/dist/packages/_es/Drag.js +75 -49
  38. package/dist/packages/_es/Ecard.js +20 -18
  39. package/dist/packages/_es/Elevator.js +101 -76
  40. package/dist/packages/_es/Ellipsis.js +140 -100
  41. package/dist/packages/_es/Empty.js +6 -4
  42. package/dist/packages/_es/FixedNav.js +11 -6
  43. package/dist/packages/_es/Form.js +4 -4
  44. package/dist/packages/_es/FormItem.js +3 -1
  45. package/dist/packages/_es/Grid.js +1 -1
  46. package/dist/packages/_es/GridItem.js +10 -27
  47. package/dist/packages/_es/Icon.js +1 -1
  48. package/dist/packages/_es/Image.js +13 -114
  49. package/dist/packages/_es/ImagePreview.js +154 -400
  50. package/dist/packages/_es/Indicator.js +3 -3
  51. package/dist/packages/_es/InfiniteLoading.js +103 -115
  52. package/dist/packages/_es/Input.js +54 -26
  53. package/dist/packages/_es/InputNumber.js +25 -16
  54. package/dist/packages/_es/Invoice.js +6 -5
  55. package/dist/packages/_es/Layout.js +1 -1
  56. package/dist/packages/_es/List.js +47 -34
  57. package/dist/packages/_es/Menu.js +35 -35
  58. package/dist/packages/_es/MenuItem.js +56 -29
  59. package/dist/packages/_es/Navbar.js +49 -39
  60. package/dist/packages/_es/NoticeBar.js +52 -41
  61. package/dist/packages/_es/Notify.js +37 -166
  62. package/dist/packages/_es/NumberKeyboard.js +15 -20
  63. package/dist/packages/_es/OldPicker.js +130 -116
  64. package/dist/packages/_es/OverLay.js +5 -28
  65. package/dist/packages/_es/Pagination.js +8 -5
  66. package/dist/packages/_es/Picker.js +196 -65
  67. package/dist/packages/_es/Popover.js +201 -881
  68. package/dist/packages/_es/Popup.js +28 -84
  69. package/dist/packages/_es/Price.js +22 -6
  70. package/dist/packages/_es/Progress.js +18 -11
  71. package/dist/packages/_es/PullRefresh.js +4 -2
  72. package/dist/packages/_es/Radio.js +3 -3
  73. package/dist/packages/_es/RadioGroup.js +1 -1
  74. package/dist/packages/_es/Range.js +48 -34
  75. package/dist/packages/_es/Rate.js +15 -14
  76. package/dist/packages/_es/Row.js +1 -1
  77. package/dist/packages/_es/SearchBar.js +39 -36
  78. package/dist/packages/_es/ShortPassword.js +97 -66
  79. package/dist/packages/_es/SideNavBar.js +7 -18
  80. package/dist/packages/_es/SideNavBarItem.js +1 -1
  81. package/dist/packages/_es/Signature.js +113 -80
  82. package/dist/packages/_es/Skeleton.js +12 -11
  83. package/dist/packages/_es/Sku.js +63 -38
  84. package/dist/packages/_es/Step.js +7 -2
  85. package/dist/packages/_es/Steps.js +1 -1
  86. package/dist/packages/_es/Sticky.js +33 -23
  87. package/dist/packages/_es/SubSideNavBar.js +4 -2
  88. package/dist/packages/_es/Swipe.js +41 -26
  89. package/dist/packages/_es/Swiper.js +38 -21
  90. package/dist/packages/_es/SwiperItem.js +2 -2
  91. package/dist/packages/_es/Switch.js +8 -8
  92. package/dist/packages/_es/TabPane.js +1 -1
  93. package/dist/packages/_es/Tabbar.js +40 -9
  94. package/dist/packages/_es/TabbarItem.js +24 -30
  95. package/dist/packages/_es/Table.js +22 -17
  96. package/dist/packages/_es/Tabs.js +49 -16
  97. package/dist/packages/_es/Tag.js +6 -5
  98. package/dist/packages/_es/TextArea.js +114 -49
  99. package/dist/packages/_es/TimeDetail.js +4 -3
  100. package/dist/packages/_es/TimePannel.js +3 -3
  101. package/dist/packages/_es/TimeSelect.js +12 -10
  102. package/dist/packages/_es/Toast.js +53 -164
  103. package/dist/packages/_es/TrendArrow.js +6 -4
  104. package/dist/packages/_es/Uploader.js +141 -140
  105. package/dist/packages/_es/Video.js +72 -5
  106. package/dist/packages/_es/WaterMark.js +22 -14
  107. package/dist/packages/_es/common.js +1 -1
  108. package/dist/packages/_es/component.js +1 -1
  109. package/dist/packages/_es/index.js +44 -6
  110. package/dist/packages/_es/{index5.js → index.taro.js} +167 -154
  111. package/dist/packages/_es/index2.js +8 -31
  112. package/dist/packages/_es/index3.js +64 -7
  113. package/dist/packages/_es/index4.js +424 -62
  114. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  115. package/dist/packages/_es/pxCheck.js +1 -1
  116. package/dist/packages/_es/raf.js +1 -1
  117. package/dist/packages/_es/style.css +21 -3
  118. package/dist/packages/_es/use-lock-scroll.js +23 -0
  119. package/dist/packages/locale/lang/baseLang.js +1 -1
  120. package/dist/packages/locale/lang/en-US.js +1 -1
  121. package/dist/packages/locale/lang/id-ID.js +1 -1
  122. package/dist/packages/locale/lang/index.js +1 -1
  123. package/dist/packages/locale/lang/zh-CN.js +1 -1
  124. package/dist/packages/locale/lang/zh-TW.js +1 -1
  125. package/dist/packages/signature/index.scss +4 -1
  126. package/dist/packages/swiperitem/index.scss +1 -1
  127. package/dist/smartips/attributes.json +4 -0
  128. package/dist/smartips/tags.json +2 -1
  129. package/dist/smartips/web-types.json +10 -1
  130. package/dist/style.css +1 -1
  131. package/dist/styles/themes/default.scss +44 -44
  132. package/dist/styles/themes/jdb.scss +44 -44
  133. package/dist/styles/themes/jddkh.scss +44 -44
  134. package/dist/styles/themes/jdt.scss +44 -44
  135. package/dist/types/__VUE/actionsheet/{index.vue.d.ts → index.taro.vue.d.ts} +9 -9
  136. package/dist/types/__VUE/address/{index.vue.d.ts → index.taro.vue.d.ts} +73 -33
  137. package/dist/types/__VUE/addresslist/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  138. package/dist/types/__VUE/animate/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  139. package/dist/types/__VUE/avatar/{index.vue.d.ts → index.taro.vue.d.ts} +6 -6
  140. package/dist/types/__VUE/avatargroup/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  141. package/dist/types/__VUE/backtop/{index.vue.d.ts → index.taro.vue.d.ts} +15 -37
  142. package/dist/types/__VUE/badge/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  143. package/dist/types/__VUE/barrage/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
  144. package/dist/types/__VUE/button/index.taro.vue.d.ts +116 -0
  145. package/dist/types/__VUE/button/index.vue.d.ts +1 -1
  146. package/dist/types/__VUE/calendar/{index.vue.d.ts → index.taro.vue.d.ts} +13 -1
  147. package/dist/types/__VUE/calendaritem/{index.vue.d.ts → index.taro.vue.d.ts} +17 -17
  148. package/dist/types/__VUE/card/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  149. package/dist/types/__VUE/cascader/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
  150. package/dist/types/__VUE/category/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  151. package/dist/types/__VUE/categorypane/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  152. package/dist/types/__VUE/cell/{index.vue.d.ts → index.taro.vue.d.ts} +13 -6
  153. package/dist/types/__VUE/checkbox/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  154. package/dist/types/__VUE/circleprogress/{index.vue.d.ts → index.taro.vue.d.ts} +14 -15
  155. package/dist/types/__VUE/collapse/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
  156. package/dist/types/__VUE/collapseitem/{index.vue.d.ts → index.taro.vue.d.ts} +2 -10
  157. package/dist/types/__VUE/comment/{index.vue.d.ts → index.taro.vue.d.ts} +1 -2
  158. package/dist/types/__VUE/configprovider/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  159. package/dist/types/__VUE/countdown/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  160. package/dist/types/__VUE/countup/{index.vue.d.ts → index.taro.vue.d.ts} +5 -7
  161. package/dist/types/__VUE/datepicker/{index.vue.d.ts → index.taro.vue.d.ts} +5 -5
  162. package/dist/types/__VUE/dialog/{index.vue.d.ts → index.taro.vue.d.ts} +9 -12
  163. package/dist/types/__VUE/divider/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
  164. package/dist/types/__VUE/drag/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
  165. package/dist/types/__VUE/ecard/{index.vue.d.ts → index.taro.vue.d.ts} +3 -3
  166. package/dist/types/__VUE/elevator/{index.vue.d.ts → index.taro.vue.d.ts} +11 -2
  167. package/dist/types/__VUE/ellipsis/{index.vue.d.ts → index.taro.vue.d.ts} +4 -0
  168. package/dist/types/__VUE/empty/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  169. package/dist/types/__VUE/fixednav/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  170. package/dist/types/__VUE/form/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  171. package/dist/types/__VUE/grid/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
  172. package/dist/types/__VUE/griditem/{index.vue.d.ts → index.taro.vue.d.ts} +2 -27
  173. package/dist/types/__VUE/icon/index.taro.vue.d.ts +74 -0
  174. package/dist/types/__VUE/image/index.taro.vue.d.ts +33 -0
  175. package/dist/types/__VUE/imagepreview/{index.vue.d.ts → index.taro.vue.d.ts} +40 -42
  176. package/dist/types/__VUE/indicator/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  177. package/dist/types/__VUE/infiniteloading/{index.vue.d.ts → index.taro.vue.d.ts} +15 -8
  178. package/dist/types/__VUE/input/{index.vue.d.ts → index.taro.vue.d.ts} +34 -16
  179. package/dist/types/__VUE/inputnumber/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
  180. package/dist/types/__VUE/invoice/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  181. package/dist/types/__VUE/layout/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  182. package/dist/types/__VUE/list/{index.vue.d.ts → index.taro.vue.d.ts} +2 -2
  183. package/dist/types/__VUE/menu/{index.vue.d.ts → index.taro.vue.d.ts} +1 -0
  184. package/dist/types/__VUE/menuitem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  185. package/dist/types/__VUE/navbar/{index.vue.d.ts → index.taro.vue.d.ts} +1 -2
  186. package/dist/types/__VUE/noticebar/{index.vue.d.ts → index.taro.vue.d.ts} +4 -3
  187. package/dist/types/__VUE/notify/{index.vue.d.ts → index.taro.vue.d.ts} +10 -25
  188. package/dist/types/__VUE/numberkeyboard/{index.vue.d.ts → index.taro.vue.d.ts} +5 -29
  189. package/dist/types/__VUE/oldpicker/{Column.vue.d.ts → ColumnTaro.vue.d.ts} +28 -17
  190. package/dist/types/__VUE/oldpicker/{index.vue.d.ts → index.taro.vue.d.ts} +64 -44
  191. package/dist/types/__VUE/overlay/index.taro.vue.d.ts +85 -0
  192. package/dist/types/__VUE/pagination/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  193. package/dist/types/__VUE/picker/{Column.vue.d.ts → ColumnTaro.vue.d.ts} +16 -4
  194. package/dist/types/__VUE/picker/{index.vue.d.ts → index.taro.vue.d.ts} +53 -28
  195. package/dist/types/__VUE/popover/{index.vue.d.ts → index.taro.vue.d.ts} +15 -13
  196. package/dist/types/__VUE/popup/index.taro.vue.d.ts +1728 -0
  197. package/dist/types/__VUE/popup/index.vue.d.ts +1 -1
  198. package/dist/types/__VUE/price/{index.vue.d.ts → index.taro.vue.d.ts} +1 -0
  199. package/dist/types/__VUE/progress/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
  200. package/dist/types/__VUE/radio/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  201. package/dist/types/__VUE/range/{index.vue.d.ts → index.taro.vue.d.ts} +8 -7
  202. package/dist/types/__VUE/rate/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  203. package/dist/types/__VUE/searchbar/{index.vue.d.ts → index.taro.vue.d.ts} +19 -19
  204. package/dist/types/__VUE/shortpassword/{index.vue.d.ts → index.taro.vue.d.ts} +6 -21
  205. package/dist/types/__VUE/sidenavbar/{index.vue.d.ts → index.taro.vue.d.ts} +0 -5
  206. package/dist/types/__VUE/signature/{index.vue.d.ts → index.taro.vue.d.ts} +8 -5
  207. package/dist/types/__VUE/skeleton/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  208. package/dist/types/__VUE/sku/{index.vue.d.ts → index.taro.vue.d.ts} +54 -182
  209. package/dist/types/__VUE/step/index.vue.d.ts +1 -1
  210. package/dist/types/__VUE/steps/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  211. package/dist/types/__VUE/sticky/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  212. package/dist/types/__VUE/swipe/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
  213. package/dist/types/__VUE/swiper/{index.vue.d.ts → index.taro.vue.d.ts} +2 -1
  214. package/dist/types/__VUE/swiperitem/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  215. package/dist/types/__VUE/switch/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  216. package/dist/types/__VUE/tabbar/{index.vue.d.ts → index.taro.vue.d.ts} +10 -0
  217. package/dist/types/__VUE/tabbaritem/{index.vue.d.ts → index.taro.vue.d.ts} +9 -9
  218. package/dist/types/__VUE/table/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  219. package/dist/types/__VUE/tabs/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  220. package/dist/types/__VUE/tag/{index.vue.d.ts → index.taro.vue.d.ts} +4 -4
  221. package/dist/types/__VUE/textarea/{index.vue.d.ts → index.taro.vue.d.ts} +5 -3
  222. package/dist/types/__VUE/timedetail/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  223. package/dist/types/__VUE/timepannel/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  224. package/dist/types/__VUE/timeselect/{index.vue.d.ts → index.taro.vue.d.ts} +7 -8
  225. package/dist/types/__VUE/toast/{index.vue.d.ts → index.taro.vue.d.ts} +44 -22
  226. package/dist/types/__VUE/trendarrow/{index.vue.d.ts → index.taro.vue.d.ts} +0 -0
  227. package/dist/types/__VUE/uploader/{index.vue.d.ts → index.taro.vue.d.ts} +22 -13
  228. package/dist/types/__VUE/video/index.vue.d.ts +3 -1
  229. package/dist/types/__VUE/watermark/{index.vue.d.ts → index.taro.vue.d.ts} +1 -1
  230. package/dist/types/index.d.ts +1 -1
  231. package/dist/types/nutui.d.ts +89 -89
  232. package/package.json +1 -1
  233. package/dist/types/__VUE/dialog/index.d.ts +0 -48
  234. package/dist/types/__VUE/image/index.vue.d.ts +0 -117
  235. package/dist/types/__VUE/image/type.d.ts +0 -6
  236. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +0 -108
  237. package/dist/types/__VUE/imagepreview/index.d.ts +0 -25
  238. package/dist/types/__VUE/notify/index.d.ts +0 -26
  239. package/dist/types/__VUE/tag/type.d.ts +0 -5
  240. package/dist/types/__VUE/toast/index.d.ts +0 -16
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.5-beta.1 Tue Oct 25 2022 11:38:42 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -49,5 +49,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
49
49
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handlePannel(_ctx.pannelKey))
50
50
  }, toDisplayString(_ctx.name), 3);
51
51
  }
52
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
53
- export { index as default };
52
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
53
+ export { index_taro as default };
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.5-beta.1 Tue Oct 25 2022 11:38:42 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { computed, provide, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, normalizeClass, createElementBlock, toDisplayString, renderSlot } from "vue";
6
+ import { computed, provide, resolveComponent, openBlock, createBlock, normalizeStyle, withCtx, createElementVNode, normalizeClass, createElementBlock, toDisplayString, renderSlot, createTextVNode } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
8
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
@@ -32,12 +32,12 @@ const _sfc_main = create({
32
32
  return [];
33
33
  }
34
34
  },
35
- lockScroll: {
35
+ muti: {
36
36
  type: [Boolean],
37
37
  default: false
38
38
  },
39
- isWrapTeleport: {
40
- type: Boolean,
39
+ lockScroll: {
40
+ type: [Boolean],
41
41
  default: false
42
42
  }
43
43
  },
@@ -57,16 +57,17 @@ const _sfc_main = create({
57
57
  });
58
58
  const currentKey = computed(() => props.currentKey);
59
59
  const currentTime = computed(() => props.currentTime);
60
+ const muti = computed(() => props.muti);
60
61
  const close = () => {
61
62
  context.emit("update:visible", false);
62
63
  context.emit("select", currentTime.value);
63
64
  };
64
65
  provide("currentKey", currentKey);
65
66
  provide("currentTime", currentTime);
67
+ provide("muti", muti);
66
68
  return {
67
69
  classes,
68
70
  popStyle,
69
- props,
70
71
  close,
71
72
  translate
72
73
  };
@@ -84,7 +85,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
84
85
  position: "bottom",
85
86
  closeable: "",
86
87
  round: "",
87
- isWrapTeleport: _ctx.isWrapTeleport,
88
88
  visible: _ctx.visible,
89
89
  style: normalizeStyle(_ctx.popStyle),
90
90
  "lock-scroll": _ctx.lockScroll,
@@ -100,10 +100,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
100
100
  !_ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(_ctx.title || _ctx.translate("pickupTime")), 1)) : renderSlot(_ctx.$slots, "title", { key: 1 })
101
101
  ])
102
102
  ]),
103
+ createTextVNode(),
103
104
  createElementVNode("view", _hoisted_4, [
104
105
  createElementVNode("view", _hoisted_5, [
105
106
  renderSlot(_ctx.$slots, "pannel")
106
107
  ]),
108
+ createTextVNode(),
107
109
  createElementVNode("view", _hoisted_6, [
108
110
  renderSlot(_ctx.$slots, "detail")
109
111
  ])
@@ -111,7 +113,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
111
113
  ], 2)
112
114
  ]),
113
115
  _: 3
114
- }, 8, ["isWrapTeleport", "visible", "style", "lock-scroll", "onClickOverlay", "onClickCloseIcon"]);
116
+ }, 8, ["visible", "style", "lock-scroll", "onClickOverlay", "onClickCloseIcon"]);
115
117
  }
116
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
117
- export { index as default };
118
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
119
+ export { index_taro as default };
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.5-beta.1 Tue Oct 25 2022 11:38:42 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { reactive, onMounted, watch, computed, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, createElementBlock, createVNode, mergeProps, createCommentVNode, toDisplayString, vShow, render } from "vue";
6
+ import { watch, computed, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, renderSlot, createElementBlock, createVNode, mergeProps, createCommentVNode, createTextVNode, toDisplayString, vShow } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
8
  import _sfc_main$1 from "./Icon.js";
9
9
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
@@ -25,7 +25,10 @@ const _sfc_main = create({
25
25
  type: Boolean,
26
26
  default: true
27
27
  },
28
- type: String,
28
+ type: {
29
+ type: String,
30
+ default: "text"
31
+ },
29
32
  customClass: String,
30
33
  bottom: {
31
34
  type: String,
@@ -35,10 +38,6 @@ const _sfc_main = create({
35
38
  type: [String, Number],
36
39
  default: "base"
37
40
  },
38
- iconSize: {
39
- type: String,
40
- default: "20"
41
- },
42
41
  icon: String,
43
42
  textAlignCenter: {
44
43
  type: Boolean,
@@ -69,17 +68,15 @@ const _sfc_main = create({
69
68
  closeOnClickOverlay: {
70
69
  type: Boolean,
71
70
  default: false
71
+ },
72
+ visible: {
73
+ type: Boolean,
74
+ default: false
72
75
  }
73
76
  },
74
- emits: ["close"],
77
+ emits: ["update:visible", "closed"],
75
78
  setup(props, { emit }) {
76
79
  let timer;
77
- const state = reactive({
78
- mounted: false
79
- });
80
- onMounted(() => {
81
- state.mounted = true;
82
- });
83
80
  const clearTimer = () => {
84
81
  if (timer) {
85
82
  clearTimeout(timer);
@@ -87,7 +84,8 @@ const _sfc_main = create({
87
84
  }
88
85
  };
89
86
  const hide = () => {
90
- state.mounted = false;
87
+ emit("update:visible", false);
88
+ emit("closed");
91
89
  };
92
90
  const show = () => {
93
91
  clearTimer();
@@ -100,14 +98,10 @@ const _sfc_main = create({
100
98
  const clickCover = () => {
101
99
  if (props.closeOnClickOverlay) {
102
100
  hide();
103
- emit("close");
104
101
  }
105
102
  };
106
- if (props.duration) {
107
- show();
108
- }
109
103
  watch(
110
- () => props.duration,
104
+ () => props.visible,
111
105
  (val) => {
112
106
  if (val) {
113
107
  show();
@@ -121,6 +115,18 @@ const _sfc_main = create({
121
115
  return !!props.icon;
122
116
  }
123
117
  });
118
+ const iconName = computed(() => {
119
+ if (props.icon) {
120
+ return props.icon;
121
+ } else {
122
+ return {
123
+ success: "success",
124
+ fail: "failure",
125
+ warn: "tips",
126
+ loading: "loading"
127
+ }[props.type];
128
+ }
129
+ });
124
130
  const toastBodyClass = computed(() => {
125
131
  return [
126
132
  "nut-toast",
@@ -132,30 +138,30 @@ const _sfc_main = create({
132
138
  "nut-toast-" + props.size
133
139
  ];
134
140
  });
135
- const toastIconWrapperClass = computed(() => {
136
- return ["nut-toast-icon-wrapper", { "nut-toast-icon-no-animation": !props.loadingRotate }];
137
- });
138
141
  const onAfterLeave = () => {
139
- clearTimer();
140
- props.unmount(props.id);
141
- props.onClose && props.onClose();
142
+ if (props.visible) {
143
+ clearTimer();
144
+ hide();
145
+ }
142
146
  };
143
147
  return {
144
- state,
145
- hide,
146
148
  clickCover,
147
149
  hasIcon,
150
+ iconName,
148
151
  toastBodyClass,
149
- toastIconWrapperClass,
150
152
  onAfterLeave
151
153
  };
152
154
  }
153
155
  });
154
156
  const _hoisted_1 = {
157
+ key: 0,
158
+ class: "nut-toast-icon-wrapper"
159
+ };
160
+ const _hoisted_2 = {
155
161
  key: 1,
156
162
  class: "nut-toast-title"
157
163
  };
158
- const _hoisted_2 = ["innerHTML"];
164
+ const _hoisted_3 = ["innerHTML"];
159
165
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
160
166
  const _component_nut_icon = resolveComponent("nut-icon");
161
167
  return openBlock(), createBlock(Transition, {
@@ -171,151 +177,34 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
171
177
  }),
172
178
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickCover && _ctx.clickCover(...args))
173
179
  }, [
174
- createElementVNode("view", {
180
+ _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createElementBlock("view", {
181
+ key: 1,
175
182
  class: "nut-toast-inner",
176
183
  style: normalizeStyle({
177
184
  "text-align": _ctx.textAlignCenter ? "center" : "left",
178
185
  "background-color": _ctx.bgColor
179
186
  })
180
187
  }, [
181
- _ctx.hasIcon ? (openBlock(), createElementBlock("view", {
182
- key: 0,
183
- class: normalizeClass(_ctx.toastIconWrapperClass)
184
- }, [
185
- createVNode(_component_nut_icon, mergeProps({ size: _ctx.iconSize }, _ctx.$attrs, {
186
- color: "#ffffff",
187
- name: _ctx.icon
188
- }), null, 16, ["size", "name"])
189
- ], 2)) : createCommentVNode("", true),
190
- _ctx.title ? (openBlock(), createElementBlock("div", _hoisted_1, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
188
+ _ctx.hasIcon ? (openBlock(), createElementBlock("view", _hoisted_1, [
189
+ createVNode(_component_nut_icon, mergeProps({
190
+ size: "20",
191
+ color: "#ffffff"
192
+ }, _ctx.$attrs, { name: _ctx.iconName }), null, 16, ["name"])
193
+ ])) : createCommentVNode("", true),
194
+ createTextVNode(),
195
+ _ctx.title ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
196
+ createTextVNode(),
191
197
  createElementVNode("view", {
192
198
  class: "nut-toast-text",
193
199
  innerHTML: _ctx.msg
194
- }, null, 8, _hoisted_2)
195
- ], 4)
200
+ }, null, 8, _hoisted_3)
201
+ ], 4))
196
202
  ], 6), [
197
- [vShow, _ctx.state.mounted]
203
+ [vShow, _ctx.visible]
198
204
  ])
199
205
  ]),
200
- _: 1
206
+ _: 3
201
207
  }, 8, ["onAfterLeave"]);
202
208
  }
203
- var Toast = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
204
- const defaultOptions = {
205
- msg: "",
206
- id: "",
207
- duration: 2e3,
208
- center: true,
209
- type: "text",
210
- title: "",
211
- customClass: "",
212
- bottom: "30px",
213
- size: "base",
214
- iconSize: "20",
215
- icon: null,
216
- textAlignCenter: true,
217
- loadingRotate: true,
218
- bgColor: "",
219
- onClose: null,
220
- unmount: null,
221
- cover: false,
222
- coverColor: "",
223
- closeOnClickOverlay: false
224
- };
225
- let idsMap = [];
226
- let optsMap = [];
227
- const clearToast = (id) => {
228
- if (id) {
229
- const container = document.getElementById(id);
230
- optsMap = optsMap.filter((item) => item.id !== id);
231
- idsMap = idsMap.filter((item) => item !== id);
232
- if (container) {
233
- document.body.removeChild(container);
234
- }
235
- } else {
236
- idsMap.forEach((item) => {
237
- const container = document.getElementById(item);
238
- if (container) {
239
- document.body.removeChild(container);
240
- }
241
- });
242
- optsMap = [];
243
- idsMap = [];
244
- }
245
- };
246
- const updateToast = (opts) => {
247
- const container = document.getElementById(opts.id);
248
- if (container) {
249
- const currentOpt = optsMap.find((item) => item.id === opts.id);
250
- if (currentOpt) {
251
- opts = { ...defaultOptions, ...currentOpt, ...opts };
252
- } else {
253
- opts = { ...defaultOptions, ...opts };
254
- }
255
- const instance = createVNode(Toast, opts);
256
- render(instance, container);
257
- return ToastFunction;
258
- }
259
- };
260
- const mountToast = (opts) => {
261
- opts.unmount = clearToast;
262
- let _id;
263
- if (opts.id) {
264
- _id = opts.id;
265
- if (idsMap.find((item) => item === opts.id)) {
266
- return updateToast(opts);
267
- }
268
- } else {
269
- _id = new Date().getTime() + "";
270
- }
271
- opts = { ...defaultOptions, ...opts };
272
- opts.id = _id;
273
- idsMap.push(opts.id);
274
- optsMap.push(opts);
275
- const container = document.createElement("div");
276
- container.id = opts.id;
277
- const instance = createVNode(Toast, opts);
278
- render(instance, container);
279
- document.body.appendChild(container);
280
- return ToastFunction;
281
- };
282
- const errorMsg = (msg) => {
283
- if (!msg) {
284
- console.warn("[NutUI Toast]: msg\u4E0D\u80FD\u4E3A\u7A7A");
285
- return;
286
- }
287
- };
288
- const ToastFunction = {
289
- text(msg, opts = {}) {
290
- errorMsg(msg);
291
- return mountToast({ ...opts, type: "text", msg });
292
- },
293
- success(msg, opts = {}) {
294
- errorMsg(msg);
295
- return mountToast({ icon: "success", ...opts, msg, type: "success" });
296
- },
297
- fail(msg, opts = {}) {
298
- errorMsg(msg);
299
- return mountToast({ icon: "failure", ...opts, msg, type: "fail" });
300
- },
301
- warn(msg, opts = {}) {
302
- errorMsg(msg);
303
- return mountToast({ icon: "tips", ...opts, msg, type: "warn" });
304
- },
305
- loading(msg, opts = {}) {
306
- return mountToast({
307
- icon: "loading",
308
- ...opts,
309
- msg,
310
- type: "loading"
311
- });
312
- },
313
- hide(id) {
314
- clearToast(id);
315
- },
316
- install(app) {
317
- app.use(Toast);
318
- app.config.globalProperties.$toast = ToastFunction;
319
- }
320
- };
321
- export { Toast, ToastFunction, ToastFunction as default };
209
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
210
+ export { index_taro as default };
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.5-beta.1 Tue Oct 25 2022 11:38:42 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { reactive, computed, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, renderSlot, createBlock } from "vue";
6
+ import { reactive, computed, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, toDisplayString, createCommentVNode, createTextVNode, renderSlot, createBlock } from "vue";
7
7
  import { m as myFixed, c as createComponent } from "./component.js";
8
8
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
9
  import "../locale/lang";
@@ -112,6 +112,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
112
112
  class: "nut-trendarrow-icon-before nut-trendarrow-rate",
113
113
  style: normalizeStyle(_ctx.calcStyle)
114
114
  }, toDisplayString(_ctx.calcRate), 5)) : createCommentVNode("", true),
115
+ createTextVNode(),
115
116
  renderSlot(_ctx.$slots, "default", {}, () => [
116
117
  Number(_ctx.rate) !== 0 ? (openBlock(), createBlock(_component_nut_icon, {
117
118
  key: 0,
@@ -120,6 +121,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
120
121
  color: _ctx.calcIconProps.color
121
122
  }, null, 8, ["size", "name", "color"])) : createCommentVNode("", true)
122
123
  ]),
124
+ createTextVNode(),
123
125
  _ctx.arrowLeft ? (openBlock(), createElementBlock("span", {
124
126
  key: 1,
125
127
  class: "nut-trendarrow-icon-after nut-trendarrow-rate",
@@ -127,5 +129,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
127
129
  }, toDisplayString(_ctx.calcRate), 5)) : createCommentVNode("", true)
128
130
  ], 2);
129
131
  }
130
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
131
- export { index as default };
132
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
133
+ export { index_taro as default };