@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,11 +1,10 @@
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
6
  import { c as createComponent } from "./component.js";
7
- import { u as useRouter } from "./index.js";
8
- import { inject, reactive, getCurrentInstance, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, toDisplayString, createCommentVNode, createVNode, renderSlot } from "vue";
7
+ import { inject, reactive, getCurrentInstance, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, toDisplayString, createCommentVNode, createTextVNode, createVNode, renderSlot } from "vue";
9
8
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
10
9
  import "../locale/lang";
11
10
  const { create } = createComponent("tabbar-item");
@@ -38,14 +37,14 @@ const _sfc_main = create({
38
37
  type: String,
39
38
  default: ""
40
39
  },
41
- classPrefix: {
42
- type: String,
43
- default: "nut-icon"
44
- },
45
40
  dot: {
46
41
  type: Boolean,
47
42
  default: false
48
43
  },
44
+ classPrefix: {
45
+ type: String,
46
+ default: "nut-icon"
47
+ },
49
48
  fontClassName: {
50
49
  type: String,
51
50
  default: "nutui-iconfont"
@@ -61,13 +60,12 @@ const _sfc_main = create({
61
60
  active: parent.modelValue,
62
61
  index: 0
63
62
  });
64
- const router = useRouter();
65
63
  const relation = (child) => {
66
64
  var _a;
67
65
  if (child.proxy) {
68
66
  parent.children.push(child.proxy);
69
- const index2 = computed(() => parent.children.indexOf(child.proxy));
70
- state.index = (_a = props.name) != null ? _a : index2.value;
67
+ const index = computed(() => parent.children.indexOf(child.proxy));
68
+ state.index = (_a = props.name) != null ? _a : index.value;
71
69
  }
72
70
  };
73
71
  relation(getCurrentInstance());
@@ -75,13 +73,13 @@ const _sfc_main = create({
75
73
  function change() {
76
74
  var _a;
77
75
  let key = (_a = props.name) != null ? _a : state.index;
78
- let index2 = null;
76
+ let index = null;
79
77
  if (props.name) {
80
- index2 = parent.children.findIndex((item) => {
78
+ index = parent.children.findIndex((item) => {
81
79
  return item.name == key;
82
80
  });
83
81
  }
84
- parent.changeIndex(index2 != null ? index2 : key, state.index);
82
+ parent.changeIndex(index != null ? index : key, state.index);
85
83
  }
86
84
  const choosed = computed(() => {
87
85
  if (parent) {
@@ -90,25 +88,16 @@ const _sfc_main = create({
90
88
  return null;
91
89
  });
92
90
  watch(choosed, (value, oldValue) => {
93
- var _a, _b;
91
+ var _a;
94
92
  state.active = value;
95
- let index2 = value;
93
+ let index = value;
96
94
  if (props.name) {
97
- index2 = parent.children.findIndex((item) => {
95
+ index = parent.children.findIndex((item) => {
98
96
  return item.name == value;
99
97
  });
100
98
  }
101
- if ((_a = parent.children[index2]) == null ? void 0 : _a.href) {
102
- window.location.href = parent.children[index2].href;
103
- return;
104
- }
105
- if ((_b = parent.children[index2]) == null ? void 0 : _b.to) {
106
- let to = parent.children[index2].to;
107
- if (to && router) {
108
- router.push(to);
109
- } else {
110
- location.replace(to);
111
- }
99
+ if ((_a = parent.children[index]) == null ? void 0 : _a.href) {
100
+ window.location.href = parent.children[index].href;
112
101
  }
113
102
  });
114
103
  return {
@@ -140,13 +129,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
140
129
  style: normalizeStyle({
141
130
  color: _ctx.active ? _ctx.state.activeColor : _ctx.state.unactiveColor
142
131
  }),
143
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.change())
132
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.change(_ctx.state.index))
144
133
  }, [
145
134
  createElementVNode("view", _hoisted_1, [
146
135
  !_ctx.dot ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
147
136
  _ctx.num && _ctx.num <= 99 ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.num), 1)) : _ctx.num && _ctx.num > 100 ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString("99+"))) : createCommentVNode("", true)
148
137
  ], 64)) : createCommentVNode("", true),
138
+ createTextVNode(),
149
139
  _ctx.dot ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("", true),
140
+ createTextVNode(),
150
141
  _ctx.icon ? (openBlock(), createElementBlock("view", _hoisted_5, [
151
142
  createVNode(_component_nut_icon, {
152
143
  class: "nut-tabbar-item_icon-box_icon",
@@ -156,6 +147,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
156
147
  "class-prefix": _ctx.classPrefix
157
148
  }, null, 8, ["size", "name", "font-class-name", "class-prefix"])
158
149
  ])) : createCommentVNode("", true),
150
+ createTextVNode(),
159
151
  !_ctx.icon && _ctx.activeImg ? (openBlock(), createElementBlock("div", {
160
152
  key: 3,
161
153
  class: "nut-tabbar-item_icon-box_icon",
@@ -165,14 +157,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
165
157
  height: _ctx.state.size
166
158
  })
167
159
  }, null, 4)) : createCommentVNode("", true),
160
+ createTextVNode(),
168
161
  createElementVNode("view", {
169
162
  class: normalizeClass(["nut-tabbar-item_icon-box_nav-word", { "nut-tabbar-item_icon-box_big-word": !_ctx.icon && !_ctx.activeImg }])
170
163
  }, [
171
164
  _ctx.tabTitle ? (openBlock(), createElementBlock("view", _hoisted_6, toDisplayString(_ctx.tabTitle), 1)) : createCommentVNode("", true),
165
+ createTextVNode(),
172
166
  !_ctx.tabTitle ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("", true)
173
167
  ], 2)
174
168
  ])
175
169
  ], 6);
