@nutui/nutui 3.1.19-beta.0 → 3.1.19-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 (110) hide show
  1. package/dist/nutui.d.ts +38 -37
  2. package/dist/nutui.es.js +13439 -12616
  3. package/dist/nutui.umd.js +13431 -12695
  4. package/dist/packages/_es/ActionSheet.js +12 -18
  5. package/dist/packages/_es/Address.js +78 -69
  6. package/dist/packages/_es/Audio.js +12 -12
  7. package/dist/packages/_es/AudioOperate.js +1 -1
  8. package/dist/packages/_es/Avatar.js +3 -3
  9. package/dist/packages/_es/BackTop.js +68 -110
  10. package/dist/packages/_es/Badge.js +3 -3
  11. package/dist/packages/_es/Barrage.js +62 -55
  12. package/dist/packages/_es/Button.js +2 -2
  13. package/dist/packages/_es/Calendar.js +28 -23
  14. package/dist/packages/_es/CalendarItem.js +3 -3
  15. package/dist/packages/_es/Card.js +6 -5
  16. package/dist/packages/_es/Cascader.js +7 -7
  17. package/dist/packages/_es/Cell.js +4 -11
  18. package/dist/packages/_es/CellGroup.js +1 -1
  19. package/dist/packages/_es/Checkbox.js +1 -1
  20. package/dist/packages/_es/CheckboxGroup.js +1 -1
  21. package/dist/packages/_es/CircleProgress.js +149 -40
  22. package/dist/packages/_es/Col.js +1 -1
  23. package/dist/packages/_es/Collapse.js +34 -8
  24. package/dist/packages/_es/CollapseItem.js +90 -59
  25. package/dist/packages/_es/CountDown.js +5 -5
  26. package/dist/packages/_es/CountUp.js +43 -51
  27. package/dist/packages/_es/DatePicker.js +21 -20
  28. package/dist/packages/_es/Dialog.js +8 -86
  29. package/dist/packages/_es/Divider.js +4 -4
  30. package/dist/packages/_es/Drag.js +92 -54
  31. package/dist/packages/_es/Elevator.js +74 -49
  32. package/dist/packages/_es/Empty.js +3 -3
  33. package/dist/packages/_es/FixedNav.js +5 -5
  34. package/dist/packages/_es/Form.js +4 -4
  35. package/dist/packages/_es/FormItem.js +1 -1
  36. package/dist/packages/_es/Grid.js +1 -1
  37. package/dist/packages/_es/GridItem.js +8 -26
  38. package/dist/packages/_es/Icon.js +1 -1
  39. package/dist/packages/_es/ImagePreview.js +15 -84
  40. package/dist/packages/_es/Indicator.js +3 -3
  41. package/dist/packages/_es/InfiniteLoading.js +93 -107
  42. package/dist/packages/_es/Input.js +8 -8
  43. package/dist/packages/_es/InputNumber.js +23 -16
  44. package/dist/packages/_es/Layout.js +1 -1
  45. package/dist/packages/_es/List.js +41 -34
  46. package/dist/packages/_es/Menu.js +15 -12
  47. package/dist/packages/_es/MenuItem.js +9 -9
  48. package/dist/packages/_es/Navbar.js +3 -4
  49. package/dist/packages/_es/NoticeBar.js +47 -40
  50. package/dist/packages/_es/Notify.js +29 -168
  51. package/dist/packages/_es/NumberKeyboard.js +5 -10
  52. package/dist/packages/_es/OldPicker.js +122 -120
  53. package/dist/packages/_es/OverLay.js +5 -25
  54. package/dist/packages/_es/Pagination.js +7 -7
  55. package/dist/packages/_es/Picker.js +39 -16
  56. package/dist/packages/_es/Popover.js +155 -30
  57. package/dist/packages/_es/Popup.js +8 -71
  58. package/dist/packages/_es/Price.js +17 -5
  59. package/dist/packages/_es/Progress.js +18 -8
  60. package/dist/packages/_es/PullRefresh.js +1 -1
  61. package/dist/packages/_es/Radio.js +2 -2
  62. package/dist/packages/_es/RadioGroup.js +1 -1
  63. package/dist/packages/_es/Range.js +46 -33
  64. package/dist/packages/_es/Rate.js +16 -19
  65. package/dist/packages/_es/Row.js +1 -1
  66. package/dist/packages/_es/SearchBar.js +8 -6
  67. package/dist/packages/_es/ShortPassword.js +89 -67
  68. package/dist/packages/_es/SideNavBar.js +5 -16
  69. package/dist/packages/_es/SideNavBarItem.js +1 -1
  70. package/dist/packages/_es/Signature.js +69 -88
  71. package/dist/packages/_es/Skeleton.js +8 -11
  72. package/dist/packages/_es/Sku.js +47 -56
  73. package/dist/packages/_es/Step.js +1 -1
  74. package/dist/packages/_es/Steps.js +1 -1
  75. package/dist/packages/_es/Sticky.js +28 -23
  76. package/dist/packages/_es/SubSideNavBar.js +1 -1
  77. package/dist/packages/_es/Swipe.js +39 -26
  78. package/dist/packages/_es/Swiper.js +31 -13
  79. package/dist/packages/_es/SwiperItem.js +1 -1
  80. package/dist/packages/_es/Switch.js +3 -3
  81. package/dist/packages/_es/TabPane.js +1 -1
  82. package/dist/packages/_es/Tabbar.js +3 -3
  83. package/dist/packages/_es/TabbarItem.js +17 -23
  84. package/dist/packages/_es/Table.js +13 -13
  85. package/dist/packages/_es/Tabs.js +21 -20
  86. package/dist/packages/_es/Tag.js +4 -4
  87. package/dist/packages/_es/TextArea.js +44 -42
  88. package/dist/packages/_es/TimeDetail.js +4 -3
  89. package/dist/packages/_es/TimePannel.js +3 -3
  90. package/dist/packages/_es/TimeSelect.js +8 -7
  91. package/dist/packages/_es/Toast.js +41 -170
  92. package/dist/packages/_es/Uploader.js +109 -138
  93. package/dist/packages/_es/Video.js +3 -3
  94. package/dist/packages/_es/common.js +1 -1
  95. package/dist/packages/_es/component.js +1 -1
  96. package/dist/packages/_es/index.js +44 -6
  97. package/dist/packages/_es/{index5.js → index.taro.js} +127 -95
  98. package/dist/packages/_es/index2.js +1 -1
  99. package/dist/packages/_es/index3.js +56 -28
  100. package/dist/packages/_es/index4.js +413 -56
  101. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  102. package/dist/packages/_es/pxCheck.js +1 -1
  103. package/dist/packages/_es/use-lock-scroll.js +23 -0
  104. package/dist/packages/_es/util.js +1 -1
  105. package/dist/packages/uploader/index.scss +2 -2
  106. package/dist/style.css +1 -1
  107. package/dist/styles/themes/default.scss +61 -61
  108. package/dist/styles/themes/jdt.scss +61 -61
  109. package/package.json +1 -1
  110. package/dist/packages/_es/raf.js +0 -19
