@nutui/nutui 3.2.6-beta.1 → 3.2.6

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 (241) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +18 -4
  3. package/dist/nutui.es.js +4461 -4135
  4. package/dist/nutui.umd.js +4559 -4133
  5. package/dist/packages/_es/ActionSheet.js +19 -18
  6. package/dist/packages/_es/Address.js +85 -94
  7. package/dist/packages/_es/AddressList.js +12 -25
  8. package/dist/packages/_es/Animate.js +3 -3
  9. package/dist/packages/_es/Audio.js +2 -9
  10. package/dist/packages/_es/AudioOperate.js +1 -5
  11. package/dist/packages/_es/Avatar.js +10 -10
  12. package/dist/packages/_es/AvatarGroup.js +5 -5
  13. package/dist/packages/_es/BackTop.js +108 -55
  14. package/dist/packages/_es/Badge.js +12 -10
  15. package/dist/packages/_es/Barrage.js +103 -79
  16. package/dist/packages/_es/Button.js +3 -5
  17. package/dist/packages/_es/Calendar.js +23 -36
  18. package/dist/packages/_es/CalendarItem.js +3 -4
  19. package/dist/packages/_es/Card.js +5 -15
  20. package/dist/packages/_es/Cascader.js +11 -12
  21. package/dist/packages/_es/Category.js +12 -13
  22. package/dist/packages/_es/CategoryPane.js +13 -17
  23. package/dist/packages/_es/Cell.js +12 -9
  24. package/dist/packages/_es/CellGroup.js +2 -4
  25. package/dist/packages/_es/Checkbox.js +1 -1
  26. package/dist/packages/_es/CheckboxGroup.js +2 -2
  27. package/dist/packages/_es/CircleProgress.js +82 -98
  28. package/dist/packages/_es/Col.js +1 -1
  29. package/dist/packages/_es/Collapse.js +34 -65
  30. package/dist/packages/_es/CollapseItem.js +60 -93
  31. package/dist/packages/_es/Comment.js +19 -43
  32. package/dist/packages/_es/ConfigProvider.js +1 -1
  33. package/dist/packages/_es/CountDown.js +3 -3
  34. package/dist/packages/_es/CountUp.js +52 -47
  35. package/dist/packages/_es/DatePicker.js +54 -37
  36. package/dist/packages/_es/Dialog.js +88 -9
  37. package/dist/packages/_es/Divider.js +3 -3
  38. package/dist/packages/_es/Drag.js +49 -75
  39. package/dist/packages/_es/Ecard.js +18 -20
  40. package/dist/packages/_es/Elevator.js +76 -101
  41. package/dist/packages/_es/Ellipsis.js +100 -140
  42. package/dist/packages/_es/Empty.js +4 -6
  43. package/dist/packages/_es/FixedNav.js +6 -11
  44. package/dist/packages/_es/Form.js +4 -4
  45. package/dist/packages/_es/FormItem.js +1 -3
  46. package/dist/packages/_es/Grid.js +1 -1
  47. package/dist/packages/_es/GridItem.js +27 -10
  48. package/dist/packages/_es/Icon.js +1 -1
  49. package/dist/packages/_es/Image.js +114 -13
  50. package/dist/packages/_es/ImagePreview.js +411 -149
  51. package/dist/packages/_es/Indicator.js +3 -3
  52. package/dist/packages/_es/InfiniteLoading.js +115 -103
  53. package/dist/packages/_es/Input.js +32 -56
  54. package/dist/packages/_es/InputNumber.js +16 -25
  55. package/dist/packages/_es/Invoice.js +5 -6
  56. package/dist/packages/_es/Layout.js +1 -1
  57. package/dist/packages/_es/List.js +34 -47
  58. package/dist/packages/_es/Menu.js +35 -35
  59. package/dist/packages/_es/MenuItem.js +29 -56
  60. package/dist/packages/_es/Navbar.js +39 -49
  61. package/dist/packages/_es/NoticeBar.js +45 -54
  62. package/dist/packages/_es/Notify.js +162 -44
  63. package/dist/packages/_es/NumberKeyboard.js +20 -15
  64. package/dist/packages/_es/OldPicker.js +116 -130
  65. package/dist/packages/_es/OverLay.js +28 -5
  66. package/dist/packages/_es/Pagination.js +5 -8
  67. package/dist/packages/_es/Picker.js +74 -198
  68. package/dist/packages/_es/Popover.js +881 -201
  69. package/dist/packages/_es/Popup.js +84 -28
  70. package/dist/packages/_es/Price.js +6 -22
  71. package/dist/packages/_es/Progress.js +11 -18
  72. package/dist/packages/_es/PullRefresh.js +2 -4
  73. package/dist/packages/_es/Radio.js +3 -3
  74. package/dist/packages/_es/RadioGroup.js +1 -1
  75. package/dist/packages/_es/Range.js +34 -48
  76. package/dist/packages/_es/Rate.js +14 -15
  77. package/dist/packages/_es/Row.js +1 -1
  78. package/dist/packages/_es/SearchBar.js +36 -39
  79. package/dist/packages/_es/ShortPassword.js +66 -97
  80. package/dist/packages/_es/SideNavBar.js +18 -7
  81. package/dist/packages/_es/SideNavBarItem.js +1 -1
  82. package/dist/packages/_es/Signature.js +80 -113
  83. package/dist/packages/_es/Skeleton.js +11 -12
  84. package/dist/packages/_es/Sku.js +38 -63
  85. package/dist/packages/_es/Step.js +2 -7
  86. package/dist/packages/_es/Steps.js +1 -1
  87. package/dist/packages/_es/Sticky.js +23 -33
  88. package/dist/packages/_es/SubSideNavBar.js +2 -4
  89. package/dist/packages/_es/Swipe.js +26 -41
  90. package/dist/packages/_es/Swiper.js +21 -38
  91. package/dist/packages/_es/SwiperItem.js +2 -2
  92. package/dist/packages/_es/Switch.js +8 -8
  93. package/dist/packages/_es/TabPane.js +1 -1
  94. package/dist/packages/_es/Tabbar.js +13 -15
  95. package/dist/packages/_es/TabbarItem.js +30 -24
  96. package/dist/packages/_es/Table.js +17 -22
  97. package/dist/packages/_es/Tabs.js +16 -49
  98. package/dist/packages/_es/Tag.js +5 -6
  99. package/dist/packages/_es/TextArea.js +49 -114
  100. package/dist/packages/_es/TimeDetail.js +3 -4
  101. package/dist/packages/_es/TimePannel.js +3 -3
  102. package/dist/packages/_es/TimeSelect.js +10 -12
  103. package/dist/packages/_es/Toast.js +164 -53
  104. package/dist/packages/_es/TrendArrow.js +4 -6
  105. package/dist/packages/_es/Uploader.js +140 -141
  106. package/dist/packages/_es/Video.js +18 -39
  107. package/dist/packages/_es/WaterMark.js +14 -22
  108. package/dist/packages/_es/common.js +1 -1
  109. package/dist/packages/_es/component.js +1 -1
  110. package/dist/packages/_es/index.js +6 -44
  111. package/dist/packages/_es/index2.js +31 -8
  112. package/dist/packages/_es/index3.js +7 -64
  113. package/dist/packages/_es/index4.js +62 -424
  114. package/dist/packages/_es/{index.taro.js → index5.js} +154 -167
  115. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  116. package/dist/packages/_es/pxCheck.js +1 -1
  117. package/dist/packages/_es/raf.js +1 -1
  118. package/dist/packages/_es/style.css +3 -21
  119. package/dist/packages/checkbox/index.scss +1 -0
  120. package/dist/packages/locale/lang/baseLang.js +1 -1
  121. package/dist/packages/locale/lang/en-US.js +1 -1
  122. package/dist/packages/locale/lang/id-ID.js +1 -1
  123. package/dist/packages/locale/lang/index.js +1 -1
  124. package/dist/packages/locale/lang/zh-CN.js +1 -1
  125. package/dist/packages/locale/lang/zh-TW.js +1 -1
  126. package/dist/packages/menuitem/index.scss +12 -3
  127. package/dist/smartips/attributes.json +5 -1
  128. package/dist/smartips/tags.json +1 -0
  129. package/dist/smartips/web-types.json +11 -2
  130. package/dist/style.css +1 -1
  131. package/dist/styles/themes/default.scss +49 -49
  132. package/dist/styles/themes/jdb.scss +49 -49
  133. package/dist/styles/themes/jddkh.scss +49 -49
  134. package/dist/styles/themes/jdt.scss +49 -49
  135. package/dist/types/__VUE/actionsheet/{index.taro.vue.d.ts → index.vue.d.ts} +9 -9
  136. package/dist/types/__VUE/address/{index.taro.vue.d.ts → index.vue.d.ts} +32 -72
  137. package/dist/types/__VUE/addresslist/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  138. package/dist/types/__VUE/animate/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  139. package/dist/types/__VUE/avatar/{index.taro.vue.d.ts → index.vue.d.ts} +6 -6
  140. package/dist/types/__VUE/avatargroup/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  141. package/dist/types/__VUE/backtop/{index.taro.vue.d.ts → index.vue.d.ts} +37 -15
  142. package/dist/types/__VUE/badge/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  143. package/dist/types/__VUE/barrage/{index.taro.vue.d.ts → index.vue.d.ts} +2 -2
  144. package/dist/types/__VUE/button/index.vue.d.ts +1 -1
  145. package/dist/types/__VUE/calendar/{index.taro.vue.d.ts → index.vue.d.ts} +1 -13
  146. package/dist/types/__VUE/calendaritem/{index.taro.vue.d.ts → index.vue.d.ts} +17 -17
  147. package/dist/types/__VUE/card/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  148. package/dist/types/__VUE/cascader/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
  149. package/dist/types/__VUE/category/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  150. package/dist/types/__VUE/categorypane/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  151. package/dist/types/__VUE/cell/{index.taro.vue.d.ts → index.vue.d.ts} +6 -13
  152. package/dist/types/__VUE/checkbox/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  153. package/dist/types/__VUE/circleprogress/{index.taro.vue.d.ts → index.vue.d.ts} +15 -14
  154. package/dist/types/__VUE/collapse/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
  155. package/dist/types/__VUE/collapseitem/{index.taro.vue.d.ts → index.vue.d.ts} +10 -2
  156. package/dist/types/__VUE/comment/{index.taro.vue.d.ts → index.vue.d.ts} +2 -1
  157. package/dist/types/__VUE/configprovider/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  158. package/dist/types/__VUE/countdown/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  159. package/dist/types/__VUE/countup/{index.taro.vue.d.ts → index.vue.d.ts} +7 -5
  160. package/dist/types/__VUE/datepicker/{index.taro.vue.d.ts → index.vue.d.ts} +5 -5
  161. package/dist/types/__VUE/dialog/index.d.ts +48 -0
  162. package/dist/types/__VUE/dialog/{index.taro.vue.d.ts → index.vue.d.ts} +12 -9
  163. package/dist/types/__VUE/divider/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  164. package/dist/types/__VUE/drag/{index.taro.vue.d.ts → index.vue.d.ts} +1 -2
  165. package/dist/types/__VUE/ecard/{index.taro.vue.d.ts → index.vue.d.ts} +3 -3
  166. package/dist/types/__VUE/elevator/{index.taro.vue.d.ts → index.vue.d.ts} +2 -11
  167. package/dist/types/__VUE/ellipsis/{index.taro.vue.d.ts → index.vue.d.ts} +0 -4
  168. package/dist/types/__VUE/empty/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  169. package/dist/types/__VUE/fixednav/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  170. package/dist/types/__VUE/form/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  171. package/dist/types/__VUE/grid/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
  172. package/dist/types/__VUE/griditem/{index.taro.vue.d.ts → index.vue.d.ts} +27 -2
  173. package/dist/types/__VUE/image/index.vue.d.ts +117 -0
  174. package/dist/types/__VUE/image/type.d.ts +6 -0
  175. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +109 -0
  176. package/dist/types/__VUE/imagepreview/index.d.ts +25 -0
  177. package/dist/types/__VUE/imagepreview/{index.taro.vue.d.ts → index.vue.d.ts} +44 -33
  178. package/dist/types/__VUE/indicator/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  179. package/dist/types/__VUE/infiniteloading/{index.taro.vue.d.ts → index.vue.d.ts} +8 -15
  180. package/dist/types/__VUE/input/{index.taro.vue.d.ts → index.vue.d.ts} +16 -34
  181. package/dist/types/__VUE/inputnumber/{index.taro.vue.d.ts → index.vue.d.ts} +2 -2
  182. package/dist/types/__VUE/invoice/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  183. package/dist/types/__VUE/layout/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  184. package/dist/types/__VUE/list/{index.taro.vue.d.ts → index.vue.d.ts} +2 -2
  185. package/dist/types/__VUE/menu/{index.taro.vue.d.ts → index.vue.d.ts} +0 -1
  186. package/dist/types/__VUE/menuitem/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  187. package/dist/types/__VUE/navbar/{index.taro.vue.d.ts → index.vue.d.ts} +2 -1
  188. package/dist/types/__VUE/noticebar/{index.taro.vue.d.ts → index.vue.d.ts} +4 -4
  189. package/dist/types/__VUE/notify/index.d.ts +26 -0
  190. package/dist/types/__VUE/notify/{index.taro.vue.d.ts → index.vue.d.ts} +18 -5
  191. package/dist/types/__VUE/numberkeyboard/{index.taro.vue.d.ts → index.vue.d.ts} +29 -5
  192. package/dist/types/__VUE/oldpicker/{ColumnTaro.vue.d.ts → Column.vue.d.ts} +17 -28
  193. package/dist/types/__VUE/oldpicker/{index.taro.vue.d.ts → index.vue.d.ts} +44 -64
  194. package/dist/types/__VUE/pagination/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  195. package/dist/types/__VUE/picker/{ColumnTaro.vue.d.ts → Column.vue.d.ts} +4 -16
  196. package/dist/types/__VUE/picker/{index.taro.vue.d.ts → index.vue.d.ts} +28 -53
  197. package/dist/types/__VUE/popover/{index.taro.vue.d.ts → index.vue.d.ts} +12 -14
  198. package/dist/types/__VUE/popup/index.vue.d.ts +1 -1
  199. package/dist/types/__VUE/price/{index.taro.vue.d.ts → index.vue.d.ts} +0 -1
  200. package/dist/types/__VUE/progress/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
  201. package/dist/types/__VUE/radio/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  202. package/dist/types/__VUE/range/{index.taro.vue.d.ts → index.vue.d.ts} +6 -7
  203. package/dist/types/__VUE/rate/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  204. package/dist/types/__VUE/searchbar/{index.taro.vue.d.ts → index.vue.d.ts} +19 -19
  205. package/dist/types/__VUE/shortpassword/{index.taro.vue.d.ts → index.vue.d.ts} +21 -6
  206. package/dist/types/__VUE/sidenavbar/{index.taro.vue.d.ts → index.vue.d.ts} +5 -0
  207. package/dist/types/__VUE/signature/{index.taro.vue.d.ts → index.vue.d.ts} +5 -8
  208. package/dist/types/__VUE/skeleton/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  209. package/dist/types/__VUE/sku/index.vue.d.ts +310 -0
  210. package/dist/types/__VUE/step/index.vue.d.ts +1 -1
  211. package/dist/types/__VUE/steps/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  212. package/dist/types/__VUE/sticky/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  213. package/dist/types/__VUE/swipe/{index.taro.vue.d.ts → index.vue.d.ts} +1 -2
  214. package/dist/types/__VUE/swiper/{index.taro.vue.d.ts → index.vue.d.ts} +1 -2
  215. package/dist/types/__VUE/swiperitem/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  216. package/dist/types/__VUE/switch/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  217. package/dist/types/__VUE/tabbar/{index.taro.vue.d.ts → index.vue.d.ts} +2 -1
  218. package/dist/types/__VUE/tabbaritem/{index.taro.vue.d.ts → index.vue.d.ts} +9 -9
  219. package/dist/types/__VUE/table/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  220. package/dist/types/__VUE/tabs/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  221. package/dist/types/__VUE/tag/{index.taro.vue.d.ts → index.vue.d.ts} +4 -4
  222. package/dist/types/__VUE/tag/type.d.ts +5 -0
  223. package/dist/types/__VUE/textarea/{index.taro.vue.d.ts → index.vue.d.ts} +3 -5
  224. package/dist/types/__VUE/timedetail/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  225. package/dist/types/__VUE/timepannel/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  226. package/dist/types/__VUE/timeselect/{index.taro.vue.d.ts → index.vue.d.ts} +8 -7
  227. package/dist/types/__VUE/toast/index.d.ts +16 -0
  228. package/dist/types/__VUE/toast/{index.taro.vue.d.ts → index.vue.d.ts} +22 -44
  229. package/dist/types/__VUE/trendarrow/{index.taro.vue.d.ts → index.vue.d.ts} +0 -0
  230. package/dist/types/__VUE/uploader/{index.taro.vue.d.ts → index.vue.d.ts} +11 -20
  231. package/dist/types/__VUE/watermark/{index.taro.vue.d.ts → index.vue.d.ts} +1 -1
  232. package/dist/types/index.d.ts +1 -1
  233. package/dist/types/nutui.d.ts +89 -89
  234. package/package.json +3 -2
  235. package/dist/packages/_es/use-lock-scroll.js +0 -23
  236. package/dist/types/__VUE/button/index.taro.vue.d.ts +0 -116
  237. package/dist/types/__VUE/icon/index.taro.vue.d.ts +0 -74
  238. package/dist/types/__VUE/image/index.taro.vue.d.ts +0 -33
  239. package/dist/types/__VUE/overlay/index.taro.vue.d.ts +0 -85
  240. package/dist/types/__VUE/popup/index.taro.vue.d.ts +0 -1728
  241. package/dist/types/__VUE/sku/index.taro.vue.d.ts +0 -182
