@nutui/nutui 4.2.0 → 4.2.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 (69) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +4867 -4913
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/_es/ActionSheet.js +22 -29
  6. package/dist/packages/_es/Address.js +2 -1
  7. package/dist/packages/_es/Barrage.js +9 -14
  8. package/dist/packages/_es/Calendar.js +7 -4
  9. package/dist/packages/_es/CalendarItem.js +1 -1
  10. package/dist/packages/_es/Cascader.js +3 -2
  11. package/dist/packages/_es/Collapse.js +9 -14
  12. package/dist/packages/_es/DatePicker.js +1 -1
  13. package/dist/packages/_es/Dialog.js +11 -2
  14. package/dist/packages/_es/Drag.js +4 -11
  15. package/dist/packages/_es/Elevator.js +27 -43
  16. package/dist/packages/_es/Ellipsis.js +5 -11
  17. package/dist/packages/_es/Input.js +15 -7
  18. package/dist/packages/_es/List.js +4 -11
  19. package/dist/packages/_es/Noticebar.js +16 -24
  20. package/dist/packages/_es/Rate.js +5 -13
  21. package/dist/packages/_es/SideNavbar.js +10 -18
  22. package/dist/packages/_es/SideNavbarItem.js +6 -13
  23. package/dist/packages/_es/Sku.js +15 -29
  24. package/dist/packages/_es/SubSideNavbar.js +6 -13
  25. package/dist/packages/_es/Swiper.js +11 -10
  26. package/dist/packages/_es/SwiperItem.js +5 -12
  27. package/dist/packages/_es/Table.js +25 -37
  28. package/dist/packages/_es/TimeDetail.js +15 -26
  29. package/dist/packages/_es/TimeSelect.js +20 -29
  30. package/dist/packages/_es/TrendArrow.js +6 -13
  31. package/dist/packages/_es/{index-b53aec83.js → index-a187a5aa.js} +3 -2
  32. package/dist/packages/address/index.css +1 -1
  33. package/dist/packages/checkbox/index.css +1 -1
  34. package/dist/packages/checkbox/index.scss +1 -0
  35. package/dist/packages/elevator/index.css +1 -1
  36. package/dist/packages/elevator/index.scss +0 -13
  37. package/dist/packages/imagepreview/index.css +1 -1
  38. package/dist/packages/swiper/index.css +1 -1
  39. package/dist/packages/swiper/index.scss +0 -1
  40. package/dist/smartips/web-types.json +20 -2
  41. package/dist/style.css +1 -1
  42. package/dist/types/__VUE/actionsheet/index.vue.d.ts +0 -3
  43. package/dist/types/__VUE/barrage/index.vue.d.ts +0 -3
  44. package/dist/types/__VUE/calendar/index.vue.d.ts +4 -2
  45. package/dist/types/__VUE/calendaritem/index.vue.d.ts +3 -0
  46. package/dist/types/__VUE/collapse/index.vue.d.ts +0 -3
  47. package/dist/types/__VUE/dialog/index.d.ts +10 -8
  48. package/dist/types/__VUE/dialog/index.vue.d.ts +9 -0
  49. package/dist/types/__VUE/drag/index.vue.d.ts +0 -3
  50. package/dist/types/__VUE/elevator/index.vue.d.ts +0 -6
  51. package/dist/types/__VUE/ellipsis/index.vue.d.ts +0 -3
  52. package/dist/types/__VUE/imagepreview/index.d.ts +1 -0
  53. package/dist/types/__VUE/input/index.vue.d.ts +7 -4
  54. package/dist/types/__VUE/input/type.d.ts +5 -0
  55. package/dist/types/__VUE/list/index.vue.d.ts +0 -3
  56. package/dist/types/__VUE/noticebar/index.vue.d.ts +0 -20
  57. package/dist/types/__VUE/rate/index.vue.d.ts +3 -4
  58. package/dist/types/__VUE/sidenavbar/index.vue.d.ts +0 -3
  59. package/dist/types/__VUE/sidenavbaritem/index.vue.d.ts +0 -3
  60. package/dist/types/__VUE/sku/index.vue.d.ts +8 -176
  61. package/dist/types/__VUE/subsidenavbar/index.vue.d.ts +0 -3
  62. package/dist/types/__VUE/swiper/index.vue.d.ts +0 -3
  63. package/dist/types/__VUE/swiperitem/index.vue.d.ts +0 -3
  64. package/dist/types/__VUE/table/index.vue.d.ts +3 -6
  65. package/dist/types/__VUE/timedetail/index.vue.d.ts +4 -6
  66. package/dist/types/__VUE/timeselect/index.vue.d.ts +1 -5
  67. package/dist/types/__VUE/trendarrow/index.vue.d.ts +0 -3
  68. package/dist/types/index.d.ts +1 -1
  69. package/package.json +1 -1