176
170
  }
177
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
178
- export { index as default };
171
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
172
+ export { index_taro as default };
@@ -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
  */
@@ -118,17 +118,17 @@ const _hoisted_4 = { class: "nut-table__main__body" };
118
118
  const _hoisted_5 = { key: 1 };
119
119
  const _hoisted_6 = {
120
120
  key: 0,
121
+ class: "nut-table__summary"
122
+ };
123
+ const _hoisted_7 = ["innerHTML"];
124
+ const _hoisted_8 = {
125
+ key: 1,
121
126
  class: "nut-table__nodata"
122
127
  };
123
- const _hoisted_7 = {
128
+ const _hoisted_9 = {
124
129
  key: 0,
125
130
  class: "nut-table__nodata__text"
126
131
  };
127
- const _hoisted_8 = {
128
- key: 1,
129
- class: "nut-table__summary"
130
- };
131
- const _hoisted_9 = ["innerHTML"];
132
132
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
133
133
  const _component_nut_icon = resolveComponent("nut-icon");
134
134
  const _component_RenderColumn = resolveComponent("RenderColumn");
@@ -149,6 +149,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
149
149
  }, [
150
150
  createTextVNode(toDisplayString(item.title) + " ", 1),
151
151
  renderSlot(_ctx.$slots, "icon"),
152
+ createTextVNode(),
152
153
  !_ctx.$slots.icon && item.sorter ? (openBlock(), createBlock(_component_nut_icon, {
153
154
  key: 0,
154
155
  name: "down-arrow",
@@ -158,6 +159,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
158
159
  }), 128))
159
160
  ])
160
161
  ]),
162
+ createTextVNode(),
161
163
  createElementVNode("view", _hoisted_4, [
162
164
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.curData, (item) => {
163
165
  return openBlock(), createElementBlock("view", {
@@ -181,21 +183,24 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
181
183
  }), 128))
182
184
  ])
183
185
  ], 2),