@@ -1,10 +1,9 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { inject, ref, reactive, computed, getCurrentInstance, watch, onMounted, toRefs, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, mergeProps, createCommentVNode, createTextVNode, renderSlot, normalizeStyle } from "vue";
7
- import Taro, { eventCenter, getCurrentInstance as getCurrentInstance$1 } from "@tarojs/taro";
6
+ import { inject, reactive, computed, getCurrentInstance, ref, watch, onMounted, toRefs, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, mergeProps, createCommentVNode, renderSlot } from "vue";
8
7
  import { c as createComponent } from "./component.js";
9
8
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
10
9
  import "../locale/lang";
@@ -34,7 +33,6 @@ const _sfc_main = create({
34
33
  },
35
34
  setup(props, ctx) {
36
35
  const collapse = inject("collapseParent");
37
- const conHeight = ref("auto");
38
36
  const parent = reactive(collapse);
39
37
  const classes = computed(() => {
40
38
  const prefixCls = componentName;
@@ -68,33 +66,31 @@ const _sfc_main = create({
68
66
  const wrapperRef = ref(null);
69
67
  const contentRef = ref(null);
70
68
  const onTransitionEnd = () => {
71
- nextTick(() => {
72
- parent.children.forEach((item1, index) => {
73
- let ary = Array.from(item1.$el.children);
74
- ary.forEach((item2, index2) => {
75
- if (item2.className.includes("collapse-wrapper")) {
76
- item2.style.willChange = "auto";
77
- }
78
- });
79
- });
80
- });
69
+ const wrapperRefEle = document.getElementsByClassName("collapse-wrapper")[0];
70
+ if (wrapperRefEle) {
71
+ wrapperRefEle.style.willChange = "auto";
72
+ }
81
73
  };
82
74
  const animation = () => {
83
- if (parent.props.icon && !proxyData.openExpanded) {
84
- proxyData.iconStyle["transform"] = "rotate(0deg)";
85
- } else {
86
- proxyData.iconStyle["transform"] = "rotate(" + parent.props.rotate + "deg)";
75
+ const wrapperRefEle = wrapperRef.value;
76
+ const contentRefEle = contentRef.value;
77
+ if (!wrapperRefEle || !contentRefEle) {
78
+ return;
87
79
  }
88
- nextTick(() => {
89
- const query = Taro.getEnv() === "ALIPAY" ? my.createSelectorQuery() : Taro.createSelectorQuery();
90
- query.selectAll(".collapse-content").boundingClientRect();
91
- query.exec((res) => {
92
- getH(res[0]);
93
- });
94
- if (!proxyData.openExpanded) {
95
- onTransitionEnd();
80
+ const offsetHeight = contentRefEle.offsetHeight || "auto";
81
+ if (offsetHeight) {
82
+ const contentHeight = `${offsetHeight}px`;
83
+ wrapperRefEle.style.willChange = "height";
84
+ wrapperRefEle.style.height = !proxyData.openExpanded ? 0 : contentHeight;
85
+ if (parent.props.icon && !proxyData.openExpanded) {
86
+ proxyData.iconStyle["transform"] = "rotate(0deg)";
87
+ } else {
88
+ proxyData.iconStyle["transform"] = "rotate(" + parent.props.rotate + "deg)";
96
89
  }
97
- });
90
+ }
91
+ if (!proxyData.openExpanded) {
92
+ onTransitionEnd();
93
+ }
98
94
  };
99
95
  const open = () => {
100
96
  proxyData.openExpanded = !proxyData.openExpanded;
@@ -117,7 +113,7 @@ const _sfc_main = create({
117
113
  }
118
114
  });
119
115
  } else {
120
- parent.changeValAry(props.name);
116
+ parent.changeValAry(String(props.name));
121
117
  open();
122
118
  }
123
119
  };
@@ -140,68 +136,45 @@ const _sfc_main = create({
140
136
  var _a, _b;
141
137
  return (_b = (_a = ctx == null ? void 0 : ctx.slots) == null ? void 0 : _a.default) == null ? void 0 : _b.call(_a);
142
138
  },
143
- (vnodes) => {
139
+ () => {
144
140
  setTimeout(() => {
145
- getRefHeight();
141
+ animation();
146
142
  }, 300);
147
143
  }
148
144
  );
149
- const getH = (list) => {
150
- parent.children.forEach((item1, index1) => {
151
- let ary = Array.from(item1.$el.children);
152
- let _uid = ary[1].children[0]["uid"];
153
- let tm = list.filter((item2) => item2.id == _uid);
154
- if (tm && tm.length > 0) {
155
- let h = tm[0]["height"];
156
- item1.conHeight = h;
157
- }
158
- });
159
- };
160
- const getH5 = () => {
161
- parent.children.forEach((item1, index1) => {
162
- let ary = Array.from(item1.$el.children);
163
- let h = ary[1].children[0]["offsetHeight"];
164
- item1.conHeight = h;
165
- });
166
- };
167
- const getRefHeight = () => {
168
- const query = Taro.getEnv() === "ALIPAY" ? my.createSelectorQuery() : Taro.createSelectorQuery();
169
- query.selectAll(".collapse-content").boundingClientRect();
170
- query.exec((res) => {
171
- if (Taro.getEnv() === "WEB") {
172
- getH5();
173
- } else {
174
- getH(res[0]);
145
+ const init = () => {
146
+ const { name } = props;
147
+ const active = parent && parent.props.active;
148
+ nextTick(() => {
149
+ if (typeof active == "number" || typeof active == "string") {
150
+ if (name == active) {
151
+ defaultOpen();
152
+ }
153
+ } else if (Object.values(active) instanceof Array) {
154
+ const f = Object.values(active).filter((item) => item == name);
155
+ if (f.length > 0) {
156
+ defaultOpen();
157
+ }
175
158
  }
176
159
  });
177
160
  };
178
161
  onMounted(() => {
179
- const { name } = props;
180
- const active = parent && parent.props.active;
181
- if (typeof active == "number" || typeof active == "string") {
182
- if (name == active) {
183
- defaultOpen();
184
- }
185
- } else if (Object.values(active) instanceof Array) {
186
- const f = Object.values(active).filter((item) => item == name);
187
- if (f.length > 0) {
188
- defaultOpen();
189
- }
190
- }
191
- if (Taro.getEnv() === "WEB") {
192
- getRefHeight();
193
- } else {
194
- eventCenter.once(getCurrentInstance$1().router.onReady, () => {
195
- getRefHeight();
196
- });
162
+ init();
163
+ });
164
+ const emptyContent = computed(() => {
165
+ let ele = contentRef.value;
166
+ let _class = "";
167
+ if (!(ele == null ? void 0 : ele.innerText)) {
168
+ _class = "empty";
197
169
  }
170
+ return _class;
198
171
  });
199
172
  return {
200
173
  classes,
174
+ emptyContent,
201
175
  ...toRefs(proxyData),
202
176
  ...toRefs(parent.props),
203
177
  ...toRefs(titleIconStyle),
204
- conHeight,
205
178
  wrapperRef,
206
179
  contentRef,
207
180
  open,
@@ -225,8 +198,8 @@ const _hoisted_6 = {
225
198
  };
226
199
  const _hoisted_7 = { class: "collapse-extraRender" };
227
200
  const _hoisted_8 = {
228
- class: "collapse-content",
229
- ref: "contentRef"
201
+ class: "collapse-wrapper",
202
+ ref: "wrapperRef"
230
203
  };
231
204
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
232
205
  const _component_nut_icon = resolveComponent("nut-icon");
@@ -246,9 +219,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
246
219
  }, _ctx.$attrs, {
247
220
  size: _ctx.titleIconSize,
248
221
  color: _ctx.titleIconColor,
249
- class: ["collapse-title-icon", _ctx.titleIconPosition == "left" ? "titleIconLeft" : "titleIconRight"]
222
+ class: [_ctx.titleIconPosition == "left" ? "titleIconLeft" : "titleIconRight"]
250
223
  }), null, 16, ["name", "size", "color", "class"])) : createCommentVNode("", true),
251
- createTextVNode(),
252
224
  _ctx.$slots.mTitle ? renderSlot(_ctx.$slots, "mTitle", { key: 1 }) : (openBlock(), createElementBlock("view", {
253
225
  key: 2,
254
226
  innerHTML: _ctx.title,
@@ -257,7 +229,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
257
229
  ])
258
230
  ])
259
231
  ]),
260
- createTextVNode(),
261
232
  _ctx.$slots.sTitle ? (openBlock(), createElementBlock("view", _hoisted_4, [
262
233
  renderSlot(_ctx.$slots, "sTitle")
263
234
  ])) : (openBlock(), createElementBlock("view", {
@@ -265,7 +236,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
265
236
  innerHTML: _ctx.subTitle,
266
237
  class: "subTitle"
267
238
  }, null, 8, _hoisted_5)),
268
- createTextVNode(),
269
239
  _ctx.icon ? (openBlock(), createBlock(_component_nut_icon, mergeProps({
270
240
  key: 2,
271
241
  name: _ctx.icon
@@ -276,23 +246,20 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
276
246
  style: _ctx.iconStyle
277
247
  }), null, 16, ["name", "size", "color", "class", "style"])) : createCommentVNode("", true)
278
248
  ], 2),
279
- createTextVNode(),
280
249
  _ctx.$slots.extraRender ? (openBlock(), createElementBlock("view", _hoisted_6, [
281
250
  createElementVNode("div", _hoisted_7, [
282
251
  renderSlot(_ctx.$slots, "extraRender")
283
252
  ])
284
253
  ])) : createCommentVNode("", true),
285
- createTextVNode(),
286
- createElementVNode("view", {
287
- class: normalizeClass(["collapse-wrapper", _ctx.openExpanded ? "open-style" : "close-style"]),
288
- ref: "wrapperRef",
289
- style: normalizeStyle({ height: _ctx.openExpanded ? _ctx.conHeight == "auto" ? "auto" : _ctx.conHeight + "px" : 0 })
290
- }, [
291
- createElementVNode("view", _hoisted_8, [
254
+ createElementVNode("view", _hoisted_8, [
255
+ createElementVNode("view", {
256
+ class: normalizeClass(["collapse-content", _ctx.emptyContent]),
257
+ ref: "contentRef"
258
+ }, [
292
259
  renderSlot(_ctx.$slots, "default")
293
- ], 512)
294
- ], 6)
260
+ ], 2)
261
+ ], 512)
295
262
  ], 2);
296
263
  }
297
- var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
298
- export { index_taro as default };
264
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
265
+ export { index as default };
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { resolveComponent, openBlock, createElementBlock, createElementVNode, createCommentVNode, createTextVNode, normalizeClass, toDisplayString, renderSlot, createVNode, ref, watch, onMounted, Fragment, renderList, computed, withCtx, normalizeStyle } from "vue";
6
+ import { resolveComponent, openBlock, createElementBlock, createElementVNode, createCommentVNode, normalizeClass, toDisplayString, renderSlot, createVNode, ref, watch, onMounted, Fragment, renderList, computed, withCtx, normalizeStyle, 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";
@@ -56,7 +56,6 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
56
56
  src: _ctx.info.avatar
57
57
  }, null, 8, _hoisted_3$3)) : createCommentVNode("", true)