@@ -1,11 +1,10 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 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 } from "vue";
7
+ import { inject, reactive, getCurrentInstance, computed, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, toDisplayString, createCommentVNode, createVNode, renderSlot } from "vue";
9
8
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
10
9
  const { create } = createComponent("tabbar-item");
11
10
  const _sfc_main = create({
@@ -34,14 +33,14 @@ const _sfc_main = create({
34
33
  type: String,
35
34
  default: ""
36
35
  },
37
- classPrefix: {
38
- type: String,
39
- default: "nut-icon"
40
- },
41
36
  dot: {
42
37
  type: Boolean,
43
38
  default: false
44
39
  },
40
+ classPrefix: {
41
+ type: String,
42
+ default: "nut-icon"
43
+ },
45
44
  fontClassName: {
46
45
  type: String,
47
46
  default: "nutui-iconfont"
@@ -57,17 +56,16 @@ const _sfc_main = create({
57
56
  active: parent.modelValue,
58
57
  index: 0
59
58
  });
60
- const router = useRouter();
61
59
  const relation = (child) => {
62
60
  if (child.proxy) {
63
- let index2 = parent.children.length;
64
- state.index = index2;
61
+ let index = parent.children.length;
62
+ state.index = index;
65
63
  parent.children.push(child.proxy);
66
64
  }
67
65
  };
68
66
  relation(getCurrentInstance());
69
- function change(index2) {
70
- parent.changeIndex(index2);
67
+ function change(index) {
68
+ parent.changeIndex(index);
71
69
  }
72
70
  const choosed = computed(() => {
73
71
  if (parent) {
@@ -81,14 +79,6 @@ const _sfc_main = create({
81
79
  if (parent.children[value].href) {
82
80
  window.location.href = parent.children[value].href;
83
81
  }
84
- if (parent.children[value].to) {
85
- let to = parent.children[value].to;
86
- if (to && router) {
87
- router.push(to);
88
- } else {
89
- location.replace(to);
90
- }
91
- }
92
82
  });
93
83
  });
94
84
  return {
@@ -111,6 +101,7 @@ const _hoisted_4 = {
111
101
  class: "nut-tabbar-item_icon-box_dot"
112
102
  };
113
103
  const _hoisted_5 = { key: 2 };
104
+ const _hoisted_6 = { key: 0 };
114
105
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
115
106
  const _component_nut_icon = resolveComponent("nut-icon");
116
107
  return openBlock(), createElementBlock("div", {
@@ -145,9 +136,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
145
136
  }, null, 4)) : createCommentVNode("", true),
146
137
  createElementVNode("view", {
147
138
  class: normalizeClass(["nut-tabbar-item_icon-box_nav-word", { "nut-tabbar-item_icon-box_big-word": !_ctx.icon && !_ctx.activeImg }])
148
- }, toDisplayString(_ctx.tabTitle), 3)
139
+ }, [
140
+ _ctx.tabTitle ? (openBlock(), createElementBlock("view", _hoisted_6, toDisplayString(_ctx.tabTitle), 1)) : createCommentVNode("", true),
141
+ !_ctx.tabTitle ? renderSlot(_ctx.$slots, "default", { key: 1 }) : createCommentVNode("", true)
142
+ ], 2)
149
143
  ])
150
144
  ], 6);