184
- !_ctx.curData.length ? (openBlock(), createElementBlock("view", _hoisted_6, [
186
+ createTextVNode(),
187
+ _ctx.summary ? (openBlock(), createElementBlock("view", _hoisted_6, [
188
+ createElementVNode("span", {
189
+ class: "nut-table__summary__text",
190
+ innerHTML: _ctx.summary().value
191
+ }, null, 8, _hoisted_7)
192
+ ])) : createCommentVNode("", true),
193
+ createTextVNode(),
194
+ !_ctx.curData.length ? (openBlock(), createElementBlock("view", _hoisted_8, [
185
195
  createElementVNode("div", {
186
196
  class: normalizeClass(["nut-table__nodata", { "nut-table__nodata--border": _ctx.bordered }])
187
197
  }, [
188
198
  renderSlot(_ctx.$slots, "nodata"),
189
- !_ctx.$slots.nodata ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString(_ctx.translate("noData")), 1)) : createCommentVNode("", true)
199
+ createTextVNode(),
200
+ !_ctx.$slots.nodata ? (openBlock(), createElementBlock("div", _hoisted_9, toDisplayString(_ctx.translate("noData")), 1)) : createCommentVNode("", true)
190
201
  ], 2)
191
- ])) : createCommentVNode("", true),
192
- _ctx.summary ? (openBlock(), createElementBlock("view", _hoisted_8, [
193
- createElementVNode("span", {
194
- class: "nut-table__summary__text",
195
- innerHTML: _ctx.summary().value
196
- }, null, 8, _hoisted_9)
197
202
  ])) : createCommentVNode("", true)
198
203
  ], 2);
199
204
  }
200
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
201
- export { index as default };
205
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
206
+ export { index_taro as default };
@@ -1,14 +1,42 @@
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
6
  import { T as TypeOfFun, c as createComponent } from "./component.js";
7
7
  import { p as pxCheck } from "./pxCheck.js";
8
- import { u as useRect } from "./index2.js";
9
- import { ref, provide, computed, watch, onMounted, onActivated, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode, createVNode, toDisplayString } from "vue";
8
+ import { unref, ref, provide, computed, watch, onMounted, onActivated, resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode, createTextVNode, createVNode, toDisplayString } from "vue";
10
9
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
11
10
  import "../locale/lang";