58
58
  ]),
59
- createTextVNode(),
60
59
  _ctx.type == "default" ? (openBlock(), createElementBlock("view", {
61
60
  key: 0,
62
61
  class: normalizeClass([`nut-comment-header__user-${_ctx.type}`])
@@ -65,10 +64,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
65
64
  class: normalizeClass([`nut-comment-header__user-${_ctx.type}-name`])
66
65
  }, [
67
66
  createElementVNode("span", null, toDisplayString(_ctx.info.nickName), 1),
68
- createTextVNode(),
69
67
  renderSlot(_ctx.$slots, "labels")
70
68
  ], 2),
71
- createTextVNode(),
72
69
  createElementVNode("view", _hoisted_4$3, [
73
70
  createVNode(_component_nut_rate, {
74
71
  modelValue: _ctx.info.score,
@@ -86,14 +83,11 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
86
83
  createElementVNode("span", {
87
84
  class: normalizeClass([`nut-comment-header__user-${_ctx.type}-name`])
88
85
  }, toDisplayString(_ctx.info.nickName), 3),
89
- createTextVNode(),
90
86
  renderSlot(_ctx.$slots, "labels")
91
87
  ], 2))
92
88
  ]),
93
- createTextVNode(),
94
89
  _ctx.info.time ? (openBlock(), createElementBlock("view", _hoisted_5$1, toDisplayString(_ctx.info.time), 1)) : createCommentVNode("", true)