151
145
  }
152
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
153
- export { index as default };
146
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
147
+ export { index_taro as default };
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
22
22
  * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -114,16 +114,17 @@ const _hoisted_1 = { class: "nut-table__main__head" };
114
114
  const _hoisted_2 = { class: "nut-table__main__head__tr" };
115
115
  const _hoisted_3 = ["onClick"];
116
116
  const _hoisted_4 = { class: "nut-table__main__body" };
117
- const _hoisted_5 = {
117
+ const _hoisted_5 = { key: 1 };
118
+ const _hoisted_6 = {
118
119
  key: 0,
119
120
  class: "nut-table__summary"
120
121
  };
121
- const _hoisted_6 = ["innerHTML"];
122
- const _hoisted_7 = {
122
+ const _hoisted_7 = ["innerHTML"];
123
+ const _hoisted_8 = {
123
124
  key: 1,
124
125
  class: "nut-table__nodata"
125
126
  };
126
- const _hoisted_8 = {
127
+ const _hoisted_9 = {
127
128
  key: 0,
128
129
  class: "nut-table__nodata__text"
129
130
  };
@@ -166,32 +167,31 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
166
167
  class: normalizeClass(["nut-table__main__body__tr__td", _ctx.cellClasses(_ctx.getColumnItem(value))]),
167
168
  key: value
168
169
  }, [
169
- createTextVNode(toDisplayString(typeof item[value] !== "function" ? item[value] : "") + " ", 1),
170
170
  typeof item[value] === "function" ? (openBlock(), createBlock(_component_RenderColumn, {
171
171
  key: 0,
172
172
  slots: item[value]
173
- }, null, 8, ["slots"])) : createCommentVNode("", true)
173
+ }, null, 8, ["slots"])) : (openBlock(), createElementBlock("view", _hoisted_5, toDisplayString(item[value]), 1))
174
174
  ], 2);