11
+ function isWindow(val) {
12
+ return val === window;
13
+ }
14
+ const useRect = (elementRef) => {
15
+ const element = unref(elementRef);
16
+ if (isWindow(element)) {
17
+ const width = element.innerWidth;
18
+ const height = element.innerHeight;
19
+ return {
20
+ top: 0,
21
+ left: 0,
22
+ right: width,
23
+ bottom: height,
24
+ width,
25
+ height
26
+ };
27
+ }
28
+ if (element && element.getBoundingClientRect) {
29
+ return element.getBoundingClientRect();
30
+ }
31
+ return {
32
+ top: 0,
33
+ left: 0,
34
+ right: 0,
35
+ bottom: 0,
36
+ width: 0,
37
+ height: 0
38
+ };
39
+ };
12
40
  class Title {
13
41
  constructor() {
14
42
  this.title = "";
@@ -80,7 +108,7 @@ const component = {
80
108
  provide("autoHeight", { autoHeight: computed(() => props.autoHeight) });
81
109
  const titles = ref([]);
82
110
  const renderTitles = (vnodes) => {
83
- vnodes.forEach((vnode, index2) => {
111
+ vnodes.forEach((vnode, index) => {
84
112
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
85
113
  let type = vnode.type;
86
114
  type = type.name || type;
@@ -92,7 +120,7 @@ const component = {
92
120
  let camelPaneKeyType = TypeOfFun((_f = vnode.props) == null ? void 0 : _f["paneKey"]);
93
121
  let camelPaneIndex = camelPaneKeyType == "number" || camelPaneKeyType == "string" ? String((_g = vnode.props) == null ? void 0 : _g["paneKey"]) : null;
94
122
  title.title = (_h = vnode.props) == null ? void 0 : _h.title;
95
- title.paneKey = paneIndex || camelPaneIndex || String(index2);
123
+ title.paneKey = paneIndex || camelPaneIndex || String(index);
96
124
  title.disabled = (_i = vnode.props) == null ? void 0 : _i.disabled;
97
125
  }
98
126
  titles.value.push(title);
@@ -106,13 +134,13 @@ const component = {
106
134
  };
107
135
  const currentIndex = ref(props.modelValue || 0);
108
136
  const findTabsIndex = (value) => {
109
- let index2 = titles.value.findIndex((item) => item.paneKey == value);
137
+ let index = titles.value.findIndex((item) => item.paneKey == value);
110
138
  if (titles.value.length == 0) {
111
139
  console.error("[NutUI] <Tabs> \u5F53\u524D\u672A\u627E\u5230 TabPane \u7EC4\u4EF6\u5143\u7D20 , \u8BF7\u68C0\u67E5 .");
112
- } else if (index2 == -1) {
140
+ } else if (index == -1) {
113
141
  console.error("[NutUI] <Tabs> \u8BF7\u68C0\u67E5 v-model \u503C\u662F\u5426\u4E3A paneKey ,\u5982 paneKey \u672A\u8BBE\u7F6E\uFF0C\u8BF7\u91C7\u7528\u4E0B\u6807\u63A7\u5236 .");
114
142
  } else {
115
- currentIndex.value = index2;
143
+ currentIndex.value = index;
116
144
  }
117
145
  };
118
146
  const init = (vnodes = ((_a) => (_a = slots.default) == null ? void 0 : _a.call(slots))()) => {
@@ -178,12 +206,12 @@ const component = {
178
206
  };
179
207
  });
180
208
  const methods = {
181
- tabChange: (item, index2) => {
209
+ tabChange: (item, index) => {
182
210
  emit("click", item);
183
211
  if (item.disabled) {
184
212
  return;
185
213
  }
186
- currentIndex.value = index2;
214
+ currentIndex.value = index;
187
215
  emit("update:modelValue", item.paneKey);
188
216
  emit("change", item);
189
217
  }
@@ -221,11 +249,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
221
249
  class: normalizeClass(["nut-tabs__titles", { [_ctx.type]: _ctx.type, scrollable: _ctx.titleScroll, [_ctx.size]: _ctx.size }]),
222
250
  style: normalizeStyle(_ctx.tabsNavStyle)
223
251
  }, [
224
- _ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item, index2) => {
252
+ _ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item, index) => {
225
253
  return openBlock(), createElementBlock("view", {
226
254
  class: normalizeClass(["nut-tabs__titles-item", { active: item.paneKey == _ctx.modelValue, disabled: item.disabled }]),
227
255
  style: normalizeStyle(_ctx.titleStyle),
228
- onClick: ($event) => _ctx.tabChange(item, index2),
256
+ onClick: ($event) => _ctx.tabChange(item, index),
229
257
  key: item.paneKey
230
258
  }, [
231
259
  _ctx.type == "line" ? (openBlock(), createElementBlock("view", {
@@ -233,6 +261,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
233
261
  class: "nut-tabs__titles-item__line",
234
262
  style: normalizeStyle(_ctx.tabsActiveStyle)
235
263
  }, null, 4)) : createCommentVNode("", true),
264
+ createTextVNode(),
236
265
  _ctx.type == "smile" ? (openBlock(), createElementBlock("view", {
237
266
  key: 1,
238
267
  class: "nut-tabs__titles-item__smile",
@@ -243,6 +272,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
243
272
  name: "joy-smile"
244
273
  }, null, 8, ["color"])
245
274
  ], 4)) : createCommentVNode("", true),
275
+ createTextVNode(),
246
276
  createElementVNode("view", {
247
277
  class: normalizeClass(["nut-tabs__titles-item__text", { ellipsis: _ctx.ellipsis }])
248
278
  }, toDisplayString(item.title), 3)
@@ -256,11 +286,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
256
286
  class: normalizeClass(["nut-tabs__titles", { [_ctx.type]: _ctx.type, scrollable: _ctx.titleScroll, [_ctx.size]: _ctx.size }]),
257
287
  style: normalizeStyle(_ctx.tabsNavStyle)
258
288
  }, [
259
- _ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item, index2) => {
289
+ _ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item, index) => {
260
290
  return openBlock(), createElementBlock("view", {
261
291
  class: normalizeClass(["nut-tabs__titles-item", { active: item.paneKey == _ctx.modelValue, disabled: item.disabled }]),
262
292
  style: normalizeStyle(_ctx.titleStyle),
263
- onClick: ($event) => _ctx.tabChange(item, index2),
293
+ onClick: ($event) => _ctx.tabChange(item, index),
264
294
  key: item.paneKey
265
295
  }, [
266
296
  _ctx.type == "line" ? (openBlock(), createElementBlock("view", {
@@ -268,6 +298,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
268
298
  class: "nut-tabs__titles-item__line",
269
299
  style: normalizeStyle(_ctx.tabsActiveStyle)
270
300
  }, null, 4)) : createCommentVNode("", true),
301
+ createTextVNode(),
271
302
  _ctx.type == "smile" ? (openBlock(), createElementBlock("view", {
272
303
  key: 1,
273
304
  class: "nut-tabs__titles-item__smile",
@@ -278,12 +309,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
278
309
  name: "joy-smile"
279
310
  }, null, 8, ["color"])
280
311
  ], 4)) : createCommentVNode("", true),
312
+ createTextVNode(),
281
313
  createElementVNode("view", {
282
314
  class: normalizeClass(["nut-tabs__titles-item__text", { ellipsis: _ctx.ellipsis }])
283
315
  }, toDisplayString(item.title), 3)
284
316
  ], 14, _hoisted_2);
285
317
  }), 128))
286
318
  ], 6)),