@@ -66,7 +66,7 @@ const _sfc_main = create({
66
66
  default: "text"
67
67
  },
68
68
  modelValue: {
69
- type: String,
69
+ type: [String, Number],
70
70
  default: ""
71
71
  },
72
72
  placeholder: {
@@ -139,7 +139,7 @@ const _sfc_main = create({
139
139
  }
140
140
  },
141
141
  components: { MaskClose },
142
- emits: ["update:modelValue", "blur", "focus", "clear", "keypress", "click", "clickInput"],
142
+ emits: ["update:modelValue", "blur", "focus", "clear", "keypress", "click", "clickInput", "confirm"],
143
143
  expose: ["focus", "blur", "select"],
144
144
  setup(props, { emit }) {
145
145
  const active = ref(false);
@@ -273,6 +273,11 @@ const _sfc_main = create({
273
273
  var _a;
274
274
  (_a = inputRef.value) == null ? void 0 : _a.select();
275
275
  };
276
+ const onKeyup = (e) => {
277
+ if (e.key === "Enter") {
278
+ emit("confirm", e);
279
+ }
280
+ };
276
281
  return {
277
282
  renderInput,
278
283
  inputRef,
@@ -289,7 +294,9 @@ const _sfc_main = create({
289
294
  onClickInput,
290
295
  focus,
291
296
  blur,
292
- select
297
+ select,
298
+ onKeyup,
299
+ getModelValue
293
300
  };
294
301
  }
295
302
  });
@@ -336,10 +343,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
336
343
  onClick: _ctx.onClickInput,
337
344
  onChange: _ctx.endComposing,
338
345
  onCompositionend: _ctx.endComposing,
339
- onCompositionstart: _ctx.startComposing
340
- }, null, 40, ["style", "maxlength", "placeholder", "disabled", "readonly", "value", "format-trigger", "autofocus", "enterkeyhint", "onInput", "onFocus", "onBlur", "onClick", "onChange", "onCompositionend", "onCompositionstart"])),
346
+ onCompositionstart: _ctx.startComposing,
347
+ onKeyup: _ctx.onKeyup
348
+ }, null, 40, ["style", "maxlength", "placeholder", "disabled", "readonly", "value", "format-trigger", "autofocus", "enterkeyhint", "onInput", "onFocus", "onBlur", "onClick", "onChange", "onCompositionend", "onCompositionstart", "onKeyup"])),
341
349
  _ctx.showWordLimit && _ctx.maxLength ? (openBlock(), createElementBlock("view", _hoisted_5, [
342
- createElementVNode("span", _hoisted_6, toDisplayString(_ctx.modelValue ? _ctx.modelValue.length : 0), 1),
350
+ createElementVNode("span", _hoisted_6, toDisplayString(_ctx.getModelValue() ? _ctx.getModelValue().length : 0), 1),
343
351
  createTextVNode("/" + toDisplayString(_ctx.maxLength), 1)
344
352
  ])) : createCommentVNode("", true)
345
353
  ]),
@@ -356,7 +364,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
356
364
  }), null, 16, ["size", "width", "height"])
357
365
  ])
358
366
  ], 512)), [
359
- [vShow, (_ctx.active || _ctx.showClearIcon) && _ctx.modelValue.length > 0]
367
+ [vShow, (_ctx.active || _ctx.showClearIcon) && _ctx.getModelValue().length > 0]
360
368
  ]) : createCommentVNode("", true),