175
175
  }), 128))
176
176
  ]);
177
177
  }), 128))
178
178
  ])
179
179
  ], 2),
180
- _ctx.summary ? (openBlock(), createElementBlock("view", _hoisted_5, [
180
+ _ctx.summary ? (openBlock(), createElementBlock("view", _hoisted_6, [
181
181
  createElementVNode("span", {
182
182
  class: "nut-table__summary__text",
183
183
  innerHTML: _ctx.summary().value
184
- }, null, 8, _hoisted_6)
184
+ }, null, 8, _hoisted_7)
185
185
  ])) : createCommentVNode("", true),
186
- !_ctx.curData.length ? (openBlock(), createElementBlock("view", _hoisted_7, [
186
+ !_ctx.curData.length ? (openBlock(), createElementBlock("view", _hoisted_8, [
187
187
  createElementVNode("div", {
188
188
  class: normalizeClass(["nut-table__nodata", { "nut-table__nodata--border": _ctx.bordered }])
189
189
  }, [
190
190
  renderSlot(_ctx.$slots, "nodata"),
191
- !_ctx.$slots.nodata ? (openBlock(), createElementBlock("div", _hoisted_8, " \u6682\u65E0\u6570\u636E ")) : createCommentVNode("", true)
191
+ !_ctx.$slots.nodata ? (openBlock(), createElementBlock("div", _hoisted_9, " \u6682\u65E0\u6570\u636E ")) : createCommentVNode("", true)
192
192
  ], 2)
193
193
  ])) : createCommentVNode("", true)
194
194
  ], 2);
195
195
  }
196
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
197
- export { index as default };
196
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
197
+ export { index_taro as default };
@@ -19,7 +19,7 @@ var __publicField = (obj, key, value) => {
19
19
  return value;
20
20
  };
21
21
  /*!
22
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
22
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
23
23
  * (c) 2022 @jdf2e.
24
24
  * Released under the MIT License.
25
25
  */
@@ -58,6 +58,10 @@ const _sfc_main = create({
58
58
  type: String,
59
59
  default: "line"
60
60
  },
61
+ lineWidth: {
62
+ type: [String, Number],
63
+ default: ""
64
+ },
61
65
  titleScroll: {
62
66
  type: Boolean,
63
67
  default: false
@@ -86,7 +90,7 @@ const _sfc_main = create({
86
90
  const titles = ref([]);
87
91
  const currentIndex = ref(props.modelValue || 0);
88
92
  const renderTitles = (vnodes) => {
89
- vnodes.forEach((vnode, index2) => {
93
+ vnodes.forEach((vnode, index) => {
90
94
  var _a, _b, _c, _d, _e;
91
95
  let type = vnode.type;
92
96
  type = type.name || type;
@@ -94,7 +98,7 @@ const _sfc_main = create({
94
98
  let title = new Title();
95
99
  if (((_a = vnode.props) == null ? void 0 : _a.title) || ((_b = vnode.props) == null ? void 0 : _b["pane-key"])) {
96
100
  title.title = (_c = vnode.props) == null ? void 0 : _c.title;
97
- title.paneKey = ((_d = vnode.props) == null ? void 0 : _d["pane-key"]) || index2;
101
+ title.paneKey = ((_d = vnode.props) == null ? void 0 : _d["pane-key"]) || index;
98
102
  title.disabled = (_e = vnode.props) == null ? void 0 : _e.disabled;
99
103
  }
100
104
  titles.value.push(title);
@@ -103,24 +107,21 @@ const _sfc_main = create({
103
107
  }
104
108
  });
105
109
  };
106
- const init = (vnodes = ((_a) => (_a = slots.default) == null ? void 0 : _a.call(slots))()) => {
110
+ const init = (vnodes = slots.default()) => {
107
111
  titles.value = [];
108
- if (vnodes && vnodes.length) {
112
+ if (vnodes.length) {
109
113
  renderTitles(vnodes);
110
114
  }
111
115
  };
112
- watch(() => {
113
- var _a;
114
- return (_a = slots.default) == null ? void 0 : _a.call(slots);
115
- }, (vnodes) => {
116
+ watch(() => slots.default(), (vnodes) => {
116
117
  init(vnodes);
117
118
  });
118
119
  watch(() => props.modelValue, (value) => {
119
- let index2 = titles.value.findIndex((item) => item.paneKey == value);
120
- if (index2 == -1) {
120
+ let index = titles.value.findIndex((item) => item.paneKey == value);
121
+ if (index == -1) {
121
122
  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 .");
122
123
  } else {
123
- currentIndex.value = index2;
124
+ currentIndex.value = index;
124
125
  }
125
126
  });
126
127
  onMounted(init);
@@ -149,12 +150,12 @@ const _sfc_main = create({
149
150
  };
150
151
  });
151
152
  const methods = {
152
- tabChange: (item, index2) => {
153
+ tabChange: (item, index) => {
153
154
  emit("click", item);
154
155
  if (item.disabled) {
155
156
  return;
156
157
  }
157
- currentIndex.value = index2;
158
+ currentIndex.value = index;
158
159
  emit("update:modelValue", item.paneKey);
159
160
  emit("change", item);
160
161
  }
@@ -163,8 +164,8 @@ const _sfc_main = create({
163
164
  titles,
164
165
  contentStyle,
165
166
  tabsNavStyle,
166
- tabsActiveStyle,
167
- titleStyle
167
+ titleStyle,
168
+ tabsActiveStyle
168
169
  }, methods);
169
170
  }
170
171
  });
@@ -178,11 +179,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
178
179
  class: normalizeClass(["nut-tabs__titles", { [_ctx.type]: _ctx.type, scrollable: _ctx.titleScroll, [_ctx.size]: _ctx.size }]),
179
180
  style: normalizeStyle(_ctx.tabsNavStyle)
180
181
  }, [
181
- _ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item, index2) => {
182
+ _ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item, index) => {
182
183
  return openBlock(), createElementBlock("view", {
183
184
  class: normalizeClass(["nut-tabs__titles-item", { active: item.paneKey == _ctx.modelValue, disabled: item.disabled }]),
184
185
  style: normalizeStyle(_ctx.titleStyle),
185
- onClick: ($event) => _ctx.tabChange(item, index2),
186
+ onClick: ($event) => _ctx.tabChange(item, index),
186
187
  key: item.paneKey
187
188
  }, [
188
189
  _ctx.type == "line" ? (openBlock(), createElementBlock("view", {
@@ -214,5 +215,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
214
215
  ], 4)
215
216
  ], 2);
216
217
  }
217
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
218
- export { index as default };
218
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
219
+ export { index_taro as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -92,10 +92,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
92
92
  key: 0,
93
93
  class: "nut-tag--close",
94
94
  name: "close",
95
- size: "12",
95
+ size: "11",
96
96
  onClick: _ctx.onClose
97
97
  }, null, 8, ["onClick"])) : createCommentVNode("", true)
98
98
  ], 6);
99
99
  }
100
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
101
- export { index as default };
100
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
101
+ export { index_taro as default };
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 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, nextTick, onMounted, openBlock, createElementBlock, normalizeClass, toDisplayString, normalizeStyle, 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
  const { componentName, create } = createComponent("textarea");
@@ -52,7 +52,6 @@ const _sfc_main = create({
52
52
  },
53
53
  emits: ["update:modelValue", "change", "blur", "focus"],
54
54
  setup(props, { emit }) {
55
- const textareaRef = ref();
56
55
  const classes = computed(() => {
57
56
  const prefixCls = componentName;
58
57
  return {
@@ -60,41 +59,11 @@ const _sfc_main = create({
60
59
  [`${prefixCls}--disabled`]: props.disabled
61
60
  };
62
61
  });
63
- onMounted(() => {
64
- if (props.modelValue) {
65
- emitChange(String(props.modelValue));
66
- }
67
- if (props.autosize) {
68
- nextTick(getContentHeight);
69
- }
70
- });
71
62
  const styles = computed(() => {
72
63
  return {
73
64
  textAlign: props.textAlign
74
65
  };
75
66
  });
76
- const getContentHeight = () => {
77
- let textarea = textareaRef.value;
78
- textarea.style.height = "auto";
79
- let height = textarea.scrollHeight;
80
- if (typeof props.autosize === "object") {
81
- const { maxHeight, minHeight } = props.autosize;
82
- if (maxHeight !== void 0) {
83
- height = Math.min(height, maxHeight);
84
- }
85
- if (minHeight !== void 0) {
86
- height = Math.max(height, minHeight);
87
- }
88
- }
89
- if (height) {
90
- textarea.style.height = height + "px";
91
- }
92
- };
93
- watch(() => props.modelValue, () => {
94
- if (props.autosize) {
95
- nextTick(getContentHeight);
96
- }
97
- });
98
67
  const emitChange = (value, event) => {
99
68
  if (props.maxLength && value.length > Number(props.maxLength)) {
100
69
  value = value.substring(0, Number(props.maxLength));
@@ -121,8 +90,36 @@ const _sfc_main = create({
121
90
  const input = event.target;
122
91
  let value = input.value;
123
92
  emitChange(value, event);
124
- emit("blur", { value, event });
93
+ emit("blur", event);
125
94
  };
95
+ const textareaRef = ref();
96
+ const getContentHeight = () => {
97
+ let textarea = textareaRef.value;
98
+ textarea.style.height = "auto";
99
+ let height = textarea.scrollHeight;
100
+ if (typeof props.autosize === "object") {
101
+ const { maxHeight, minHeight } = props.autosize;
102
+ if (maxHeight !== void 0) {
103
+ height = Math.min(height, maxHeight);
104
+ }
105
+ if (minHeight !== void 0) {
106
+ height = Math.max(height, minHeight);
107
+ }
108
+ }
109
+ if (height) {
110
+ textarea.style.height = height + "px";
111
+ }
112
+ };
113
+ watch(() => props.modelValue, () => {
114
+ if (props.autosize) {
115
+ nextTick(getContentHeight);
116
+ }
117
+ });
118
+ onMounted(() => {
119
+ if (props.autosize) {
120
+ nextTick(getContentHeight);
121
+ }
122
+ });
126
123
  return {
127
124
  textareaRef,
128
125
  classes,
@@ -133,16 +130,21 @@ const _sfc_main = create({
133
130
  };
134
131
  }
135
132
  });
136
- const _hoisted_1 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "autofocus"];
137
- const _hoisted_2 = {
133
+ const _hoisted_1 = {
138
134
  key: 0,
135
+ class: "nut-textarea__textarea"
136
+ };
137
+ const _hoisted_2 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "auto-focus"];
138
+ const _hoisted_3 = {
139
+ key: 2,
139
140
  class: "nut-textarea__limit"
140
141
  };
141
142
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
142
143
  return openBlock(), createElementBlock("view", {
143
144
  class: normalizeClass(_ctx.classes)
144
145
  }, [
145
- createElementVNode("textarea", {
146
+ _ctx.readonly ? (openBlock(), createElementBlock("view", _hoisted_1, toDisplayString(_ctx.modelValue), 1)) : (openBlock(), createElementBlock("textarea", {
147
+ key: 1,
146
148
  ref: "textareaRef",
147
149
  class: "nut-textarea__textarea",
148
150
  style: normalizeStyle(_ctx.styles),
@@ -155,10 +157,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
155
157
  onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.focus && _ctx.focus(...args)),
156
158
  maxlength: _ctx.maxLength,
157
159
  placeholder: _ctx.placeholder,
158
- autofocus: _ctx.autofocus
159
- }, null, 44, _hoisted_1),
160
- _ctx.limitShow ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0) + "/" + toDisplayString(_ctx.maxLength), 1)) : createCommentVNode("", true)
160
+ "auto-focus": _ctx.autofocus
161
+ }, null, 44, _hoisted_2)),
162
+ _ctx.limitShow ? (openBlock(), createElementBlock("view", _hoisted_3, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0) + "/" + toDisplayString(_ctx.maxLength), 1)) : createCommentVNode("", true)
161
163
  ], 2);
162
164
  }
163
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
164
- export { index as default };
165
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
166
+ export { index_taro as default };
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
22
22
  * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -44,6 +44,7 @@ const _sfc_main = create({
44
44
  setup: (props, context) => {
45
45
  const currentKey = inject("currentKey");
46
46
  const currentTime = inject("currentTime");
47
+ inject("muti");
47
48
  const state = reactive({
48
49
  currentKey,
49
50
  currentTime
@@ -98,5 +99,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
98
99
  ])
99
100
  ], 2);
100
101
  }
101
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
102
- export { index as default };
102
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
103
+ export { index_taro as default };
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
22
22
  * (c) 2022 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -66,5 +66,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
66
66
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handlePannel(_ctx.pannelKey))
67
67
  }, toDisplayString(_ctx.name), 3);
68
68
  }
69
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
70
- export { index as default };
69
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
70
+ export { index_taro as default };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.19-beta.0 Mon Mar 28 2022 17:50:21 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.19-beta.1 Sat Apr 02 2022 16:26:37 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -31,8 +31,8 @@ const _sfc_main = create({
31
31
  return [];
32
32
  }
33
33
  },
34
- isWrapTeleport: {
35
- type: Boolean,
34
+ muti: {
35
+ type: [Boolean],
36
36
  default: false
37
37
  }
38
38
  },
@@ -52,12 +52,14 @@ const _sfc_main = create({
52
52
  });
53
53
  const currentKey = computed(() => props.currentKey);
54
54
  const currentTime = computed(() => props.currentTime);
55
+ const muti = computed(() => props.muti);
55
56
  const close = () => {
56
57
  context.emit("update:visible", false);
57
58
  context.emit("select", currentTime.value);
58
59
  };
59
60
  provide("currentKey", currentKey);
60
61
  provide("currentTime", currentTime);
62
+ provide("muti", muti);
61
63
  return {
62
64
  classes,
63
65
  popStyle,
@@ -76,7 +78,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
76
78
  position: "bottom",
77
79
  closeable: "",
78
80
  round: "",
79
- isWrapTeleport: _ctx.isWrapTeleport,
80
81
  visible: _ctx.visible,
81
82
  style: normalizeStyle(_ctx.popStyle),
82
83
  onClickOverlay: _ctx.close,
@@ -100,7 +101,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
100
101
  ], 2)
101
102
  ]),
102
103
  _: 3
103
- }, 8, ["isWrapTeleport", "visible", "style", "onClickOverlay", "onClickCloseIcon"]);
104
+ }, 8, ["visible", "style", "onClickOverlay", "onClickCloseIcon"]);
104
105
  }
105
- var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
106
- export { index as default };
106
+ var index_taro = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
107
+ export { index_taro as default };