319
+ createTextVNode(),
287
320
  createElementVNode("view", {
288
321
  class: "nut-tabs__content",
289
322
  style: normalizeStyle(_ctx.contentStyle)
@@ -294,5 +327,5 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
294
327
  }
295
328
  const { create } = createComponent("tabs");
296
329
  const _sfc_main = create(component);
297
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", render]]);
298
- export { index as default };
330
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", render]]);
331
+ 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 { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createBlock, createCommentVNode } from "vue";
6
+ import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createTextVNode, createBlock, createCommentVNode } 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";
@@ -84,14 +84,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
84
84
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
85
85
  }, [
86
86
  renderSlot(_ctx.$slots, "default"),
87
+ createTextVNode(),
87
88
  _ctx.closeable ? (openBlock(), createBlock(_component_nut_icon, {
88
89
  key: 0,
89
90
  class: "nut-tag--close",
90
91
  name: "close",
91
- size: "12",
92
+ size: "11",
92
93
  onClick: _ctx.onClose
93
94
  }, null, 8, ["onClick"])) : createCommentVNode("", true)
94
95
  ], 6);
95
96
  }
96
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
97
- export { index as default };
97
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
98
+ export { index_taro as default };
@@ -1,10 +1,11 @@
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 { ref, computed, onMounted, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, toDisplayString, createCommentVNode } from "vue";
6
+ import { computed, ref, watch, onMounted, nextTick, openBlock, createElementBlock, normalizeClass, toDisplayString, normalizeStyle, createTextVNode, createCommentVNode } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
+ import Taro from "@tarojs/taro";
8
9
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
9
10
  import "../locale/lang";
10
11
  const { componentName, create, translate } = createComponent("textarea");
