@nutui/nutui 3.2.6 → 3.2.8-beta.0

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 (239) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +11 -1
  3. package/dist/nutui.es.js +2685 -4599
  4. package/dist/nutui.umd.js +2684 -4600
  5. package/dist/packages/_es/ActionSheet.js +2 -5
  6. package/dist/packages/_es/Address.js +162 -250
  7. package/dist/packages/_es/AddressList.js +229 -307
  8. package/dist/packages/_es/Animate.js +1 -1
  9. package/dist/packages/_es/Audio.js +1 -1
  10. package/dist/packages/_es/AudioOperate.js +1 -1
  11. package/dist/packages/_es/Avatar.js +1 -1
  12. package/dist/packages/_es/AvatarGroup.js +1 -1
  13. package/dist/packages/_es/BackTop.js +1 -1
  14. package/dist/packages/_es/Badge.js +1 -1
  15. package/dist/packages/_es/Barrage.js +1 -1
  16. package/dist/packages/_es/Button.js +1 -1
  17. package/dist/packages/_es/Calendar.js +11 -4
  18. package/dist/packages/_es/CalendarItem.js +1 -1
  19. package/dist/packages/_es/Card.js +1 -1
  20. package/dist/packages/_es/Cascader.js +2 -5
  21. package/dist/packages/_es/Category.js +1 -1
  22. package/dist/packages/_es/CategoryPane.js +1 -1
  23. package/dist/packages/_es/Cell.js +1 -1
  24. package/dist/packages/_es/CellGroup.js +1 -1
  25. package/dist/packages/_es/Checkbox.js +1 -1
  26. package/dist/packages/_es/CheckboxGroup.js +1 -1
  27. package/dist/packages/_es/CircleProgress.js +2 -2
  28. package/dist/packages/_es/Col.js +1 -1
  29. package/dist/packages/_es/Collapse.js +4 -11
  30. package/dist/packages/_es/CollapseItem.js +12 -12
  31. package/dist/packages/_es/Comment.js +1 -1
  32. package/dist/packages/_es/ConfigProvider.js +1 -1
  33. package/dist/packages/_es/CountDown.js +2 -10
  34. package/dist/packages/_es/CountUp.js +1 -1
  35. package/dist/packages/_es/DatePicker.js +8 -17
  36. package/dist/packages/_es/Dialog.js +38 -63
  37. package/dist/packages/_es/Divider.js +1 -1
  38. package/dist/packages/_es/Drag.js +1 -1
  39. package/dist/packages/_es/Ecard.js +1 -1
  40. package/dist/packages/_es/Elevator.js +9 -3
  41. package/dist/packages/_es/Ellipsis.js +3 -3
  42. package/dist/packages/_es/Empty.js +1 -1
  43. package/dist/packages/_es/FixedNav.js +1 -1
  44. package/dist/packages/_es/Form.js +39 -31
  45. package/dist/packages/_es/FormItem.js +1 -1
  46. package/dist/packages/_es/Grid.js +2 -2
  47. package/dist/packages/_es/GridItem.js +1 -1
  48. package/dist/packages/_es/Icon.js +1 -1
  49. package/dist/packages/_es/Image.js +1 -1
  50. package/dist/packages/_es/ImagePreview.js +131 -214
  51. package/dist/packages/_es/Indicator.js +4 -4
  52. package/dist/packages/_es/InfiniteLoading.js +9 -2
  53. package/dist/packages/_es/Input.js +109 -132
  54. package/dist/packages/_es/InputNumber.js +1 -1
  55. package/dist/packages/_es/Invoice.js +1 -1
  56. package/dist/packages/_es/Layout.js +1 -1
  57. package/dist/packages/_es/List.js +1 -1
  58. package/dist/packages/_es/Menu.js +14 -1
  59. package/dist/packages/_es/MenuItem.js +14 -8
  60. package/dist/packages/_es/Navbar.js +1 -1
  61. package/dist/packages/_es/NoticeBar.js +1 -1
  62. package/dist/packages/_es/Notify.js +5 -7
  63. package/dist/packages/_es/NumberKeyboard.js +4 -4
  64. package/dist/packages/_es/OverLay.js +60 -63
  65. package/dist/packages/_es/Pagination.js +1 -1
  66. package/dist/packages/_es/Picker.js +25 -50
  67. package/dist/packages/_es/Popover.js +111 -930
  68. package/dist/packages/_es/Popup.js +108 -261
  69. package/dist/packages/_es/Price.js +1 -1
  70. package/dist/packages/_es/Progress.js +1 -1
  71. package/dist/packages/_es/Radio.js +1 -1
  72. package/dist/packages/_es/RadioGroup.js +1 -1
  73. package/dist/packages/_es/Range.js +1 -1
  74. package/dist/packages/_es/Rate.js +1 -1
  75. package/dist/packages/_es/Row.js +1 -1
  76. package/dist/packages/_es/SearchBar.js +1 -1
  77. package/dist/packages/_es/ShortPassword.js +4 -4
  78. package/dist/packages/_es/SideNavBar.js +1 -1
  79. package/dist/packages/_es/SideNavBarItem.js +1 -1
  80. package/dist/packages/_es/Signature.js +1 -1
  81. package/dist/packages/_es/Skeleton.js +19 -24
  82. package/dist/packages/_es/Sku.js +4 -7
  83. package/dist/packages/_es/Step.js +1 -1
  84. package/dist/packages/_es/Steps.js +1 -1
  85. package/dist/packages/_es/Sticky.js +1 -1
  86. package/dist/packages/_es/SubSideNavBar.js +1 -1
  87. package/dist/packages/_es/Swipe.js +1 -1
  88. package/dist/packages/_es/Swiper.js +1 -1
  89. package/dist/packages/_es/SwiperItem.js +1 -1
  90. package/dist/packages/_es/Switch.js +1 -1
  91. package/dist/packages/_es/TabPane.js +1 -1
  92. package/dist/packages/_es/Tabbar.js +1 -1
  93. package/dist/packages/_es/TabbarItem.js +24 -10
  94. package/dist/packages/_es/Table.js +1 -1
  95. package/dist/packages/_es/Tabs.js +2 -2
  96. package/dist/packages/_es/Tag.js +1 -1
  97. package/dist/packages/_es/TextArea.js +1 -1
  98. package/dist/packages/_es/TimeDetail.js +1 -1
  99. package/dist/packages/_es/TimePannel.js +1 -1
  100. package/dist/packages/_es/TimeSelect.js +4 -4
  101. package/dist/packages/_es/Toast.js +5 -6
  102. package/dist/packages/_es/TrendArrow.js +1 -1
  103. package/dist/packages/_es/Uploader.js +7 -7
  104. package/dist/packages/_es/Video.js +3 -2
  105. package/dist/packages/_es/WaterMark.js +1 -1
  106. package/dist/packages/_es/common.js +1 -1
  107. package/dist/packages/_es/component.js +22 -2
  108. package/dist/packages/_es/index.js +1 -1
  109. package/dist/packages/_es/index2.js +1 -1
  110. package/dist/packages/_es/index3.js +1 -1
  111. package/dist/packages/_es/index4.js +1 -1
  112. package/dist/packages/_es/index5.js +8 -2
  113. package/dist/packages/_es/interceptor.js +32 -0
  114. package/dist/packages/_es/mountComponent.js +42 -0
  115. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  116. package/dist/packages/_es/props.js +80 -0
  117. package/dist/packages/_es/pxCheck.js +1 -1
  118. package/dist/packages/_es/raf.js +1 -1
  119. package/dist/packages/_es/style.css +1 -1
  120. package/dist/packages/address/index.scss +12 -3
  121. package/dist/packages/addresslist/index.scss +61 -101
  122. package/dist/packages/card/index.scss +1 -0
  123. package/dist/packages/ellipsis/index.scss +4 -0
  124. package/dist/packages/formitem/index.scss +2 -0
  125. package/dist/packages/imagepreview/index.scss +14 -1
  126. package/dist/packages/inputnumber/index.scss +5 -1
  127. package/dist/packages/locale/lang/baseLang.js +1 -1
  128. package/dist/packages/locale/lang/en-US.js +1 -1
  129. package/dist/packages/locale/lang/id-ID.js +1 -1
  130. package/dist/packages/locale/lang/index.js +1 -1
  131. package/dist/packages/locale/lang/zh-CN.js +1 -1
  132. package/dist/packages/locale/lang/zh-TW.js +1 -1
  133. package/dist/packages/menuitem/index.scss +0 -14
  134. package/dist/packages/notify/index.scss +2 -2
  135. package/dist/packages/overlay/index.scss +2 -1
  136. package/dist/packages/picker/index.scss +20 -12
  137. package/dist/packages/popover/index.scss +191 -363
  138. package/dist/packages/popup/index.scss +3 -14
  139. package/dist/packages/signature/index.scss +6 -2
  140. package/dist/packages/skeleton/index.scss +21 -19
  141. package/dist/packages/sticky/index.scss +3 -0
  142. package/dist/packages/tabbaritem/index.scss +4 -0
  143. package/dist/packages/timeselect/index.scss +0 -1
  144. package/dist/smartips/attributes.json +91 -111
  145. package/dist/smartips/tags.json +22 -35
  146. package/dist/smartips/web-types.json +162 -221
  147. package/dist/style.css +1 -1
  148. package/dist/styles/font/config.json +4 -0
  149. package/dist/styles/font/demo_index.html +118 -26
  150. package/dist/styles/font/iconfont.css +23 -7
  151. package/dist/styles/font/iconfont.js +6 -6
  152. package/dist/styles/font/iconfont.json +35 -7
  153. package/dist/styles/font/iconfont.ttf +0 -0
  154. package/dist/styles/font/iconfont.woff +0 -0
  155. package/dist/styles/font/iconfont.woff2 +0 -0
  156. package/dist/styles/themes/default.scss +52 -54
  157. package/dist/styles/themes/jdb.scss +52 -54
  158. package/dist/styles/themes/jddkh.scss +52 -54
  159. package/dist/styles/themes/jdt.scss +52 -54
  160. package/dist/styles/variables-jdb.scss +8 -1
  161. package/dist/styles/variables-jddkh.scss +8 -1
  162. package/dist/styles/variables-jdt.scss +8 -1
  163. package/dist/styles/variables.scss +17 -1
  164. package/dist/types/__VUE/actionsheet/index.vue.d.ts +58 -54
  165. package/dist/types/__VUE/address/index.vue.d.ts +71 -91
  166. package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +29 -9
  167. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +4 -13
  168. package/dist/types/__VUE/addresslist/components/SwipeShell.vue.d.ts +9 -9
  169. package/dist/types/__VUE/addresslist/index.vue.d.ts +23 -20
  170. package/dist/types/__VUE/audio/index.vue.d.ts +4 -4
  171. package/dist/types/__VUE/avatar/index.vue.d.ts +2 -2
  172. package/dist/types/__VUE/avatargroup/index.vue.d.ts +1 -1
  173. package/dist/types/__VUE/backtop/index.vue.d.ts +1 -1
  174. package/dist/types/__VUE/badge/index.vue.d.ts +1 -1
  175. package/dist/types/__VUE/button/index.vue.d.ts +1 -1
  176. package/dist/types/__VUE/calendar/index.vue.d.ts +11 -0
  177. package/dist/types/__VUE/calendaritem/index.vue.d.ts +15 -5
  178. package/dist/types/__VUE/cascader/index.vue.d.ts +47 -52
  179. package/dist/types/__VUE/cell/index.vue.d.ts +5 -5
  180. package/dist/types/__VUE/collapseitem/index.vue.d.ts +1 -1
  181. package/dist/types/__VUE/countdown/index.vue.d.ts +0 -1
  182. package/dist/types/__VUE/countdown/util.d.ts +0 -1
  183. package/dist/types/__VUE/countup/index.vue.d.ts +2 -2
  184. package/dist/types/__VUE/datepicker/index.vue.d.ts +55 -60
  185. package/dist/types/__VUE/dialog/index.d.ts +0 -3
  186. package/dist/types/__VUE/dialog/index.vue.d.ts +48 -57
  187. package/dist/types/__VUE/elevator/index.vue.d.ts +2 -1
  188. package/dist/types/__VUE/form/common.d.ts +4 -2
  189. package/dist/types/__VUE/form/index.vue.d.ts +4 -4
  190. package/dist/types/__VUE/grid/index.vue.d.ts +2 -2
  191. package/dist/types/__VUE/image/index.vue.d.ts +1 -1
  192. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +27 -20
  193. package/dist/types/__VUE/imagepreview/index.d.ts +19 -5
  194. package/dist/types/__VUE/imagepreview/index.vue.d.ts +56 -42
  195. package/dist/types/__VUE/imagepreview/types.d.ts +44 -0
  196. package/dist/types/__VUE/indicator/index.vue.d.ts +1 -0
  197. package/dist/types/__VUE/input/index.vue.d.ts +37 -26
  198. package/dist/types/__VUE/invoice/index.vue.d.ts +1 -1
  199. package/dist/types/__VUE/menuitem/index.vue.d.ts +3 -1
  200. package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
  201. package/dist/types/__VUE/noticebar/index.vue.d.ts +4 -4
  202. package/dist/types/__VUE/notify/index.vue.d.ts +3 -3
  203. package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +3 -3
  204. package/dist/types/__VUE/overlay/index.vue.d.ts +11 -12
  205. package/dist/types/__VUE/picker/Column.vue.d.ts +4 -6
  206. package/dist/types/__VUE/picker/index.vue.d.ts +60 -67
  207. package/dist/types/__VUE/popover/index.vue.d.ts +36 -139
  208. package/dist/types/__VUE/popup/common.d.ts +103 -0
  209. package/dist/types/__VUE/popup/index.vue.d.ts +55 -1591
  210. package/dist/types/__VUE/popup/props.d.ts +82 -0
  211. package/dist/types/__VUE/range/index.vue.d.ts +7 -7
  212. package/dist/types/__VUE/shortpassword/index.vue.d.ts +4 -4
  213. package/dist/types/__VUE/skeleton/common.d.ts +2 -3
  214. package/dist/types/__VUE/skeleton/index.vue.d.ts +2 -3
  215. package/dist/types/__VUE/sku/index.vue.d.ts +56 -61
  216. package/dist/types/__VUE/step/index.vue.d.ts +1 -1
  217. package/dist/types/__VUE/swiper/index.vue.d.ts +1 -1
  218. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +2 -1
  219. package/dist/types/__VUE/timeselect/index.vue.d.ts +3 -3
  220. package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
  221. package/dist/types/__VUE/uploader/index.vue.d.ts +15 -6
  222. package/dist/types/__VUE/video/index.vue.d.ts +5 -5
  223. package/dist/types/index.d.ts +1 -1
  224. package/dist/types/nutui.d.ts +1 -3
  225. package/package.json +3 -3
  226. package/dist/packages/_es/OldPicker.js +0 -486
  227. package/dist/packages/_es/PullRefresh.js +0 -349
  228. package/dist/packages/oldpicker/index.scss +0 -133
  229. package/dist/packages/pullrefresh/index.scss +0 -71
  230. package/dist/types/__VUE/addresslist/components/LongPressShell.vue.d.ts +0 -47
  231. package/dist/types/__VUE/datepicker/utils.d.ts +0 -5
  232. package/dist/types/__VUE/oldpicker/Column.vue.d.ts +0 -96
  233. package/dist/types/__VUE/oldpicker/commonProps.d.ts +0 -22
  234. package/dist/types/__VUE/oldpicker/index.vue.d.ts +0 -369
  235. package/dist/types/__VUE/oldpicker/types.d.ts +0 -24
  236. package/dist/types/__VUE/popup/use-lock-scroll.d.ts +0 -5
  237. package/dist/types/__VUE/pullrefresh/index.vue.d.ts +0 -128
  238. package/dist/types/__VUE/pullrefresh/use-touch.d.ts +0 -20
  239. package/dist/types/__VUE/pullrefresh/util.d.ts +0 -6