361
369
  createElementVNode("view", _hoisted_7, [
362
370
  renderSlot(_ctx.$slots, "right")
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { ref, reactive, computed, watch, toRefs, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, Fragment, renderList, renderSlot } from "vue";
20
+ import { ref, reactive, computed, watch, toRefs, openBlock, createElementBlock, normalizeStyle, createElementVNode, Fragment, renderList, renderSlot } from "vue";
21
21
  import { c as createComponent } from "./component-f86a70df.js";
22
22
  import { u as useRect } from "./index-29892cda.js";
23
23
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
@@ -47,7 +47,7 @@ function binarySearch(list, value, compareFunc) {
47
47
  }
48
48
  return tempIndex;
49
49
  }
50
- const { componentName, create } = createComponent("list");
50
+ const { create } = createComponent("list");
51
51
  const clientHeight = document.documentElement.clientHeight || document.body.clientHeight || 667;
52
52
  const _sfc_main = create({
53
53
  props: {
@@ -96,12 +96,6 @@ const _sfc_main = create({
96
96
  const end = computed(() => {
97
97
  return Math.min(state.originStartIndex + visibleCount.value + props.bufferSize, state.list.length);
98
98
  });
99
- const classes = computed(() => {
100
- const prefixCls = componentName;
101
- return {
102
- [prefixCls]: true
103
- };
104
- });
105
99
  const visibleData = computed(() => {
106
100
  return state.list.slice(state.start, end.value);
107
101
  });
@@ -229,7 +223,6 @@ const _sfc_main = create({
229
223
  actualContent,
230
224
  getTransform,
231
225
  visibleData,
232
- classes,
233
226
  getContainerHeight,
234
227
  handleScrollEvent
235
228
  });
@@ -238,7 +231,7 @@ const _sfc_main = create({
238
231
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
239
232
  return openBlock(), createElementBlock("div", {
240
233
  ref: "list",
241
- class: normalizeClass(_ctx.classes),
234
+ class: "nut-list",
242
235
  style: normalizeStyle({ height: `${_ctx.getContainerHeight}px` }),
243
236
  onScrollPassive: _cache[0] || (_cache[0] = (...args) => _ctx.handleScrollEvent && _ctx.handleScrollEvent(...args))
244
237
  }, [
@@ -264,7 +257,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
264
257
  ]);
265
258
  }), 128))
266
259
  ], 4)
267
- ], 38);
260
+ ], 36);
268
261
  }