@@ -28,7 +29,7 @@ const _sfc_main = create({
28
29
  },
29
30
  rows: {
30
31
  type: [String, Number],
31
- default: "2"
32
+ default: ""
32
33
  },
33
34
  placeholder: {
34
35
  type: String,
@@ -53,7 +54,6 @@ const _sfc_main = create({
53
54
  },
54
55
  emits: ["update:modelValue", "change", "blur", "focus"],
55
56
  setup(props, { emit }) {
56
- const textareaRef = ref();
57
57
  const classes = computed(() => {
58
58
  const prefixCls = componentName;
59
59
  return {
@@ -61,44 +61,16 @@ const _sfc_main = create({
61
61
  [`${prefixCls}--disabled`]: props.disabled
62
62
  };
63
63
  });
64
- onMounted(() => {
65
- if (props.modelValue) {
66
- emitChange(String(props.modelValue));
67
- }
68
- if (props.autosize) {
69
- nextTick(getContentHeight);
70
- }
71
- });
72
64
  const styles = computed(() => {
73
65
  return {
74
- textAlign: props.textAlign
66
+ textAlign: props.textAlign,
67
+ height: props.autosize ? heightSet.value : "null"
75
68
  };
76
69
  });
77
- const getContentHeight = () => {
78
- let textarea = textareaRef.value;
79
- textarea.style.height = "auto";
80
- let height = textarea.scrollHeight;
81
- if (typeof props.autosize === "object") {
82
- const { maxHeight, minHeight } = props.autosize;
83
- if (maxHeight !== void 0) {
84
- height = Math.min(height, maxHeight);
85
- }
86
- if (minHeight !== void 0) {
87
- height = Math.max(height, minHeight);
88
- }
89
- }
90
- if (height) {
91
- textarea.style.height = height + "px";
92
- }
93
- };
94
- watch(
95
- () => props.modelValue,
96
- () => {
97
- if (props.autosize) {
98
- nextTick(getContentHeight);
99
- }
100
- }
101
- );
70
+ const copyTxtStyle = ref({
71
+ "word-break": "break-all",
72
+ width: "0"
73
+ });
102
74
  const emitChange = (value, event) => {
103
75
  if (props.maxLength && value.length > Number(props.maxLength)) {
104
76
  value = value.substring(0, Number(props.maxLength));
@@ -125,31 +97,116 @@ const _sfc_main = create({
125
97
  const input = event.target;
126
98
  let value = input.value;
127
99
  emitChange(value, event);
128
- emit("blur", { value, event });
100
+ emit("blur", event);
101
+ };
102
+ const textareaRef = ref(null);
103
+ const textareaHeight = ref();
104
+ const heightSet = ref("auto");
105
+ const getContentHeight = () => {
106
+ heightSet.value = "auto";
107
+ let height = textareaHeight.value;
108
+ if (typeof props.autosize === "object") {
109
+ const { maxHeight, minHeight } = props.autosize;
110
+ if (maxHeight !== void 0) {
111
+ height = Math.min(height, maxHeight);
112
+ }
113
+ if (minHeight !== void 0) {
114
+ height = Math.max(height, minHeight);
115
+ }
116
+ }
117
+ if (height) {
118
+ heightSet.value = height + "px";
119
+ }
120
+ };
121
+ watch(
122
+ () => props.modelValue,
123
+ () => {
124
+ if (props.autosize) {
125
+ copyHeight();
126
+ }
127
+ }
128
+ );
129
+ const copyHeight = () => {
130
+ const query = Taro.createSelectorQuery();
131
+ query.select(".cpoyText").boundingClientRect();
132
+ query.exec((res) => {
133
+ if (res[0]) {
134
+ if (props.modelValue == "") {
135
+ textareaHeight.value = 20;
136
+ } else {
137
+ textareaHeight.value = res[0]["height"] || 20;
138
+ }
139
+ setTimeout(() => {
140
+ getContentHeight();
141
+ }, 400);
142
+ }
143
+ });
144
+ };
145
+ const getRefHeight = () => {
146
+ const query = Taro.createSelectorQuery();
147
+ query.selectAll(".nut-textarea__textarea").boundingClientRect();
148
+ let uid = textareaRef.value ? textareaRef.value.uid : "0";
149
+ query.exec((res) => {
150
+ if (res[0] && textareaRef.value) {
151
+ let _item = Array.from(res[0]).filter((item) => item.id == uid);
152
+ textareaHeight.value = _item[0]["height"] || 20;
153
+ copyTxtStyle.value.width = _item[0]["width"] + "px";
154
+ nextTick(getContentHeight);
155
+ }
156
+ });
129
157
  };
158
+ const getRefWidth = () => {
159
+ const query = Taro.createSelectorQuery();
160
+ query.select(".nut-textarea__textarea").boundingClientRect();
161
+ query.exec((res) => {
162
+ if (res[0] && textareaRef.value) {
163
+ copyTxtStyle.value.width = res[0]["width"] + "px";
164
+ }
165
+ });
166
+ };
167
+ const env = Taro.getEnv();
168
+ onMounted(() => {
169
+ if (props.autosize) {
170
+ Taro.nextTick(() => {
171
+ if (Taro.getEnv() === "ALIPAY") {
172
+ getRefWidth();
173
+ copyHeight();
174
+ } else {
175
+ getRefHeight();
176
+ }
177
+ });
178
+ }
179
+ });
130
180
  return {
181
+ env,
131
182
  textareaRef,
132
183
  classes,
133
184
  styles,
134
185
  change,
135
186
  focus,
136
187
  blur,
137
- translate
188
+ translate,
189
+ copyTxtStyle
138
190
  };
139
191
  }
140
192
  });
141
- const _hoisted_1 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "autofocus"];
142
- const _hoisted_2 = {
193
+ const _hoisted_1 = {
143
194
  key: 0,
195
+ class: "nut-textarea__textarea"
196
+ };
197
+ const _hoisted_2 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "auto-focus"];
198
+ const _hoisted_3 = {
199
+ key: 2,
144
200
  class: "nut-textarea__limit"
145
201
  };
146
202
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
147
203
  return openBlock(), createElementBlock("view", {
148
204
  class: normalizeClass(_ctx.classes)
149
205
  }, [
150
- createElementVNode("textarea", {
206
+ _ctx.readonly ? (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(_ctx.modelValue), 1)) : (openBlock(), createElementBlock("textarea", {
207
+ key: 1,
151
208
  ref: "textareaRef",
152
- class: "nut-textarea__textarea",
209
+ class: normalizeClass(["nut-textarea__textarea", _ctx.env == "ALIPAY" && "nut-textarea__ali"]),
153
210
  style: normalizeStyle(_ctx.styles),
154
211
  rows: _ctx.rows,
155
212
  disabled: _ctx.disabled,
@@ -158,12 +215,20 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
158
215
  onInput: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args)),
159
216
  onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.blur && _ctx.blur(...args)),
160
217
  onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args)),
218
+ "show-count": false,
161
219
  maxlength: _ctx.maxLength,
162
220
  placeholder: _ctx.placeholder || _ctx.translate("placeholder"),
163
- autofocus: _ctx.autofocus
164
- }, null, 44, _hoisted_1),
165
- _ctx.limitShow ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0) + "/" + toDisplayString(_ctx.maxLength), 1)) : createCommentVNode("", true)
221
+ "auto-focus": _ctx.autofocus
222
+ }, null, 46, _hoisted_2)),
223
+ createTextVNode(),
224
+ _ctx.limitShow ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0) + "/" + toDisplayString(_ctx.maxLength), 1)) : createCommentVNode("", true),
225
+ createTextVNode(),
226
+ _ctx.autosize ? (openBlock(), createElementBlock("view", {
227
+ key: 3,
228
+ class: "cpoyText",
229
+ style: normalizeStyle(_ctx.copyTxtStyle)
230
+ }, toDisplayString(_ctx.modelValue), 5)) : createCommentVNode("", true)
166
231
  ], 2);
167
232
  }
168
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
169
- export { index as default };
233
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
234
+ export { index_taro as default };
@@ -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
  */
@@ -26,6 +26,7 @@ const _sfc_main = create({
26
26
  setup: (props, context) => {
27
27
  const currentKey = inject("currentKey");
28
28
  const currentTime = inject("currentTime");
29
+ inject("muti");
29
30
  const state = reactive({
30
31
  currentKey,
31
32
  currentTime
@@ -80,5 +81,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
80
81
  ])
81
82
  ], 2);
82
83
  }
83
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
84
- export { index as default };
84
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
85
+ export { index_taro as default };