@@ -1,9 +1,9 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.7 Fri Dec 02 2022 14:12:17 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { ref, reactive, computed, watch, onMounted, resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, normalizeStyle, createElementVNode, toDisplayString, createCommentVNode, renderSlot, createVNode, mergeProps, withDirectives, createBlock, vShow, createTextVNode } from "vue";
6
+ import { ref, reactive, computed, watch, onMounted, h, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, mergeProps, createCommentVNode, normalizeStyle, createElementVNode, toDisplayString, renderSlot, createBlock, resolveDynamicComponent, withDirectives, vShow, 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";
@@ -43,7 +43,7 @@ const _sfc_main = create({
43
43
  default: "text"
44
44
  },
45
45
  modelValue: {
46
- type: [String, Number],
46
+ type: String,
47
47
  default: ""
48
48
  },
49
49
  placeholder: {
@@ -161,6 +161,10 @@ const _sfc_main = create({
161
161
  autofocus: {
162
162
  type: Boolean,
163
163
  default: false
164
+ },
165
+ confirmType: {
166
+ type: String,
167
+ default: "done"
164
168
  }
165
169
  },
166
170
  emits: [
@@ -177,11 +181,15 @@ const _sfc_main = create({
177
181
  setup(props, { emit, slots }) {
178
182
  const active = ref(false);
179
183
  const inputRef = ref();
180
- ref();
181
184
  const getModelValue = () => {
182
185
  var _a;
183
186
  return String((_a = props.modelValue) != null ? _a : "");
184
187
  };
188
+ const renderInput = (type) => {
189
+ return h(type == "textarea" ? "textarea" : "input", {
190
+ style: type == "textarea" ? stylesTextarea : styles
191
+ });
192
+ };
185
193
  const state = reactive({
186
194
  focused: false,
187
195
  validateFailed: false,
@@ -252,7 +260,8 @@ const _sfc_main = create({
252
260
  const input = event.target;
253
261
  let value = input.value;
254
262
  active.value = true;
255
- emit("focus", value, event);
263
+ emit("focus", event);
264
+ emit("update:modelValue", value);
256
265
  };
257
266
  const onBlur = (event) => {
258
267
  if (props.disabled || props.readonly) {
@@ -267,13 +276,13 @@ const _sfc_main = create({
267
276
  value = value.slice(0, Number(props.maxLength));
268
277
  }
269
278
  updateValue(getModelValue(), "onBlur");
270
- emit("blur", value, event);
279
+ emit("blur", event);
280
+ emit("update:modelValue", value);
271
281
  };
272
282
  const clear = (event) => {
283
+ event.stopPropagation();
273
284
  if (props.disabled)
274
285
  return;
275
- emit("update:modelValue", "", event);
276
- emit("change", "", event);
277
286
  emit("clear", "", event);
278
287
  };
279
288
  const resetValidation = () => {
@@ -289,23 +298,19 @@ const _sfc_main = create({
289
298
  emit("click-input", event);
290
299
  };
291
300
  const onClickLeftIcon = (event) => {
301
+ event.stopPropagation();
292
302
  if (props.disabled) {
293
303
  return;
294
304
  }
295
305
  emit("click-left-icon", event);
296
306
  };
297
307
  const onClickRightIcon = (event) => {
308
+ event.stopPropagation();
298
309
  if (props.disabled) {
299
310
  return;
300
311
  }
301
312
  emit("click-right-icon", event);
302
313
  };
303
- const onClick = (e) => {
304
- if (props.disabled) {
305
- e.stopImmediatePropagation();
306
- return;
307
- }
308
- };
309
314
  watch(
310
315
  () => props.modelValue,
311
316
  () => {
@@ -321,6 +326,7 @@ const _sfc_main = create({
321
326
  }
322
327
  });
323
328
  return {
329
+ renderInput,
324
330
  inputRef,
325
331
  active,
326
332
  classes,
@@ -333,143 +339,114 @@ const _sfc_main = create({
333
339
  clear,
334
340
  onClickInput,
335
341
  onClickLeftIcon,
336
- onClickRightIcon,
337
- onClick
342
+ onClickRightIcon
338
343
  };
339
344
  }
340
345
  });
341
346
  const _hoisted_1 = { class: "label-string" };
342
- const _hoisted_2 = { class: "nut-input-value" };
343
- const _hoisted_3 = { class: "label-string" };
344
- const _hoisted_4 = { class: "nut-input-value" };
345
- const _hoisted_5 = { class: "nut-input-inner" };
346
- const _hoisted_6 = { class: "nut-input-box" };
347
- const _hoisted_7 = ["maxlength", "placeholder", "disabled", "readonly", "value", "formatTrigger", "autofocus"];
348
- const _hoisted_8 = ["type", "maxlength", "placeholder", "disabled", "readonly", "value", "formatTrigger", "autofocus"];
349
- const _hoisted_9 = { class: "nut-input-clear-box" };
350
- const _hoisted_10 = {
347
+ const _hoisted_2 = {
348
+ key: 2,
349
+ class: "nut-input-value"
350
+ };
351
+ const _hoisted_3 = {
352
+ key: 3,
353
+ class: "nut-input-value"
354
+ };
355
+ const _hoisted_4 = { class: "nut-input-inner" };
356
+ const _hoisted_5 = { class: "nut-input-box" };
357
+ const _hoisted_6 = { class: "nut-input-clear-box" };
358
+ const _hoisted_7 = {
351
359
  key: 0,
352
360
  class: "nut-input-word-limit"
353
361
  };
354
- const _hoisted_11 = { class: "nut-input-word-num" };
362
+ const _hoisted_8 = { class: "nut-input-word-num" };
355
363
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
356
364
  const _component_nut_icon = resolveComponent("nut-icon");
357
365
  return openBlock(), createElementBlock("view", {
358
- class: normalizeClass(_ctx.classes),
359
- onClick: _cache[11] || (_cache[11] = (...args) => _ctx.onClick && _ctx.onClick(...args))
366
+ class: normalizeClass(_ctx.classes)
360
367
  }, [
361
- _ctx.$slots.input ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
362
- _ctx.label ? (openBlock(), createElementBlock("view", {
363
- key: 0,
364
- class: normalizeClass(["nut-input-label", _ctx.labelClass]),
365
- style: normalizeStyle({
366
- width: `${_ctx.labelWidth}px`,
367
- textAlign: _ctx.labelAlign
368
- })
368
+ _ctx.leftIcon && _ctx.leftIcon.length > 0 ? (openBlock(), createElementBlock("view", {
369
+ key: 0,
370
+ class: "nut-input-left-icon",
371
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClickLeftIcon && _ctx.onClickLeftIcon(...args))
372
+ }, [
373
+ createVNode(_component_nut_icon, mergeProps({ name: _ctx.leftIcon }, _ctx.$attrs, { size: _ctx.leftIconSize }), null, 16, ["name", "size"])
374
+ ])) : createCommentVNode("", true),
375
+ _ctx.label ? (openBlock(), createElementBlock("view", {
376
+ key: 1,
377
+ class: normalizeClass(["nut-input-label", _ctx.labelClass]),
378
+ style: normalizeStyle({
379
+ width: `${_ctx.labelWidth}px`,
380
+ textAlign: _ctx.labelAlign
381
+ })
382
+ }, [
383
+ createElementVNode("view", _hoisted_1, toDisplayString(_ctx.label) + " " + toDisplayString(_ctx.colon ? ":" : ""), 1)
384
+ ], 6)) : createCommentVNode("", true),
385
+ _ctx.$slots.input ? (openBlock(), createElementBlock("view", _hoisted_2, [
386
+ createElementVNode("view", {
387
+ class: "nut-input-inner",
388
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClickInput && _ctx.onClickInput(...args))
369
389
  }, [
370
- createElementVNode("view", _hoisted_1, toDisplayString(_ctx.label) + " " + toDisplayString(_ctx.colon ? ":" : ""), 1)
371
- ], 6)) : createCommentVNode("", true),
372
- createElementVNode("view", _hoisted_2, [
373
- createElementVNode("view", {
374
- class: "nut-input-inner",
375
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClickInput && _ctx.onClickInput(...args))
376
- }, [
377
- renderSlot(_ctx.$slots, "input")
378
- ])
390
+ renderSlot(_ctx.$slots, "input")
379
391
  ])
380
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
381
- _ctx.leftIcon && _ctx.leftIcon.length > 0 ? (openBlock(), createElementBlock("view", {
382
- key: 0,
383
- class: "nut-input-left-icon",
384
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClickLeftIcon && _ctx.onClickLeftIcon(...args))
385
- }, [
386
- createVNode(_component_nut_icon, mergeProps({ name: _ctx.leftIcon }, _ctx.$attrs, { size: _ctx.leftIconSize }), null, 16, ["name", "size"])
387
- ])) : createCommentVNode("", true),
388
- _ctx.label ? (openBlock(), createElementBlock("view", {
389
- key: 1,
390
- class: normalizeClass(["nut-input-label", _ctx.labelClass]),
391
- style: normalizeStyle({
392
- width: `${_ctx.labelWidth}px`,
393
- textAlign: _ctx.labelAlign
394
- })
395
- }, [
396
- createElementVNode("view", _hoisted_3, toDisplayString(_ctx.label) + " " + toDisplayString(_ctx.colon ? ":" : ""), 1)
397
- ], 6)) : createCommentVNode("", true),
392
+ ])) : (openBlock(), createElementBlock("view", _hoisted_3, [
398
393
  createElementVNode("view", _hoisted_4, [
399
394
  createElementVNode("view", _hoisted_5, [
400
- createElementVNode("view", _hoisted_6, [
401
- _ctx.type == "textarea" ? (openBlock(), createElementBlock("textarea", {
402
- key: 0,
403
- class: "input-text",
404
- ref: "inputRef",
405
- style: normalizeStyle(_ctx.stylesTextarea),
406
- maxlength: _ctx.maxLength,
407
- placeholder: _ctx.placeholder,
408
- disabled: _ctx.disabled,
409
- readonly: _ctx.readonly,
410
- value: _ctx.modelValue,
411
- formatTrigger: _ctx.formatTrigger,
412
- autofocus: _ctx.autofocus,
413
- onInput: _cache[2] || (_cache[2] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
414
- onFocus: _cache[3] || (_cache[3] = (...args) => _ctx.onFocus && _ctx.onFocus(...args)),
415
- onBlur: _cache[4] || (_cache[4] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
416
- onClick: _cache[5] || (_cache[5] = (...args) => _ctx.onClickInput && _ctx.onClickInput(...args))
417
- }, null, 44, _hoisted_7)) : (openBlock(), createElementBlock("input", {
418
- key: 1,
419
- class: "input-text",
420
- ref: "inputRef",
421
- style: normalizeStyle(_ctx.styles),
422
- type: _ctx.inputType(_ctx.type),
423
- maxlength: _ctx.maxLength,
424
- placeholder: _ctx.placeholder,
425
- disabled: _ctx.disabled,
426
- readonly: _ctx.readonly,
427
- value: _ctx.modelValue,
428
- formatTrigger: _ctx.formatTrigger,
429
- autofocus: _ctx.autofocus,
430
- onInput: _cache[6] || (_cache[6] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
431
- onFocus: _cache[7] || (_cache[7] = (...args) => _ctx.onFocus && _ctx.onFocus(...args)),
432
- onBlur: _cache[8] || (_cache[8] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
433
- onClick: _cache[9] || (_cache[9] = (...args) => _ctx.onClickInput && _ctx.onClickInput(...args))
434
- }, null, 44, _hoisted_8))
435
- ]),
436
- createElementVNode("view", _hoisted_9, [
437
- _ctx.clearable && !_ctx.readonly ? withDirectives((openBlock(), createBlock(_component_nut_icon, mergeProps({
438
- key: 0,
439
- class: "nut-input-clear",
440
- name: _ctx.clearIcon
441
- }, _ctx.$attrs, {
442
- size: _ctx.clearSize,
443
- onClick: _ctx.clear
444
- }), null, 16, ["name", "size", "onClick"])), [
445
- [vShow, _ctx.active && _ctx.modelValue.length > 0]
446
- ]) : createCommentVNode("", true)
447
- ]),
448
- _ctx.rightIcon && _ctx.rightIcon.length > 0 ? (openBlock(), createElementBlock("view", {
395
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.renderInput(_ctx.type)), {
396
+ class: "input-text",
397
+ ref: "inputRef",
398
+ style: normalizeStyle(_ctx.styles),
399
+ maxlength: _ctx.maxLength,
400
+ placeholder: _ctx.placeholder,
401
+ disabled: _ctx.disabled,
402
+ readonly: _ctx.readonly,
403
+ value: _ctx.modelValue,
404
+ formatTrigger: _ctx.formatTrigger,
405
+ autofocus: _ctx.autofocus,
406
+ enterkeyhint: _ctx.confirmType,
407
+ onInput: _ctx.onInput,
408
+ onFocus: _ctx.onFocus,
409
+ onBlur: _ctx.onBlur,
410
+ onClick: _ctx.onClickInput
411
+ }, null, 40, ["style", "maxlength", "placeholder", "disabled", "readonly", "value", "formatTrigger", "autofocus", "enterkeyhint", "onInput", "onFocus", "onBlur", "onClick"]))
412
+ ]),
413
+ createElementVNode("view", _hoisted_6, [
414
+ _ctx.clearable && !_ctx.readonly ? withDirectives((openBlock(), createBlock(_component_nut_icon, mergeProps({
449
415
  key: 0,
450
- class: "nut-input-right-icon",
451
- onClick: _cache[10] || (_cache[10] = (...args) => _ctx.onClickRightIcon && _ctx.onClickRightIcon(...args))
452
- }, [
453
- createVNode(_component_nut_icon, mergeProps({ name: _ctx.rightIcon }, _ctx.$attrs, { size: _ctx.rightIconSize }), null, 16, ["name", "size"])
454
- ])) : createCommentVNode("", true),
455
- _ctx.$slots.button ? renderSlot(_ctx.$slots, "button", {
456
- key: 1,
457
- class: "nut-input-button"
458
- }) : createCommentVNode("", true)
416
+ class: "nut-input-clear",
417
+ name: _ctx.clearIcon
418
+ }, _ctx.$attrs, {
419
+ size: _ctx.clearSize,
420
+ onClick: _ctx.clear
421
+ }), null, 16, ["name", "size", "onClick"])), [
422
+ [vShow, _ctx.active && _ctx.modelValue.length > 0]
423
+ ]) : createCommentVNode("", true)
459
424
  ]),
460
- _ctx.showWordLimit && _ctx.maxLength ? (openBlock(), createElementBlock("view", _hoisted_10, [
461
- createElementVNode("span", _hoisted_11, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0), 1),
462
- createTextVNode("/" + toDisplayString(_ctx.maxLength), 1)
425
+ _ctx.rightIcon && _ctx.rightIcon.length > 0 ? (openBlock(), createElementBlock("view", {
426
+ key: 0,
427
+ class: "nut-input-right-icon",
428
+ onClick: _cache[2] || (_cache[2] = (...args) => _ctx.onClickRightIcon && _ctx.onClickRightIcon(...args))
429
+ }, [
430
+ createVNode(_component_nut_icon, mergeProps({ name: _ctx.rightIcon }, _ctx.$attrs, { size: _ctx.rightIconSize }), null, 16, ["name", "size"])
463
431
  ])) : createCommentVNode("", true),
464
- _ctx.errorMessage ? (openBlock(), createElementBlock("view", {
432
+ _ctx.$slots.button ? renderSlot(_ctx.$slots, "button", {
465
433
  key: 1,
466
- class: "nut-input-error-message",
467
- style: normalizeStyle({
468
- textAlign: _ctx.errorMessageAlign
469
- })
470
- }, toDisplayString(_ctx.errorMessage), 5)) : createCommentVNode("", true)
471
- ])
472
- ], 64))
434
+ class: "nut-input-button"
435
+ }) : createCommentVNode("", true),
436
+ _ctx.$slots.rightExtra ? renderSlot(_ctx.$slots, "rightExtra", { key: 2 }) : createCommentVNode("", true)
437
+ ]),
438
+ _ctx.showWordLimit && _ctx.maxLength ? (openBlock(), createElementBlock("view", _hoisted_7, [
439
+ createElementVNode("span", _hoisted_8, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0), 1),
440
+ createTextVNode("/" + toDisplayString(_ctx.maxLength), 1)
441
+ ])) : createCommentVNode("", true),
442
+ _ctx.errorMessage ? (openBlock(), createElementBlock("view", {
443
+ key: 1,
444
+ class: "nut-input-error-message",
445
+ style: normalizeStyle({
446
+ textAlign: _ctx.errorMessageAlign
447
+ })
448
+ }, toDisplayString(_ctx.errorMessage), 5)) : createCommentVNode("", true)
449
+ ]))
473
450
  ], 2);
474
451
  }
475
452
  var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.7 Fri Dec 02 2022 14:12:17 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 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.7 Fri Dec 02 2022 14:12:17 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 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.7 Fri Dec 02 2022 14:12:17 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 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.7 Fri Dec 02 2022 14:12:17 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 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.7 Fri Dec 02 2022 14:12:17 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -56,10 +56,23 @@ const _sfc_main = create({
56
56
  publicChildren.push(child.proxy);
57
57
  }
58
58
  };
59
+ const removeLink = (child) => {
60
+ if (child.proxy) {
61
+ let internalIndex = internalChildren.indexOf(child);
62
+ if (internalIndex > -1) {
63
+ internalChildren.splice(internalIndex, 1);
64
+ }
65
+ let publicIndex = publicChildren.indexOf(child.proxy);
66
+ if (internalIndex > -1) {
67
+ publicChildren.splice(publicIndex, 1);
68
+ }
69
+ }
70
+ };
59
71
  provide(
60
72
  "menuParent",
61
73
  Object.assign(
62
74
  {
75
+ removeLink,
63
76
  link,
64
77
  children: publicChildren,
65
78
  internalChildren
@@ -1,16 +1,16 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.7 Fri Dec 02 2022 14:12:17 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
6
- import { reactive, computed, inject, getCurrentInstance, resolveComponent, withDirectives, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, vShow, createVNode, mergeProps, withCtx, Fragment, renderList, createBlock, createCommentVNode, toDisplayString, renderSlot } from "vue";
6
+ import { reactive, computed, inject, getCurrentInstance, onUnmounted, resolveComponent, withDirectives, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, vShow, createVNode, mergeProps, withCtx, Fragment, renderList, createBlock, createCommentVNode, toDisplayString, renderSlot } from "vue";
7
7
  import { c as createComponent } from "./component.js";
8
8
  import _sfc_main$1 from "./Icon.js";
9
9
  import Popup from "./Popup.js";
10
10
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
11
11
  import "../locale/lang";
12
12
  import "./pxCheck.js";
13
- import "./OverLay.js";
13
+ import "./props.js";
14
14
  const { componentName, create } = createComponent("menu-item");
15
15
  const _sfc_main = create({
16
16
  props: {
@@ -39,7 +39,7 @@ const _sfc_main = create({
39
39
  [_sfc_main$1.name]: _sfc_main$1,
40
40
  [Popup.name]: Popup
41
41
  },
42
- emits: ["update:modelValue", "change"],
42
+ emits: ["update:modelValue", "change", "open", "close"],
43
43
  setup(props, { emit, slots }) {
44
44
  const state = reactive({
45
45
  showPopup: false,
@@ -51,8 +51,11 @@ const _sfc_main = create({
51
51
  const parent2 = inject("menuParent", null);
52
52
  if (parent2) {
53
53
  const instance = getCurrentInstance();
54
- const { link } = parent2;
54
+ const { link, removeLink } = parent2;
55
55
  link(instance);
56
+ onUnmounted(() => {
57
+ removeLink(instance);
58
+ });
56
59
  return {
57
60
  parent: parent2
58
61
  };
@@ -81,6 +84,7 @@ const _sfc_main = create({
81
84
  state.isShowPlaceholderElement = show;
82
85
  if (show) {
83
86
  state.showWrapper = true;
87
+ emit("open");
84
88
  }
85
89
  };
86
90
  const renderTitle = () => {
@@ -100,11 +104,13 @@ const _sfc_main = create({
100
104
  }
101
105
  };
102
106
  const handleClose = () => {
107
+ emit("close");
103
108
  state.showWrapper = false;
104
109
  state.isShowPlaceholderElement = false;
105
110
  };
106
111
  const handleClickOutside = () => {
107
112
  state.showPopup = false;
113
+ emit("close");
108
114
  };
109
115
  return {
110
116
  classes,
@@ -136,18 +142,18 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
136
142
  ]),
137
143
  createVNode(_component_nut_popup, mergeProps({
138
144
  style: _ctx.parent.props.direction === "down" ? { top: _ctx.parent.offset.value + "px" } : { bottom: _ctx.parent.offset.value + "px" },
139
- overlayStyle: _ctx.parent.props.direction === "down" ? { top: _ctx.parent.offset.value + "px" } : { bottom: _ctx.parent.offset.value + "px" }
145
+ overlayStyle: _ctx.parent.props.direction === "down" ? { top: _ctx.parent.offset.value + "px" } : { bottom: _ctx.parent.offset.value + "px", top: "auto" }
140
146
  }, _ctx.$attrs, {
141
147
  visible: _ctx.state.showPopup,
142
148
  "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => _ctx.state.showPopup = $event),
143
149
  position: _ctx.parent.props.direction === "down" ? "top" : "bottom",
144
150
  duration: _ctx.parent.props.duration,
145
151
  "pop-class": "nut-menu__pop",
146
- overlayClass: "nut-menu__overlay",
152
+ "destroy-on-close": false,
147
153
  overlay: _ctx.parent.props.overlay,
148
154
  onClosed: _ctx.handleClose,
149
155
  lockScroll: _ctx.parent.props.lockScroll,
150
- isWrapTeleport: false,
156
+ teleportDisable: false,
151
157
  "close-on-click-overlay": _ctx.parent.props.closeOnClickOverlay
152
158
  }), {
153
159
  default: withCtx(() => [
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.7 Fri Dec 02 2022 14:12:17 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 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.7 Fri Dec 02 2022 14:12:17 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 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.7 Fri Dec 02 2022 14:12:17 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -8,9 +8,7 @@ import { c as createComponent } from "./component.js";
8
8
  import Popup from "./Popup.js";
9
9
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
10
10
  import "../locale/lang";
11
- import "./OverLay.js";
12
- import "./Icon.js";
13
- import "./pxCheck.js";
11
+ import "./props.js";
14
12
  const { create } = createComponent("notify");
15
13
  const _sfc_main = create({
16
14
  components: {
@@ -38,7 +36,7 @@ const _sfc_main = create({
38
36
  type: String,
39
37
  default: "top"
40
38
  },
41
- isWrapTeleport: {
39
+ teleportDisable: {
42
40
  type: Boolean,
43
41
  default: true
44
42
  },
@@ -89,7 +87,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
89
87
  "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => _ctx.isShowPopup = $event),
90
88
  position: _ctx.position,
91
89
  overlay: false,
92
- isWrapTeleport: _ctx.isWrapTeleport
90
+ teleportDisable: _ctx.teleportDisable
93
91
  }, {
94
92
  default: withCtx(() => [
95
93
  createElementVNode("div", {
@@ -103,7 +101,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
103
101
  ], 6)
104
102
  ]),
105
103
  _: 3
106
- }, 8, ["visible", "position", "isWrapTeleport"]);
104
+ }, 8, ["visible", "position", "teleportDisable"]);
107
105
  }
108
106
  var Notify = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
109
107
  const defaultOptions = {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.2.6 Fri Nov 04 2022 18:06:53 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.2.7 Fri Dec 02 2022 14:12:17 GMT+0800 (中国标准时间)
3
3
  * (c) 2022 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -46,7 +46,7 @@ const _sfc_main = create({
46
46
  type: Boolean,
47
47
  default: true
48
48
  },
49
- isWrapTeleport: {
49
+ teleportDisable: {
50
50
  type: Boolean,
51
51
  default: true
52
52
  },
@@ -208,7 +208,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
208
208
  popClass: _ctx.popClass,
209
209
  overlay: _ctx.overlay,
210
210
  onClickOverlay: _cache[8] || (_cache[8] = ($event) => _ctx.closeBoard()),
211
- isWrapTeleport: _ctx.isWrapTeleport,
211
+ teleportDisable: _ctx.teleportDisable,
212
212
  "overlay-class": "nut-numberkeyboard-overlay"
213
213
  }, {
214
214
  default: withCtx(() => [
@@ -275,7 +275,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
275
275
  ], 512)
276
276
  ]),
277
277
  _: 1
278
- }, 8, ["visible", "teleport", "popClass", "overlay", "isWrapTeleport"]);
278
+ }, 8, ["visible", "teleport", "popClass", "overlay", "teleportDisable"]);
279
279
  }
280
280
  var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
281
281
  export { index as default };