269
262
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
270
263
  export {
@@ -17,13 +17,13 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { h, ref, reactive, computed, watch, onMounted, onActivated, onDeactivated, onUnmounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, withDirectives, normalizeStyle, createElementVNode, renderSlot, createBlock, createCommentVNode, createTextVNode, toDisplayString, withModifiers, vShow, Fragment, renderList } from "vue";
20
+ import { h, ref, reactive, computed, watch, onMounted, onActivated, onDeactivated, onUnmounted, toRefs, resolveComponent, openBlock, createElementBlock, withDirectives, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createBlock, createCommentVNode, createTextVNode, toDisplayString, withModifiers, vShow, Fragment, renderList } from "vue";
21
21
  import { Notice, CircleClose } from "@nutui/icons-vue";
22
22
  import { c as createComponent } from "./component-f86a70df.js";
23
23
  import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
24
24
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
25
25
  import "../locale/lang";
26
- const { componentName, create } = createComponent("noticebar");
26
+ const { create } = createComponent("noticebar");
27
27
  const _sfc_main = create({
28
28
  props: {
29
29
  // 滚动方向 across 横向 vertical 纵向
@@ -111,12 +111,6 @@ const _sfc_main = create({
111
111
  isCanScroll: null,
112
112
  showNotica: true
113
113
  });
114
- const classes = computed(() => {
115
- const prefixCls = componentName;
116
- return {
117
- [prefixCls]: true
118
- };
119
- });
120
114
  const isEllipsis = computed(() => {
121
115
  if (state.isCanScroll == null) {
122
116
  return props.wrapable;
@@ -308,9 +302,8 @@ const _sfc_main = create({
308
302
  onUnmounted(() => {
309
303
  clearInterval(state.timer);
310
304
  });
311
- return __spreadProps(__spreadValues(__spreadValues({}, toRefs(props)), toRefs(state)), {
305
+ return __spreadProps(__spreadValues({}, toRefs(state)), {
312
306
  isEllipsis,
313
- classes,
314
307
  barStyle,
315
308
  contentStyle,
316
309
  horseLampStyle,
@@ -327,21 +320,20 @@ const _sfc_main = create({
327
320
  });
328
321
  }
329
322
  });
330
- const _hoisted_1 = { class: "nut-noticebar__page-lefticon" };
331
- const _hoisted_2 = {
323
+ const _hoisted_1 = { class: "nut-noticebar" };
324
+ const _hoisted_2 = { class: "nut-noticebar__page-lefticon" };
325
+ const _hoisted_3 = {
332
326
  ref: "wrap",
333
327
  class: "nut-noticebar__page-wrap"
334
328
  };
335
- const _hoisted_3 = { class: "showNotica" };
336
- const _hoisted_4 = { class: "nut-noticebar-custom-item" };
337
- const _hoisted_5 = ["onClick"];
329
+ const _hoisted_4 = { class: "showNotica" };
330
+ const _hoisted_5 = { class: "nut-noticebar-custom-item" };
331
+ const _hoisted_6 = ["onClick"];
338
332
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
339
333
  const _component_Notice = resolveComponent("Notice");
340
334
  const _component_CircleClose = resolveComponent("CircleClose");
341
335
  const _component_ScrollItem = resolveComponent("ScrollItem");
342
- return openBlock(), createElementBlock("view", {
343
- class: normalizeClass(_ctx.classes)
344
- }, [
336
+ return openBlock(), createElementBlock("view", _hoisted_1, [
345
337
  _ctx.direction == "across" ? withDirectives((openBlock(), createElementBlock("view", {
346
338
  key: 0,
347
339
  class: normalizeClass(["nut-noticebar__page", {
@@ -352,7 +344,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
352
344
  style: normalizeStyle(_ctx.barStyle),
353
345
  onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
354
346
  }, [
355
- createElementVNode("view", _hoisted_1, [
347
+ createElementVNode("view", _hoisted_2, [
356
348
  renderSlot(_ctx.$slots, "left-icon", {}, () => [
357
349
  _ctx.leftIcon ? (openBlock(), createBlock(_component_Notice, {
358
350
  key: 0,
@@ -360,7 +352,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
360
352
  })) : createCommentVNode("", true)
361
353
  ])
362
354
  ]),
363
- createElementVNode("view", _hoisted_2, [
355
+ createElementVNode("view", _hoisted_3, [
364
356
  createElementVNode("view", {
365
357
  ref: "content",
366
358
  class: normalizeClass(_ctx.wrapContentClass),
@@ -393,7 +385,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
393
385
  class: "nut-noticebar__vertical-list",
394
386
  style: normalizeStyle(_ctx.horseLampStyle)
395
387
  }, [
396
- createElementVNode("div", _hoisted_3, [
388
+ createElementVNode("div", _hoisted_4, [
397
389
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scrollList, (item, index2) => {
398
390
  return openBlock(), createBlock(_component_ScrollItem, {
399
391
  key: index2,
@@ -403,7 +395,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
403
395
  }), 128))
404
396
  ])
405
397
  ], 4),
406
- createElementVNode("view", _hoisted_4, [
398
+ createElementVNode("view", _hoisted_5, [
407
399
  renderSlot(_ctx.$slots, "default")
408
400
  ])
409
401
  ], 64)) : (openBlock(), createElementBlock("ul", {
@@ -417,7 +409,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
417
409
  class: "nut-noticebar__vertical-item",
418
410
  style: normalizeStyle({ height: _ctx.pxCheck(_ctx.height), lineHeight: _ctx.pxCheck(_ctx.height) }),
419
411
  onClick: ($event) => _ctx.go(item)
420
- }, toDisplayString(item), 13, _hoisted_5);
412
+ }, toDisplayString(item), 13, _hoisted_6);
421
413
  }), 128))
422
414
  ], 4)),
423
415
  createElementVNode("view", {
@@ -433,7 +425,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
433
425
  ])
434
426
  ])
435
427
  ], 4)) : createCommentVNode("", true)
436
- ], 2);
428
+ ]);
437
429
  }
438
430
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
439
431
  export {
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { ref, computed, openBlock, createElementBlock, normalizeClass, Fragment, renderList, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent, createCommentVNode } from "vue";
20
+ import { ref, openBlock, createElementBlock, Fragment, renderList, normalizeStyle, createElementVNode, createBlock, resolveDynamicComponent, normalizeClass, createCommentVNode } from "vue";
21
21
  import { StarFillN } from "@nutui/icons-vue";
22
22
  import { c as createComponent } from "./component-f86a70df.js";
23
23
  import { r as renderIcon } from "./renderIcon-3d0fd47c.js";
@@ -25,7 +25,7 @@ import { p as pxCheck } from "./pxCheck-c6b9f6b7.js";
25
25
  import { u as useTouch } from "./index-7a7385e4.js";
26
26
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
27
27
  import "../locale/lang";
28
- const { create, componentName } = createComponent("rate");
28
+ const { create } = createComponent("rate");
29
29
  const _sfc_main = create({
30
30
  props: {
31
31
  count: {
@@ -79,12 +79,6 @@ const _sfc_main = create({
79
79
  emits: ["update:modelValue", "change"],
80
80
  setup(props, { emit, slots }) {
81
81
  const rateRefs = ref([]);
82
- const classes = computed(() => {
83
- const prefixCls = componentName;
84
- return {
85
- [prefixCls]: true
86
- };
87
- });
88
82
  const updateVal = (value) => {
89
83
  emit("update:modelValue", value);
90
84
  emit("change", value);
@@ -138,9 +132,7 @@ const _sfc_main = create({
138
132
  }
139
133
  };
140
134
  const refRandomId = Math.random().toString(36).slice(-8);
141
- return __spreadProps(__spreadValues({
142
- classes
143
- }, touchMethods), {
135
+ return __spreadProps(__spreadValues({}, touchMethods), {
144
136
  onClick,
145
137
  pxCheck,
146
138
  rateRefs,
@@ -162,7 +154,7 @@ const _hoisted_4 = {
162
154
  };
163
155
  function render(_ctx, _cache, $props, $setup, $data, $options) {
164
156
  return openBlock(), createElementBlock("view", {
165
- class: normalizeClass(_ctx.classes),
157
+ class: "nut-rate",
166
158
  onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args)),
167
159
  onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args))
168
160
  }, [
@@ -194,7 +186,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
194
186
  ])) : createCommentVNode("", true)
195
187
  ], 12, _hoisted_1);
196
188
  }), 128))
197
- ], 34);
189
+ ], 32);
198
190
  }
199
191
  const Rate = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", render]]);
200
192
  export {
@@ -17,11 +17,11 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { ref, reactive, computed, onMounted, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot } from "vue";
20
+ import { ref, reactive, onMounted, toRefs, openBlock, createElementBlock, createElementVNode, renderSlot } from "vue";
21
21
  import { c as createComponent } from "./component-f86a70df.js";
22
22
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
23
23
  import "../locale/lang";
24
- const { componentName, create } = createComponent("side-navbar");
24
+ const { create } = createComponent("side-navbar");
25
25
  const _sfc_main = create({
26
26
  props: {
27
27
  offset: {
@@ -35,12 +35,6 @@ const _sfc_main = create({
35
35
  count: 1,
36
36
  observer: null
37
37
  });
38
- const classes = computed(() => {
39
- const prefixCls = componentName;
40
- return {
41
- [prefixCls]: true
42
- };
43
- });
44
38
  const setPaddingLeft = (nodeList, level = 1) => {
45
39
  var _a;
46
40
  for (let i = 0; i < nodeList.length; i++) {
@@ -77,26 +71,24 @@ const _sfc_main = create({
77
71
  });
78
72
  });
79
73
  return __spreadProps(__spreadValues({}, toRefs(state)), {
80
- list,
81
- classes
74
+ list
82
75
  });
83
76
  }
84
77
  });
85
- const _hoisted_1 = { class: "nut-side-navbar__content" };
86
- const _hoisted_2 = {
78
+ const _hoisted_1 = { class: "nut-side-navbar" };
79
+ const _hoisted_2 = { class: "nut-side-navbar__content" };
80
+ const _hoisted_3 = {
87
81
  ref: "list",
88
82
  class: "nut-side-navbar__content__list"
89
83
  };
90
84
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
91
- return openBlock(), createElementBlock("view", {
92
- class: normalizeClass(_ctx.classes)
93
- }, [
94
- createElementVNode("view", _hoisted_1, [
95
- createElementVNode("view", _hoisted_2, [
85
+ return openBlock(), createElementBlock("view", _hoisted_1, [
86
+ createElementVNode("view", _hoisted_2, [
87
+ createElementVNode("view", _hoisted_3, [
96
88
  renderSlot(_ctx.$slots, "default")
97
89
  ], 512)
98
90
  ])
99
- ], 2);
91
+ ]);
100
92
  }
101
93
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
102
94
  export {
@@ -1,8 +1,8 @@
1
- import { computed, openBlock, createElementBlock, normalizeClass, withModifiers, createElementVNode, toDisplayString } from "vue";
2
1
  import { c as createComponent } from "./component-f86a70df.js";
2
+ import { openBlock, createElementBlock, withModifiers, createElementVNode, toDisplayString } from "vue";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
4
4
  import "../locale/lang";
5
- const { componentName, create } = createComponent("side-navbar-item");
5
+ const { create } = createComponent("side-navbar-item");
6
6
  const _sfc_main = create({
7
7
  props: {
8
8
  title: {
@@ -15,18 +15,11 @@ const _sfc_main = create({
15
15
  }
16
16
  },
17
17
  emits: ["click"],
18
- setup: (props, context) => {
19
- const classes = computed(() => {
20
- const prefixCls = componentName;
21
- return {
22
- [prefixCls]: true
23
- };
24
- });
18
+ setup: (props, { emit }) => {
25
19
  const handleClick = () => {
26
- context.emit("click");
20
+ emit("click");
27
21
  };
28
22
  return {
29
- classes,
30
23
  handleClick
31
24
  };
32
25
  }
@@ -35,12 +28,12 @@ const _hoisted_1 = ["ikey"];
35
28
  const _hoisted_2 = { class: "nut-side-navbar-item__title" };
36
29
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
37
30
  return openBlock(), createElementBlock("view", {
38
- class: normalizeClass(_ctx.classes),
31
+ class: "nut-side-navbar-item",
39
32
  ikey: _ctx.ikey,
40
33
  onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["stop"]))
41
34
  }, [
42
35
  createElementVNode("span", _hoisted_2, toDisplayString(_ctx.title), 1)
43
- ], 10, _hoisted_1);
36
+ ], 8, _hoisted_1);
44
37
  }
45
38
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
46
39
  export {
@@ -1,28 +1,9 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
1
  import { resolveComponent, openBlock, createElementBlock, createElementVNode, renderSlot, createBlock, createCommentVNode, toDisplayString, ref, watch, onMounted, Fragment, renderList, normalizeClass, createVNode, withCtx, createSlots } from "vue";
21
2
  import Price from "./Price.js";
22
3
  import { c as createComponent, T as TypeOfFun } from "./component-f86a70df.js";
23
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
24
5
  import InputNumber from "./InputNumber.js";
25
- import { p as popupProps, P as Popup } from "./index-5a1e6d22.js";
6
+ import { P as Popup } from "./index-5a1e6d22.js";
26
7
  import "../locale/lang";
27
8
  import "./pxCheck-c6b9f6b7.js";
28
9
  import "@nutui/icons-vue";
@@ -312,7 +293,11 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
312
293
  const SkuOperate = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
313
294
  const { create, translate } = createComponent("sku");
314
295
  const _sfc_main = create({
315
- props: __spreadProps(__spreadValues({}, popupProps), {
296
+ props: {
297
+ visible: {
298
+ type: Boolean,
299
+ default: false
300
+ },
316
301
  sku: {
317
302
  type: Array,
318
303
  default: []
@@ -364,8 +349,12 @@ const _sfc_main = create({
364
349
  confirmText: {
365
350
  type: String,
366
351
  default: ""
352
+ },
353
+ lockScroll: {
354
+ type: Boolean,
355
+ default: true
367
356
  }
368
- }),
357
+ },
369
358
  emits: [
370
359
  "update:visible",
371
360
  "selectSku",
@@ -402,8 +391,6 @@ const _sfc_main = create({
402
391
  }
403
392
  }
404
393
  );
405
- onMounted(() => {
406
- });
407
394
  const getSlots = (name) => slots[name];
408
395
  const selectSku = (skus) => {
409
396
  emit("selectSku", skus);
@@ -472,8 +459,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
472
459
  round: "",
473
460
  style: { "height": "75%" },
474
461
  "lock-scroll": _ctx.lockScroll,
475
- "teleport-disable": _ctx.teleportDisable,
476
- teleport: _ctx.teleport,
462
+ "catch-move": _ctx.lockScroll,
477
463
  onClickCloseIcon: _cache[1] || (_cache[1] = ($event) => _ctx.closePopup("icon")),
478
464
  onClickOverlay: _cache[2] || (_cache[2] = ($event) => _ctx.closePopup("overlay")),
479
465
  onClose: _cache[3] || (_cache[3] = ($event) => _ctx.closePopup("close"))
@@ -524,8 +510,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
524
510
  renderSlot(_ctx.$slots, "sku-stepper-bottom")
525
511
  ]),
526
512
  createVNode(_component_sku_operate, {
527
- "btn-options": _ctx.btnOptions,
528
513
  "btn-extra-text": _ctx.btnExtraText,
514
+ "btn-options": _ctx.btnOptions,
529
515
  "buy-text": _ctx.buyText || _ctx.translate("buyNow"),
530
516
  "add-cart-text": _ctx.addCartText || _ctx.translate("addToCart"),
531
517
  "confirm-text": _ctx.confirmText || _ctx.translate("confirm"),
@@ -538,11 +524,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
538
524
  ]),
539
525
  key: "0"
540
526
  } : void 0
541
- ]), 1032, ["btn-options", "btn-extra-text", "buy-text", "add-cart-text", "confirm-text", "onClickBtnOperate"])
527
+ ]), 1032, ["btn-extra-text", "btn-options", "buy-text", "add-cart-text", "confirm-text", "onClickBtnOperate"])
542
528
  ])
543
529
  ]),
544
530
  _: 3
545
- }, 8, ["visible", "lock-scroll", "teleport-disable", "teleport"]);
531
+ }, 8, ["visible", "lock-scroll", "catch-move"]);
546
532
  }
547
533
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
548
534
  export {
@@ -17,12 +17,12 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { reactive, computed, onMounted, toRefs, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, toDisplayString, createBlock, withDirectives, normalizeStyle, renderSlot, vShow } from "vue";
20
+ import { reactive, computed, onMounted, toRefs, resolveComponent, openBlock, createElementBlock, createElementVNode, withModifiers, toDisplayString, createBlock, withDirectives, normalizeClass, normalizeStyle, renderSlot, vShow } from "vue";
21
21
  import { c as createComponent } from "./component-f86a70df.js";
22
22
  import { ArrowDown2, ArrowUp2 } from "@nutui/icons-vue";
23
23
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
24
24
  import "../locale/lang";
25
- const { componentName, create } = createComponent("sub-side-navbar");
25
+ const { create } = createComponent("sub-side-navbar");
26
26
  const _sfc_main = create({
27
27
  props: {
28
28
  title: {
@@ -40,30 +40,23 @@ const _sfc_main = create({
40
40
  },
41
41
  components: { ArrowDown2, ArrowUp2 },
42
42
  emits: ["titleClick"],
43
- setup: (props, context) => {
43
+ setup: (props, { emit }) => {
44
44
  const state = reactive({
45
45
  direction: ""
46
46
  });
47
- const classes = computed(() => {
48
- const prefixCls = componentName;
49
- return {
50
- [prefixCls]: true
51
- };
52
- });
53
47
  const style = computed(() => {
54
48
  return {
55
49
  height: !state.direction ? "auto" : "0px"
56
50
  };
57
51
  });
58
52
  const handleClick = () => {
59
- context.emit("titleClick");
53
+ emit("titleClick");
60
54
  state.direction = !state.direction ? "up" : "";
61
55
  };
62
56
  onMounted(() => {
63
57
  state.direction = props.open ? "" : "up";
64
58
  });
65
59
  return __spreadProps(__spreadValues({}, toRefs(state)), {
66
- classes,
67
60
  style,
68
61
  handleClick
69
62
  });
@@ -76,7 +69,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
76
69
  const _component_ArrowDown2 = resolveComponent("ArrowDown2");
77
70
  const _component_ArrowUp2 = resolveComponent("ArrowUp2");
78
71
  return openBlock(), createElementBlock("view", {
79
- class: normalizeClass(_ctx.classes),
72
+ class: "nut-sub-side-navbar",
80
73
  ikey: _ctx.ikey
81
74
  }, [
82
75
  createElementVNode("view", {
@@ -96,7 +89,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
96
89
  ], 6), [
97
90
  [vShow, !_ctx.direction]
98
91
  ])
99
- ], 10, _hoisted_1);
92
+ ], 8, _hoisted_1);
100
93
  }
101
94
  const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
102
95
  export {
@@ -1,4 +1,4 @@
1
- import { ref, reactive, computed, provide, onDeactivated, onBeforeUnmount, watch, nextTick, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode } from "vue";
1
+ import { ref, reactive, computed, provide, onDeactivated, onBeforeUnmount, watch, nextTick, openBlock, createElementBlock, createElementVNode, normalizeClass, normalizeStyle, renderSlot, Fragment, renderList, createCommentVNode } from "vue";
2
2
  import { c as createComponent, e as clamp } from "./component-f86a70df.js";
3
3
  import { u as useTouch } from "./index-7a7385e4.js";
4
4
  import { u as useExpose } from "./index-79c5dc33.js";
@@ -76,12 +76,6 @@ const _sfc_main = create({
76
76
  style: {}
77
77
  });
78
78
  const touch = useTouch();
79
- const classes = computed(() => {
80
- const prefixCls = componentName;
81
- return {
82
- [prefixCls]: true
83
- };
84
- });
85
79
  const isVertical = computed(() => props.direction === "vertical");
86
80
  const classesInner = computed(() => {
87
81
  const prefixCls = componentName;
@@ -342,6 +336,14 @@ const _sfc_main = create({
342
336
  });
343
337
  }
344
338
  );
339
+ watch(
340
+ () => props.height,
341
+ () => {
342
+ nextTick(() => {
343
+ init();
344
+ });
345
+ }
346
+ );
345
347
  watch(
346
348
  () => state.children.length,
347
349
  () => {
@@ -358,7 +360,6 @@ const _sfc_main = create({
358
360
  );
359
361
  return {
360
362
  state,
361
- classes,
362
363
  classesInner,
363
364
  classesPagination,
364
365
  container,
@@ -372,7 +373,7 @@ const _sfc_main = create({
372
373
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
373
374
  return openBlock(), createElementBlock("view", {
374
375
  ref: "container",
375
- class: normalizeClass(_ctx.classes),
376
+ class: "nut-swiper",
376
377
  onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.onTouchStart && _ctx.onTouchStart(...args)),
377
378
  onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.onTouchMove && _ctx.onTouchMove(...args)),
378
379
  onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args)),
@@ -399,7 +400,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
399
400
  }, null, 6);
400
401
  }), 128))
401
402
  ], 2)) : createCommentVNode("", true)
402
- ], 34);
403
+ ], 544);
403
404
  }
404
405
  const Swiper = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
405
406
  export {