95
90
  ])) : createCommentVNode("", true),
96
- createTextVNode(),
97
91
  _ctx.type == "complex" ? (openBlock(), createElementBlock("view", {
98
92
  key: 1,
99
93
  class: normalizeClass([`nut-comment-header__${_ctx.type}-score`])
@@ -105,11 +99,9 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
105
99
  spacing: "3",
106
100
  readonly: ""
107
101
  }, null, 8, ["modelValue"]),
108
- createTextVNode(),
109
102
  createElementVNode("i", {
110
103
  class: normalizeClass([`nut-comment-header__${_ctx.type}-score-i`])
111
104
  }, null, 2),
112
- createTextVNode(),
113
105
  createElementVNode("view", {
114
106
  class: normalizeClass([`nut-comment-header__${_ctx.type}-score-size`])
115
107
  }, toDisplayString(_ctx.info.size), 3)
@@ -159,9 +151,9 @@ const _sfc_main$2 = create$2({
159
151
  }
160
152
  totalImages.value = props.videos.concat(props.images);
161
153
  });
162
- const showImages = (type, index) => {
154
+ const showImages = (type, index2) => {
163
155
  const { videos, images } = props;
164
- const i = type == "img" ? index - videos.length : index;
156
+ const i = type == "img" ? index2 - videos.length : index2;
165
157
  emit("clickImages", {
166
158
  type,
167
159
  index: i,
@@ -185,36 +177,32 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
185
177
  return openBlock(), createElementBlock("view", {
186
178
  class: normalizeClass(`nut-comment-images nut-comment-images--${_ctx.type}`)
187
179
  }, [
188
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.videos, (itV, index) => {
180
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.videos, (itV, index2) => {
189
181
  return openBlock(), createElementBlock("view", {
190
182
  class: "nut-comment-images__item nut-comment-images__item--video",
191
183
  key: itV.id,
192
- onClick: ($event) => _ctx.showImages("video", index, index)
184
+ onClick: ($event) => _ctx.showImages("video", index2, index2)
193
185
  }, [
194
186
  createElementVNode("img", {
195
187
  src: itV.mainUrl
196
188
  }, null, 8, _hoisted_2$2),
197
- createTextVNode(),
198
189
  _hoisted_3$2
199
190
  ], 8, _hoisted_1$2);
200
191
  }), 128)),
201
- createTextVNode(),
202
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.images, (itI, index) => {
192
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.images, (itI, index2) => {
203
193
  return openBlock(), createElementBlock(Fragment, {
204
194
  key: itI.id
205
195
  }, [
206
- _ctx.type == "multi" && _ctx.videos.length + index < 9 || _ctx.type != "multi" ? (openBlock(), createElementBlock("view", {
196
+ _ctx.type == "multi" && _ctx.videos.length + index2 < 9 || _ctx.type != "multi" ? (openBlock(), createElementBlock("view", {
207
197
  key: 0,
208
198
  class: "nut-comment-images__item nut-comment-images__item--imgbox",
209
- onClick: ($event) => _ctx.showImages("img", index + _ctx.videos.length)
199
+ onClick: ($event) => _ctx.showImages("img", index2 + _ctx.videos.length)
210
200
  }, [
211
201
  createElementVNode("img", {
212
202
  src: itI.smallImgUrl ? itI.smallImgUrl : itI.imgUrl
213
203
  }, null, 8, _hoisted_5),
214
- createTextVNode(),
215
- _ctx.type == "multi" && _ctx.totalImages.length > 9 && _ctx.videos.length + index > 7 ? (openBlock(), createElementBlock("view", _hoisted_6, [
204
+ _ctx.type == "multi" && _ctx.totalImages.length > 9 && _ctx.videos.length + index2 > 7 ? (openBlock(), createElementBlock("view", _hoisted_6, [
216
205
  createElementVNode("span", null, "\u5171 " + toDisplayString(_ctx.totalImages.length) + " \u5F20", 1),
217
- createTextVNode(),
218
206
  createVNode(_component_nut_icon, {
219
207
  name: "right",
220
208
  size: "12"
@@ -226,7 +214,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
226
214
  ], 2);
227
215
  }
228
216
  var CommentImages = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
229
- const { componentName: componentName$1, create: create$1, translate } = createComponent("comment-bottom");
217
+ const { componentName: componentName$1, create: create$1, translate: translate$1 } = createComponent("comment-bottom");
230
218
  const _sfc_main$1 = create$1({
231
219
  props: {
232
220
  type: {
@@ -267,7 +255,7 @@ const _sfc_main$1 = create$1({
267
255
  const handleClick = () => {
268
256
  emit("handleClick");
269
257
  };
270
- return { showPopver, operate, mergeOp, handleClick, translate };
258
+ return { showPopver, operate, mergeOp, handleClick, translate: translate$1 };
271
259
  }
272
260
  });
273
261
  const _hoisted_1$1 = { class: "nut-comment-bottom" };
@@ -283,7 +271,6 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
283
271
  }, [
284
272
  _ctx.type != "complex" ? (openBlock(), createElementBlock("span", _hoisted_2$1, toDisplayString(_ctx.info.size), 1)) : createCommentVNode("", true)
285
273
  ]),
286
- createTextVNode(),
287
274
  createElementVNode("view", _hoisted_3$1, [
288
275
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.mergeOp, (name, i) => {
289
276
  return openBlock(), createElementBlock("view", {
@@ -293,15 +280,12 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
293
280
  }, [
294
281
  name != "more" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
295
282
  createElementVNode("span", null, toDisplayString(_ctx.info[name]), 1),
296
- createTextVNode(),
297
283
  createVNode(_component_nut_icon, {
298
284
  name: name == "like" ? "fabulous" : "comment"
299
285
  }, null, 8, ["name"])
300
286
  ], 64)) : createCommentVNode("", true),
301
- createTextVNode(),
302
287
  name == "more" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
303
288
  createVNode(_component_nut_icon, { name: "more-x" }),
304
- createTextVNode(),
305
289
  _ctx.showPopver ? (openBlock(), createElementBlock("view", {
306
290
  key: 0,
307
291
  class: "nut-comment-bottom__cpx-item-popover",
@@ -314,7 +298,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
314
298
  ]);
315
299
  }
316
300
  var CommentBottom = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
317
- const { componentName, create } = createComponent("comment");
301
+ const { componentName, create, translate } = createComponent("comment");
318
302
  const _sfc_main = create({
319
303
  props: {
320
304
  headerType: {
@@ -383,7 +367,7 @@ const _sfc_main = create({
383
367
  const clickImages = (value) => {
384
368
  emit("clickImages", value);
385
369
  };
386
- return { classes, conEllipsis, clickOperate, handleClick, clickImages };
370
+ return { classes, conEllipsis, clickOperate, handleClick, clickImages, translate };
387
371
  }
388
372
  });
389
373
  const _hoisted_1 = ["innerHTML"];
@@ -413,23 +397,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
413
397
  ]),
414
398
  _: 3
415
399
  }, 8, ["type", "info", "labels", "onHandleClick"]),
416
- createTextVNode(),
417
400
  renderSlot(_ctx.$slots, "feature"),
418
- createTextVNode(),
419
401
  createElementVNode("view", {
420
402
  class: "nut-comment__main",
421
403
  style: normalizeStyle(`-webkit-line-clamp:${_ctx.conEllipsis}`),
422
404
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
423
405
  innerHTML: _ctx.info.content.replace(/\n/g, "<br>")
424
406
  }, null, 12, _hoisted_1),
425
- createTextVNode(),
426
407
  createVNode(_component_comment_images, {
427
408
  images: _ctx.images,
428
409
  videos: _ctx.videos,
429
410
  type: _ctx.imagesRows,
430
411
  onClickImages: _ctx.clickImages
431
412
  }, null, 8, ["images", "videos", "type", "onClickImages"]),
432
- createTextVNode(),
433
413
  _ctx.follow && _ctx.follow.days > 0 ? (openBlock(), createElementBlock("view", {
434
414
  key: 0,
435
415
  class: "nut-comment__follow",
@@ -440,20 +420,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
440
420
  size: "14",
441
421
  name: "joy-smile"
442
422
  }),
443
- createTextVNode("\u8D2D\u4E70" + toDisplayString(_ctx.follow.days) + "\u5929\u540E\u8FFD\u8BC4", 1)
423
+ createTextVNode(toDisplayString(_ctx.translate("additionalReview", _ctx.follow.days)), 1)
444
424
  ]),
445
- createTextVNode(),
446
425
  createElementVNode("view", _hoisted_3, toDisplayString(_ctx.follow.content), 1),
447
- createTextVNode(),
448
426
  _ctx.follow.images && _ctx.follow.images.length > 0 ? (openBlock(), createElementBlock("view", _hoisted_4, [
449
- createTextVNode(toDisplayString(_ctx.follow.images.length) + " \u5F20\u8FFD\u8BC4\u56FE\u7247 ", 1),
427
+ createTextVNode(toDisplayString(_ctx.translate("additionalImages", _ctx.follow.images.length)) + " ", 1),
450
428
  createVNode(_component_nut_icon, {
451
429
  size: "12",
452
430
  name: "right"
453
431
  })
454
432
  ])) : createCommentVNode("", true)
455
433
  ])) : createCommentVNode("", true),
456
- createTextVNode(),
457
434
  createVNode(_component_comment_bottom, {
458
435
  type: _ctx.headerType,
459
436
  info: _ctx.info,
@@ -461,9 +438,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
461
438
  onClickOperate: _ctx.clickOperate,
462
439
  onHandleClick: _ctx.handleClick
463
440
  }, null, 8, ["type", "info", "operation", "onClickOperate", "onHandleClick"]),
464
- createTextVNode(),
465
- renderSlot(_ctx.$slots, "cmt-shop-reply")
441
+ renderSlot(_ctx.$slots, "comment-shop-reply")
466
442
  ], 2)) : createCommentVNode("", true);
467
443
  }
468
- var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
469
- export { index_taro as default };
444
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
445
+ export { index as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.6-beta.1 Mon Oct 31 2022 19:38:22 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -254,5 +254,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
254
254
  }, null, 8, _hoisted_1))
255
255
  ], 2);
256
256
  }
257
- var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
258
- export { index_taro as default };
257
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
258
+ export { index as default };