@nutui/nutui 3.1.16-beta.1 → 3.1.17

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 (122) hide show
  1. package/CHANGELOG.md +59 -1
  2. package/dist/nutui.d.ts +3 -1
  3. package/dist/nutui.es.js +1759 -689
  4. package/dist/nutui.umd.js +1765 -690
  5. package/dist/packages/_es/ActionSheet.js +2 -2
  6. package/dist/packages/_es/Address.js +60 -7
  7. package/dist/packages/_es/Audio.js +289 -0
  8. package/dist/packages/_es/Avatar.js +1 -1
  9. package/dist/packages/_es/BackTop.js +1 -1
  10. package/dist/packages/_es/Badge.js +1 -1
  11. package/dist/packages/_es/Barrage.js +1 -1
  12. package/dist/packages/_es/Button.js +13 -4
  13. package/dist/packages/_es/Calendar.js +428 -209
  14. package/dist/packages/_es/Card.js +1 -2
  15. package/dist/packages/_es/Cascader.js +2 -2
  16. package/dist/packages/_es/Cell.js +1 -1
  17. package/dist/packages/_es/CellGroup.js +1 -1
  18. package/dist/packages/_es/Checkbox.js +2 -2
  19. package/dist/packages/_es/CheckboxGroup.js +1 -1
  20. package/dist/packages/_es/CircleProgress.js +1 -1
  21. package/dist/packages/_es/Col.js +1 -1
  22. package/dist/packages/_es/Collapse.js +1 -1
  23. package/dist/packages/_es/CollapseItem.js +1 -1
  24. package/dist/packages/_es/CountDown.js +1 -1
  25. package/dist/packages/_es/CountUp.js +1 -1
  26. package/dist/packages/_es/DatePicker.js +1 -2
  27. package/dist/packages/_es/Dialog.js +1 -1
  28. package/dist/packages/_es/Divider.js +1 -1
  29. package/dist/packages/_es/Drag.js +1 -1
  30. package/dist/packages/_es/Elevator.js +10 -5
  31. package/dist/packages/_es/Empty.js +1 -1
  32. package/dist/packages/_es/FixedNav.js +1 -1
  33. package/dist/packages/_es/Form.js +1 -1
  34. package/dist/packages/_es/FormItem.js +1 -1
  35. package/dist/packages/_es/Grid.js +1 -1
  36. package/dist/packages/_es/GridItem.js +1 -1
  37. package/dist/packages/_es/Icon.js +1 -1
  38. package/dist/packages/_es/ImagePreview.js +1 -3
  39. package/dist/packages/_es/Indicator.js +1 -1
  40. package/dist/packages/_es/InfiniteLoading.js +1 -1
  41. package/dist/packages/_es/Input.js +7 -2
  42. package/dist/packages/_es/InputNumber.js +1 -1
  43. package/dist/packages/_es/Layout.js +1 -1
  44. package/dist/packages/_es/Menu.js +2 -2
  45. package/dist/packages/_es/MenuItem.js +1 -1
  46. package/dist/packages/_es/Navbar.js +1 -1
  47. package/dist/packages/_es/NoticeBar.js +1 -4
  48. package/dist/packages/_es/Notify.js +1 -1
  49. package/dist/packages/_es/NumberKeyboard.js +1 -2
  50. package/dist/packages/_es/OverLay.js +1 -1
  51. package/dist/packages/_es/Pagination.js +1 -1
  52. package/dist/packages/_es/Picker.js +1 -1
  53. package/dist/packages/_es/Popover.js +1 -1
  54. package/dist/packages/_es/Popup.js +1 -1
  55. package/dist/packages/_es/Price.js +2 -2
  56. package/dist/packages/_es/Progress.js +24 -11
  57. package/dist/packages/_es/Radio.js +2 -2
  58. package/dist/packages/_es/RadioGroup.js +1 -1
  59. package/dist/packages/_es/Range.js +3 -3
  60. package/dist/packages/_es/Rate.js +1 -1
  61. package/dist/packages/_es/Row.js +1 -1
  62. package/dist/packages/_es/SearchBar.js +1 -1
  63. package/dist/packages/_es/ShortPassword.js +5 -2
  64. package/dist/packages/_es/SideNavBar.js +1 -1
  65. package/dist/packages/_es/SideNavBarItem.js +1 -1
  66. package/dist/packages/_es/Signature.js +1 -1
  67. package/dist/packages/_es/Skeleton.js +8 -6
  68. package/dist/packages/_es/Sku.js +1 -1
  69. package/dist/packages/_es/Step.js +1 -1
  70. package/dist/packages/_es/Steps.js +1 -1
  71. package/dist/packages/_es/Sticky.js +143 -0
  72. package/dist/packages/_es/SubSideNavBar.js +1 -1
  73. package/dist/packages/_es/Swipe.js +2 -2
  74. package/dist/packages/_es/Swiper.js +1 -1
  75. package/dist/packages/_es/SwiperItem.js +3 -8
  76. package/dist/packages/_es/Switch.js +2 -2
  77. package/dist/packages/_es/TabPane.js +1 -1
  78. package/dist/packages/_es/Tabbar.js +1 -1
  79. package/dist/packages/_es/TabbarItem.js +1 -1
  80. package/dist/packages/_es/Table.js +2 -2
  81. package/dist/packages/_es/Tabs.js +1 -1
  82. package/dist/packages/_es/Tag.js +1 -1
  83. package/dist/packages/_es/TextArea.js +1 -1
  84. package/dist/packages/_es/TimeDetail.js +1 -1
  85. package/dist/packages/_es/TimePannel.js +1 -1
  86. package/dist/packages/_es/TimeSelect.js +1 -1
  87. package/dist/packages/_es/Toast.js +1 -1
  88. package/dist/packages/_es/Uploader.js +1 -1
  89. package/dist/packages/_es/Video.js +1 -55
  90. package/dist/packages/_es/common.js +1 -1
  91. package/dist/packages/_es/component.js +1 -1
  92. package/dist/packages/_es/index.js +1 -1
  93. package/dist/packages/_es/index2.js +28 -56
  94. package/dist/packages/_es/index3.js +56 -28
  95. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  96. package/dist/packages/_es/pxCheck.js +1 -1
  97. package/dist/packages/_es/raf.js +1 -1
  98. package/dist/packages/_es/util.js +1 -1
  99. package/dist/packages/address/index.scss +8 -0
  100. package/dist/packages/audio/index.scss +66 -0
  101. package/dist/packages/audiooperate/index.scss +13 -0
  102. package/dist/packages/calendar/index.scss +47 -41
  103. package/dist/packages/calendaritem/index.scss +57 -42
  104. package/dist/packages/elevator/index.scss +3 -0
  105. package/dist/packages/infiniteloading/index.scss +1 -1
  106. package/dist/packages/input/index.scss +4 -2
  107. package/dist/packages/range/index.scss +4 -4
  108. package/dist/packages/row/index.scss +3 -0
  109. package/dist/packages/sticky/index.scss +5 -0
  110. package/dist/packages/tabbar/index.scss +4 -2
  111. package/dist/style.css +1 -1
  112. package/dist/styles/font/config.json +6 -1
  113. package/dist/styles/font/demo_index.html +118 -3
  114. package/dist/styles/font/iconfont.css +23 -3
  115. package/dist/styles/font/iconfont.js +25 -24
  116. package/dist/styles/font/iconfont.json +35 -0
  117. package/dist/styles/font/iconfont.ttf +0 -0
  118. package/dist/styles/font/iconfont.woff +0 -0
  119. package/dist/styles/font/iconfont.woff2 +0 -0
  120. package/dist/styles/themes/default.scss +43 -40
  121. package/dist/styles/variables.scss +34 -31
  122. package/package.json +12 -13
package/dist/nutui.umd.js CHANGED
@@ -35,7 +35,7 @@ var __publicField = (obj, key, value) => {
35
35
  return value;
36
36
  };
37
37
  /*!
38
- * @nutui/nutui v3.1.16-beta.1 Thu Jan 27 2022 18:18:28 GMT+0800 (中国标准时间)
38
+ * @nutui/nutui v3.1.16 Fri Feb 25 2022 18:32:11 GMT+0800 (中国标准时间)
39
39
  * (c) 2021 @jdf2e.
40
40
  * Released under the MIT License.
41
41
  */
@@ -69,8 +69,8 @@ var __publicField = (obj, key, value) => {
69
69
  }
70
70
  return target;
71
71
  };
72
- const { componentName: componentName$14, create: create$1p } = createComponent("avatar");
73
- const _sfc_main$1p = create$1p({
72
+ const { componentName: componentName$18, create: create$1t } = createComponent("avatar");
73
+ const _sfc_main$1t = create$1t({
74
74
  props: {
75
75
  size: {
76
76
  type: String,
@@ -94,7 +94,7 @@ var __publicField = (obj, key, value) => {
94
94
  const { size, shape, bgColor, icon } = vue.toRefs(props);
95
95
  const sizeValue = ["large", "normal", "small"];
96
96
  const classes = vue.computed(() => {
97
- const prefixCls = componentName$14;
97
+ const prefixCls = componentName$18;
98
98
  return {
99
99
  [prefixCls]: true,
100
100
  ["avatar-" + size.value]: true,
@@ -126,11 +126,11 @@ var __publicField = (obj, key, value) => {
126
126
  };
127
127
  }
128
128
  });
129
- const _hoisted_1$$ = {
129
+ const _hoisted_1$12 = {
130
130
  key: 0,
131
131
  class: "text"
132
132
  };
133
- function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
133
+ function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) {
134
134
  const _component_nut_icon = vue.resolveComponent("nut-icon");
135
135
  return vue.openBlock(), vue.createElementBlock("view", {
136
136
  style: vue.normalizeStyle(_ctx.styles),
@@ -141,17 +141,17 @@ var __publicField = (obj, key, value) => {
141
141
  class: "icon",
142
142
  name: _ctx.iconStyles
143
143
  }, null, 8, ["name"]),
144
- _ctx.isShowText ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$$, [
144
+ _ctx.isShowText ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$12, [
145
145
  vue.renderSlot(_ctx.$slots, "default")
146
146
  ])) : vue.createCommentVNode("", true)
147
147
  ], 6);
148
148
  }
149
- var Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1h]]);
149
+ var Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1k]]);
150
150
  const pxCheck = (value) => {
151
151
  return isNaN(Number(value)) ? String(value) : `${value}px`;
152
152
  };
153
- const { componentName: componentName$13, create: create$1o } = createComponent("icon");
154
- const _sfc_main$1o = create$1o({
153
+ const { componentName: componentName$17, create: create$1s } = createComponent("icon");
154
+ const _sfc_main$1s = create$1s({
155
155
  props: {
156
156
  name: { type: String, default: "" },
157
157
  size: { type: [String, Number], default: "" },
@@ -172,7 +172,7 @@ var __publicField = (obj, key, value) => {
172
172
  var _a;
173
173
  const _isImage = isImage();
174
174
  return vue.h(_isImage ? "img" : props.tag, {
175
- class: _isImage ? `${componentName$13}__img` : `${props.fontClassName} ${componentName$13} ${props.classPrefix}-${props.name}`,
175
+ class: _isImage ? `${componentName$17}__img` : `${props.fontClassName} ${componentName$17} ${props.classPrefix}-${props.name}`,
176
176
  style: {
177
177
  color: props.color,
178
178
  fontSize: pxCheck(props.size),
@@ -185,10 +185,10 @@ var __publicField = (obj, key, value) => {
185
185
  };
186
186
  }
187
187
  });
188
- const { componentName: componentName$12, create: create$1n } = createComponent("button");
189
- const _sfc_main$1n = create$1n({
188
+ const { componentName: componentName$16, create: create$1r } = createComponent("button");
189
+ const _sfc_main$1r = create$1r({
190
190
  components: {
191
- [_sfc_main$1o.name]: _sfc_main$1o
191
+ [_sfc_main$1s.name]: _sfc_main$1s
192
192
  },
193
193
  props: {
194
194
  color: String,
@@ -223,6 +223,14 @@ var __publicField = (obj, key, value) => {
223
223
  icon: {
224
224
  type: String,
225
225
  default: ""
226
+ },
227
+ iconClassPrefix: {
228
+ type: String,
229
+ default: "nut-icon"
230
+ },
231
+ iconFontClassName: {
232
+ type: String,
233
+ default: "nutui-iconfont"
226
234
  }
227
235
  },
228
236
  emits: ["click"],
@@ -234,7 +242,7 @@ var __publicField = (obj, key, value) => {
234
242
  }
235
243
  };
236
244
  const classes = vue.computed(() => {
237
- const prefixCls = componentName$12;
245
+ const prefixCls = componentName$16;
238
246
  return {
239
247
  [prefixCls]: true,
240
248
  [`${prefixCls}--${type.value}`]: type.value,
@@ -270,24 +278,25 @@ var __publicField = (obj, key, value) => {
270
278
  };
271
279
  }
272
280
  });
273
- const _hoisted_1$_ = { class: "nut-button__warp" };
274
- function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
281
+ const _hoisted_1$11 = { class: "nut-button__warp" };
282
+ function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) {
275
283
  const _component_nut_icon = vue.resolveComponent("nut-icon");
276
284
  return vue.openBlock(), vue.createElementBlock("view", {
277
285
  class: vue.normalizeClass(_ctx.classes),
278
286
  style: vue.normalizeStyle(_ctx.getStyle),
279
287
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
280
288
  }, [
281
- vue.createElementVNode("view", _hoisted_1$_, [
289
+ vue.createElementVNode("view", _hoisted_1$11, [
282
290
  _ctx.loading ? (vue.openBlock(), vue.createBlock(_component_nut_icon, {
283
291
  key: 0,
284
292
  class: "nut-icon-loading"
285
293
  })) : vue.createCommentVNode("", true),
286
294
  _ctx.icon && !_ctx.loading ? (vue.openBlock(), vue.createBlock(_component_nut_icon, {
287
295
  key: 1,
288
- class: vue.normalizeClass(_ctx.icon),
289
- name: _ctx.icon
290
- }, null, 8, ["class", "name"])) : vue.createCommentVNode("", true),
296
+ name: _ctx.icon,
297
+ "class-prefix": _ctx.iconClassPrefix,
298
+ "font-class-name": _ctx.iconFontClassName
299
+ }, null, 8, ["name", "class-prefix", "font-class-name"])) : vue.createCommentVNode("", true),
291
300
  _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("view", {
292
301
  key: 2,
293
302
  class: vue.normalizeClass({ text: _ctx.icon || _ctx.loading })
@@ -297,9 +306,9 @@ var __publicField = (obj, key, value) => {
297
306
  ])
298
307
  ], 6);
299
308
  }
300
- var Button = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1g]]);
301
- const { componentName: componentName$11, create: create$1m } = createComponent("cell");
302
- const _sfc_main$1m = create$1m({
309
+ var Button = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1j]]);
310
+ const { componentName: componentName$15, create: create$1q } = createComponent("cell");
311
+ const _sfc_main$1q = create$1q({
303
312
  props: {
304
313
  title: { type: String, default: "" },
305
314
  subTitle: { type: String, default: "" },
@@ -315,7 +324,7 @@ var __publicField = (obj, key, value) => {
315
324
  emits: ["click"],
316
325
  setup(props, { emit }) {
317
326
  const classes = vue.computed(() => {
318
- const prefixCls = componentName$11;
327
+ const prefixCls = componentName$15;
319
328
  return {
320
329
  [prefixCls]: true,
321
330
  [`${prefixCls}--clickable`]: props.isLink || props.to
@@ -342,9 +351,9 @@ var __publicField = (obj, key, value) => {
342
351
  };
343
352
  }
344
353
  });
345
- const _hoisted_1$Z = { class: "title" };
346
- const _hoisted_2$O = { class: "nut-cell__title-desc" };
347
- function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
354
+ const _hoisted_1$10 = { class: "title" };
355
+ const _hoisted_2$Q = { class: "nut-cell__title-desc" };
356
+ function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) {
348
357
  const _component_nut_icon = vue.resolveComponent("nut-icon");
349
358
  return vue.openBlock(), vue.createElementBlock("view", {
350
359
  class: vue.normalizeClass(_ctx.classes),
@@ -362,8 +371,8 @@ var __publicField = (obj, key, value) => {
362
371
  name: _ctx.icon
363
372
  }, null, 8, ["name"])) : vue.createCommentVNode("", true),
364
373
  _ctx.subTitle ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
365
- vue.createElementVNode("view", _hoisted_1$Z, vue.toDisplayString(_ctx.title), 1),
366
- vue.createElementVNode("view", _hoisted_2$O, vue.toDisplayString(_ctx.subTitle), 1)
374
+ vue.createElementVNode("view", _hoisted_1$10, vue.toDisplayString(_ctx.title), 1),
375
+ vue.createElementVNode("view", _hoisted_2$Q, vue.toDisplayString(_ctx.subTitle), 1)
367
376
  ], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
368
377
  vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
369
378
  ], 64))
@@ -381,16 +390,16 @@ var __publicField = (obj, key, value) => {
381
390
  ])
382
391
  ], 6);
383
392
  }
384
- var Cell = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1f]]);
385
- const { componentName: componentName$10, create: create$1l } = createComponent("cell-group");
386
- const _sfc_main$1l = create$1l({
393
+ var Cell = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1i]]);
394
+ const { componentName: componentName$14, create: create$1p } = createComponent("cell-group");
395
+ const _sfc_main$1p = create$1p({
387
396
  props: {
388
397
  title: { type: String, default: "" },
389
398
  desc: { type: String, default: "" }
390
399
  },
391
400
  setup() {
392
401
  const classes = vue.computed(() => {
393
- const prefixCls = componentName$10;
402
+ const prefixCls = componentName$14;
394
403
  return {
395
404
  [prefixCls]: true
396
405
  };
@@ -400,29 +409,29 @@ var __publicField = (obj, key, value) => {
400
409
  };
401
410
  }
402
411
  });
403
- const _hoisted_1$Y = {
412
+ const _hoisted_1$$ = {
404
413
  key: 1,
405
414
  class: "nut-cell-group__title"
406
415
  };
407
- const _hoisted_2$N = {
416
+ const _hoisted_2$P = {
408
417
  key: 3,
409
418
  class: "nut-cell-group__desc"
410
419
  };
411
- const _hoisted_3$B = { class: "nut-cell-group__warp" };
412
- function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
420
+ const _hoisted_3$D = { class: "nut-cell-group__warp" };
421
+ function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) {
413
422
  return vue.openBlock(), vue.createElementBlock("view", {
414
423
  class: vue.normalizeClass(_ctx.classes)
415
424
  }, [
416
- _ctx.$slots.title ? vue.renderSlot(_ctx.$slots, "title", { key: 0 }) : _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$Y, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true),
417
- _ctx.$slots.desc ? vue.renderSlot(_ctx.$slots, "desc", { key: 2 }) : _ctx.desc ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$N, vue.toDisplayString(_ctx.desc), 1)) : vue.createCommentVNode("", true),
418
- vue.createElementVNode("view", _hoisted_3$B, [
425
+ _ctx.$slots.title ? vue.renderSlot(_ctx.$slots, "title", { key: 0 }) : _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$$, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true),
426
+ _ctx.$slots.desc ? vue.renderSlot(_ctx.$slots, "desc", { key: 2 }) : _ctx.desc ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$P, vue.toDisplayString(_ctx.desc), 1)) : vue.createCommentVNode("", true),
427
+ vue.createElementVNode("view", _hoisted_3$D, [
419
428
  vue.renderSlot(_ctx.$slots, "default")
420
429
  ])
421
430
  ], 2);
422
431
  }
423
- var CellGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1e]]);
424
- const { componentName: componentName$$, create: create$1k } = createComponent("price");
425
- const _sfc_main$1k = create$1k({
432
+ var CellGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1h]]);
433
+ const { componentName: componentName$13, create: create$1o } = createComponent("price");
434
+ const _sfc_main$1o = create$1o({
426
435
  props: {
427
436
  price: {
428
437
  type: [Number, String],
@@ -437,7 +446,7 @@ var __publicField = (obj, key, value) => {
437
446
  default: "¥"
438
447
  },
439
448
  decimalDigits: {
440
- type: Number,
449
+ type: [Number, String],
441
450
  default: 2
442
451
  },
443
452
  thousands: {
@@ -456,7 +465,7 @@ var __publicField = (obj, key, value) => {
456
465
  setup(props) {
457
466
  const classes = vue.computed(() => {
458
467
  return {
459
- [componentName$$]: true
468
+ [componentName$13]: true
460
469
  };
461
470
  });
462
471
  const showSymbol = vue.computed(() => {
@@ -505,9 +514,9 @@ var __publicField = (obj, key, value) => {
505
514
  };
506
515
  }
507
516
  });
508
- const _hoisted_1$X = ["innerHTML"];
509
- const _hoisted_2$M = ["innerHTML"];
510
- function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
517
+ const _hoisted_1$_ = ["innerHTML"];
518
+ const _hoisted_2$O = ["innerHTML"];
519
+ function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) {
511
520
  return vue.openBlock(), vue.createElementBlock("view", {
512
521
  class: vue.normalizeClass(_ctx.classes)
513
522
  }, [
@@ -515,7 +524,7 @@ var __publicField = (obj, key, value) => {
515
524
  key: 0,
516
525
  class: vue.normalizeClass(["nut-price--symbol", `nut-price--symbol-${_ctx.size}`]),
517
526
  innerHTML: _ctx.showSymbol
518
- }, null, 10, _hoisted_1$X)) : vue.createCommentVNode("", true),
527
+ }, null, 10, _hoisted_1$_)) : vue.createCommentVNode("", true),
519
528
  vue.createElementVNode("view", {
520
529
  class: vue.normalizeClass(`nut-price--${_ctx.size}`)
521
530
  }, vue.toDisplayString(_ctx.formatThousands(_ctx.price)), 3),
@@ -530,11 +539,11 @@ var __publicField = (obj, key, value) => {
530
539
  key: 2,
531
540
  class: vue.normalizeClass(["nut-price--symbol", `nut-price--symbol-${_ctx.size}`]),
532
541
  innerHTML: _ctx.showSymbol
533
- }, null, 10, _hoisted_2$M)) : vue.createCommentVNode("", true)
542
+ }, null, 10, _hoisted_2$O)) : vue.createCommentVNode("", true)
534
543
  ], 2);
535
544
  }
536
- var Price = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1d]]);
537
- const { componentName: componentName$_, create: create$1j } = createComponent("overlay");
545
+ var Price = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1g]]);
546
+ const { componentName: componentName$12, create: create$1n } = createComponent("overlay");
538
547
  const overlayProps = {
539
548
  visible: {
540
549
  type: Boolean,
@@ -564,12 +573,12 @@ var __publicField = (obj, key, value) => {
564
573
  default: true
565
574
  }
566
575
  };
567
- const _sfc_main$1j = create$1j({
576
+ const _sfc_main$1n = create$1n({
568
577
  props: overlayProps,
569
578
  emits: ["click", "update:visible"],
570
579
  setup(props, { emit }) {
571
580
  const classes = vue.computed(() => {
572
- const prefixCls = componentName$_;
581
+ const prefixCls = componentName$12;
573
582
  return {
574
583
  [prefixCls]: true,
575
584
  [props.overlayClass]: true
@@ -609,7 +618,7 @@ var __publicField = (obj, key, value) => {
609
618
  return { classes, style, touchmove, onClick };
610
619
  }
611
620
  });
612
- function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
621
+ function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) {
613
622
  return vue.openBlock(), vue.createBlock(vue.Transition, { name: "overlay-fade" }, {
614
623
  default: vue.withCtx(() => [
615
624
  vue.withDirectives(vue.createElementVNode("view", {
@@ -626,9 +635,9 @@ var __publicField = (obj, key, value) => {
626
635
  _: 3
627
636
  });
628
637
  }
629
- var OverLay = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1c]]);
630
- const { componentName: componentName$Z, create: create$1i } = createComponent("divider");
631
- const _sfc_main$1i = create$1i({
638
+ var OverLay = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1f]]);
639
+ const { componentName: componentName$11, create: create$1m } = createComponent("divider");
640
+ const _sfc_main$1m = create$1m({
632
641
  props: {
633
642
  contentPosition: {
634
643
  type: String,
@@ -646,7 +655,7 @@ var __publicField = (obj, key, value) => {
646
655
  components: {},
647
656
  setup(props, context) {
648
657
  const classes = vue.computed(() => {
649
- const prefixCls = componentName$Z;
658
+ const prefixCls = componentName$11;
650
659
  return {
651
660
  [prefixCls]: true,
652
661
  [`${prefixCls}-center`]: context.slots.default,
@@ -659,18 +668,18 @@ var __publicField = (obj, key, value) => {
659
668
  return { classes };
660
669
  }
661
670
  });
662
- function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
671
+ function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) {
663
672
  return vue.openBlock(), vue.createElementBlock("div", {
664
673
  class: vue.normalizeClass(_ctx.classes)
665
674
  }, [
666
675
  vue.renderSlot(_ctx.$slots, "default")
667
676
  ], 2);
668
677
  }
669
- var Divider = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1b]]);
670
- const { create: create$1h } = createComponent("layout");
671
- const _sfc_main$1h = create$1h({});
672
- const { componentName: componentName$Y, create: create$1g } = createComponent("col");
673
- const _sfc_main$1g = create$1g({
678
+ var Divider = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1e]]);
679
+ const { create: create$1l } = createComponent("layout");
680
+ const _sfc_main$1l = create$1l({});
681
+ const { componentName: componentName$10, create: create$1k } = createComponent("col");
682
+ const _sfc_main$1k = create$1k({
674
683
  props: {
675
684
  span: {
676
685
  type: [String, Number],
@@ -682,7 +691,7 @@ var __publicField = (obj, key, value) => {
682
691
  }
683
692
  },
684
693
  setup(props) {
685
- const prefixCls = componentName$Y;
694
+ const prefixCls = componentName$10;
686
695
  const gutter = vue.inject("gutter");
687
696
  const classes = vue.computed(() => {
688
697
  return {
@@ -704,7 +713,7 @@ var __publicField = (obj, key, value) => {
704
713
  };
705
714
  }
706
715
  });
707
- function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
716
+ function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) {
708
717
  return vue.openBlock(), vue.createElementBlock("view", {
709
718
  class: vue.normalizeClass(_ctx.classes),
710
719
  style: vue.normalizeStyle(_ctx.style)
@@ -712,9 +721,9 @@ var __publicField = (obj, key, value) => {
712
721
  vue.renderSlot(_ctx.$slots, "default")
713
722
  ], 6);
714
723
  }
715
- var Col = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1a]]);
716
- const { componentName: componentName$X, create: create$1f } = createComponent("row");
717
- const _sfc_main$1f = create$1f({
724
+ var Col = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1d]]);
725
+ const { componentName: componentName$$, create: create$1j } = createComponent("row");
726
+ const _sfc_main$1j = create$1j({
718
727
  props: {
719
728
  type: {
720
729
  type: String,
@@ -738,7 +747,7 @@ var __publicField = (obj, key, value) => {
738
747
  }
739
748
  },
740
749
  setup(props) {
741
- const prefixCls = componentName$X;
750
+ const prefixCls = componentName$$;
742
751
  vue.provide("gutter", props.gutter);
743
752
  const getClass = (prefix, type) => {
744
753
  return prefix ? type ? `nut-row-${prefix}-${type}` : "" : `nut-row-${type}`;
@@ -757,14 +766,14 @@ var __publicField = (obj, key, value) => {
757
766
  };
758
767
  }
759
768
  });
760
- function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
769
+ function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) {
761
770
  return vue.openBlock(), vue.createElementBlock("view", {
762
771
  class: vue.normalizeClass(_ctx.getClasses())
763
772
  }, [
764
773
  vue.renderSlot(_ctx.$slots, "default")
765
774
  ], 2);
766
775
  }
767
- var Row = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$19]]);
776
+ var Row = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1c]]);
768
777
  let count = 0;
769
778
  const CLSNAME = "nut-overflow-hidden";
770
779
  const useLockScroll = (isLock) => {
@@ -782,7 +791,7 @@ var __publicField = (obj, key, value) => {
782
791
  };
783
792
  return [lock, unlock];
784
793
  };
785
- const { componentName: componentName$W, create: create$1e } = createComponent("popup");
794
+ const { componentName: componentName$_, create: create$1i } = createComponent("popup");
786
795
  let _zIndex = 2e3;
787
796
  const popupProps = __spreadProps(__spreadValues({}, overlayProps), {
788
797
  position: {
@@ -830,10 +839,10 @@ var __publicField = (obj, key, value) => {
830
839
  default: true
831
840
  }
832
841
  });
833
- const _sfc_main$1e = create$1e({
842
+ const _sfc_main$1i = create$1i({
834
843
  components: {
835
844
  [OverLay.name]: OverLay,
836
- [_sfc_main$1o.name]: _sfc_main$1o
845
+ [_sfc_main$1s.name]: _sfc_main$1s
837
846
  },
838
847
  props: __spreadValues({}, popupProps),
839
848
  emits: ["click", "click-close-icon", "open", "close", "opend", "closed", "update:visible", "click-overlay"],
@@ -848,7 +857,7 @@ var __publicField = (obj, key, value) => {
848
857
  });
849
858
  const [lockScroll, unlockScroll] = useLockScroll(() => props.lockScroll);
850
859
  const classes = vue.computed(() => {
851
- const prefixCls = componentName$W;
860
+ const prefixCls = componentName$_;
852
861
  return {
853
862
  [prefixCls]: true,
854
863
  ["round"]: props.round,
@@ -955,8 +964,8 @@ var __publicField = (obj, key, value) => {
955
964
  });
956
965
  }
957
966
  });
958
- const _hoisted_1$W = { key: 1 };
959
- function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
967
+ const _hoisted_1$Z = { key: 1 };
968
+ function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) {
960
969
  const _component_nut_overlay = vue.resolveComponent("nut-overlay");
961
970
  const _component_nut_icon = vue.resolveComponent("nut-icon");
962
971
  return _ctx.isWrapTeleport ? (vue.openBlock(), vue.createBlock(vue.Teleport, {
@@ -1002,7 +1011,7 @@ var __publicField = (obj, key, value) => {
1002
1011
  ]),
1003
1012
  _: 3
1004
1013
  }, 8, ["name", "onAfterEnter", "onAfterLeave"])
1005
- ], 8, ["to"])) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$W, [
1014
+ ], 8, ["to"])) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$Z, [
1006
1015
  _ctx.overlay ? (vue.openBlock(), vue.createBlock(_component_nut_overlay, {
1007
1016
  key: 0,
1008
1017
  visible: _ctx.visible,
@@ -1044,34 +1053,9 @@ var __publicField = (obj, key, value) => {
1044
1053
  }, 8, ["name", "onAfterEnter", "onAfterLeave"])
1045
1054
  ]));
1046
1055
  }
1047
- var Popup = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$18]]);
1048
- const throttle = (func, wait, type) => {
1049
- if (type === 1) {
1050
- var previous = 0;
1051
- } else if (type === 2) {
1052
- var timeout;
1053
- }
1054
- return function() {
1055
- let context = this;
1056
- let args = arguments;
1057
- if (type === 1) {
1058
- let now = Date.now();
1059
- if (now - previous > wait) {
1060
- func.apply(context, args);
1061
- previous = now;
1062
- }
1063
- } else if (type === 2) {
1064
- if (!timeout) {
1065
- timeout = setTimeout(() => {
1066
- timeout = null;
1067
- func.apply(context, args);
1068
- }, wait);
1069
- }
1070
- }
1071
- };
1072
- };
1073
- const { create: create$1d } = createComponent("video");
1074
- const _sfc_main$1d = create$1d({
1056
+ var Popup = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1b]]);
1057
+ const { create: create$1h } = createComponent("video");
1058
+ const _sfc_main$1h = create$1h({
1075
1059
  props: {
1076
1060
  source: {
1077
1061
  type: Object,
@@ -1176,7 +1160,6 @@ var __publicField = (obj, key, value) => {
1176
1160
  emit("pause", state.videoElm);
1177
1161
  });
1178
1162
  state.videoElm.addEventListener("ended", playEnded);
1179
- state.videoElm.addEventListener("timeupdate", throttle(getPlayTime, 100, 1));
1180
1163
  }
1181
1164
  };
1182
1165
  const customerInit = () => {
@@ -1200,7 +1183,6 @@ var __publicField = (obj, key, value) => {
1200
1183
  state.videoElm.addEventListener("progress", () => {
1201
1184
  getLoadTime();
1202
1185
  });
1203
- state.videoElm.addEventListener("timeupdate", throttle(getPlayTime, 100, 1));
1204
1186
  state.videoElm.addEventListener("ended", playEnded);
1205
1187
  emit("play", state.videoElm);
1206
1188
  } catch (e) {
@@ -1212,37 +1194,10 @@ var __publicField = (obj, key, value) => {
1212
1194
  }
1213
1195
  }
1214
1196
  };
1215
- const timeFormat = (t) => {
1216
- var h = Math.floor(t / 3600);
1217
- if (h < 10) {
1218
- h = "0" + h;
1219
- }
1220
- var m = Math.floor(t % 3600 / 60);
1221
- if (m < 10) {
1222
- m = "0" + m;
1223
- }
1224
- var s = Math.round(t % 3600 % 60);
1225
- if (s < 10) {
1226
- s = "0" + s;
1227
- }
1228
- var str = "";
1229
- if (h != 0) {
1230
- str = h + ":" + m + ":" + s;
1231
- } else {
1232
- str = m + ":" + s;
1233
- }
1234
- return str;
1235
- };
1236
1197
  const getLoadTime = () => {
1237
1198
  if (state.videoSet.loaded)
1238
1199
  state.videoSet.loaded = state.videoElm.buffered.end(0) / state.videoElm.duration * 100;
1239
1200
  };
1240
- const getPlayTime = () => {
1241
- const percent = state.videoElm.currentTime / state.videoElm.duration;
1242
- state.videoSet.progress.current = Math.round(state.videoSet.progress.width * percent);
1243
- state.videoSet.totalTime = timeFormat(state.videoElm.duration);
1244
- state.videoSet.displayTime = timeFormat(state.videoElm.currentTime);
1245
- };
1246
1201
  const playEnded = () => {
1247
1202
  state.state.playing = false;
1248
1203
  state.state.isEnd = true;
@@ -1317,21 +1272,21 @@ var __publicField = (obj, key, value) => {
1317
1272
  });
1318
1273
  }
1319
1274
  });
1320
- const _hoisted_1$V = {
1275
+ const _hoisted_1$Y = {
1321
1276
  class: "nut-video",
1322
1277
  ref: "videocon"
1323
1278
  };
1324
- const _hoisted_2$L = ["muted", "autoplay", "loop", "poster", "controls", "preload"];
1325
- const _hoisted_3$A = ["src", "type"];
1326
- const _hoisted_4$r = { class: "current-time" };
1327
- const _hoisted_5$j = { class: "progress-container" };
1328
- const _hoisted_6$g = {
1279
+ const _hoisted_2$N = ["muted", "autoplay", "loop", "poster", "controls", "preload"];
1280
+ const _hoisted_3$C = ["src", "type"];
1281
+ const _hoisted_4$t = { class: "current-time" };
1282
+ const _hoisted_5$k = { class: "progress-container" };
1283
+ const _hoisted_6$h = {
1329
1284
  class: "progress",
1330
1285
  ref: "progressBar"
1331
1286
  };
1332
- const _hoisted_7$b = /* @__PURE__ */ vue.createElementVNode("div", { class: "move-handle" }, null, -1);
1333
- const _hoisted_8$8 = [
1334
- _hoisted_7$b
1287
+ const _hoisted_7$c = /* @__PURE__ */ vue.createElementVNode("div", { class: "move-handle" }, null, -1);
1288
+ const _hoisted_8$9 = [
1289
+ _hoisted_7$c
1335
1290
  ];
1336
1291
  const _hoisted_9$6 = {
1337
1292
  class: "played",
@@ -1340,8 +1295,8 @@ var __publicField = (obj, key, value) => {
1340
1295
  const _hoisted_10$4 = { class: "duration-time" };
1341
1296
  const _hoisted_11$4 = { class: "nut-video-error" };
1342
1297
  const _hoisted_12$4 = /* @__PURE__ */ vue.createElementVNode("p", { class: "lose" }, "\u89C6\u9891\u52A0\u8F7D\u5931\u8D25", -1);
1343
- function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
1344
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$V, [
1298
+ function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) {
1299
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Y, [
1345
1300
  vue.createElementVNode("video", {
1346
1301
  ref: "root",
1347
1302
  class: "nut-video-player",
@@ -1356,8 +1311,8 @@ var __publicField = (obj, key, value) => {
1356
1311
  vue.createElementVNode("source", {
1357
1312
  src: _ctx.source.src,
1358
1313
  type: _ctx.source.type
1359
- }, null, 8, _hoisted_3$A)
1360
- ], 40, _hoisted_2$L),
1314
+ }, null, 8, _hoisted_3$C)
1315
+ ], 40, _hoisted_2$N),
1361
1316
  _ctx.showToolbox && !_ctx.isDisabled ? (vue.openBlock(), vue.createElementBlock("div", {
1362
1317
  key: 0,
1363
1318
  class: "playing-mask",
@@ -1379,9 +1334,9 @@ var __publicField = (obj, key, value) => {
1379
1334
  class: "control-play-btn",
1380
1335
  onClick: _cache[3] || (_cache[3] = (...args) => _ctx.play && _ctx.play(...args))
1381
1336
  }),
1382
- vue.createElementVNode("div", _hoisted_4$r, vue.toDisplayString(_ctx.videoSet.displayTime), 1),
1383
- vue.createElementVNode("div", _hoisted_5$j, [
1384
- vue.createElementVNode("div", _hoisted_6$g, [
1337
+ vue.createElementVNode("div", _hoisted_4$t, vue.toDisplayString(_ctx.videoSet.displayTime), 1),
1338
+ vue.createElementVNode("div", _hoisted_5$k, [
1339
+ vue.createElementVNode("div", _hoisted_6$h, [
1385
1340
  vue.createElementVNode("div", {
1386
1341
  class: "buffered",
1387
1342
  style: vue.normalizeStyle({ width: `${_ctx.videoSet.loaded}%` })
@@ -1394,7 +1349,7 @@ var __publicField = (obj, key, value) => {
1394
1349
  onTouchmove: _cache[4] || (_cache[4] = vue.withModifiers(($event) => _ctx.touchSlidMove($event), ["stop", "prevent"])),
1395
1350
  onTouchstart: _cache[5] || (_cache[5] = vue.withModifiers(($event) => _ctx.touchSlidSrart($event), ["stop"])),
1396
1351
  onTouchend: _cache[6] || (_cache[6] = vue.withModifiers(($event) => _ctx.touchSlidEnd($event), ["stop"]))
1397
- }, _hoisted_8$8, 36),
1352
+ }, _hoisted_8$9, 36),
1398
1353
  vue.createElementVNode("div", _hoisted_9$6, null, 512)
1399
1354
  ], 512)
1400
1355
  ]),
@@ -1421,9 +1376,9 @@ var __publicField = (obj, key, value) => {
1421
1376
  ])
1422
1377
  ], 512);
1423
1378
  }
1424
- var Video = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$17]]);
1379
+ var Video = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1a]]);
1425
1380
  const DISTANCE = 5;
1426
- function useTouch$1() {
1381
+ function useTouch$2() {
1427
1382
  const state = vue.reactive({
1428
1383
  startX: 0,
1429
1384
  startY: 0,
@@ -1470,14 +1425,14 @@ var __publicField = (obj, key, value) => {
1470
1425
  move
1471
1426
  };
1472
1427
  }
1473
- function useExpose$1(apis) {
1428
+ function useExpose(apis) {
1474
1429
  const instance = vue.getCurrentInstance();
1475
1430
  if (instance) {
1476
1431
  Object.assign(instance.proxy, apis);
1477
1432
  }
1478
1433
  }
1479
- const { create: create$1c, componentName: componentName$V } = createComponent("swiper");
1480
- const _sfc_main$1c = create$1c({
1434
+ const { create: create$1g, componentName: componentName$Z } = createComponent("swiper");
1435
+ const _sfc_main$1g = create$1g({
1481
1436
  props: {
1482
1437
  width: {
1483
1438
  type: [Number, String],
@@ -1544,9 +1499,9 @@ var __publicField = (obj, key, value) => {
1544
1499
  children: [],
1545
1500
  style: {}
1546
1501
  });
1547
- const touch = useTouch$1();
1502
+ const touch = useTouch$2();
1548
1503
  const classes = vue.computed(() => {
1549
- const prefixCls = componentName$V;
1504
+ const prefixCls = componentName$Z;
1550
1505
  return {
1551
1506
  [prefixCls]: true
1552
1507
  };
@@ -1761,7 +1716,7 @@ var __publicField = (obj, key, value) => {
1761
1716
  size,
1762
1717
  relation
1763
1718
  });
1764
- useExpose$1({
1719
+ useExpose({
1765
1720
  prev,
1766
1721
  next,
1767
1722
  to
@@ -1799,7 +1754,7 @@ var __publicField = (obj, key, value) => {
1799
1754
  state,
1800
1755
  classes,
1801
1756
  container,
1802
- componentName: componentName$V,
1757
+ componentName: componentName$Z,
1803
1758
  isVertical,
1804
1759
  slots,
1805
1760
  activePagination,
@@ -1809,7 +1764,7 @@ var __publicField = (obj, key, value) => {
1809
1764
  };
1810
1765
  }
1811
1766
  });
1812
- function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
1767
+ function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) {
1813
1768
  return vue.openBlock(), vue.createElementBlock("view", {
1814
1769
  ref: "container",
1815
1770
  class: vue.normalizeClass(_ctx.classes),
@@ -1846,15 +1801,9 @@ var __publicField = (obj, key, value) => {
1846
1801
  ], 2)) : vue.createCommentVNode("", true)
1847
1802
  ], 34);
1848
1803
  }
1849
- var Swiper = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$16]]);
1850
- function useExpose(apis) {
1851
- const instance = vue.getCurrentInstance();
1852
- if (instance) {
1853
- Object.assign(instance.proxy, apis);
1854
- }
1855
- }
1856
- const { create: create$1b, componentName: componentName$U } = createComponent("swiper-item");
1857
- const _sfc_main$1b = create$1b({
1804
+ var Swiper = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$19]]);
1805
+ const { create: create$1f, componentName: componentName$Y } = createComponent("swiper-item");
1806
+ const _sfc_main$1f = create$1f({
1858
1807
  props: {},
1859
1808
  setup(props, { slots }) {
1860
1809
  const parent = vue.inject("parent");
@@ -1863,7 +1812,7 @@ var __publicField = (obj, key, value) => {
1863
1812
  offset: 0
1864
1813
  });
1865
1814
  const classes = vue.computed(() => {
1866
- const prefixCls = componentName$U;
1815
+ const prefixCls = componentName$Y;
1867
1816
  return {
1868
1817
  [prefixCls]: true
1869
1818
  };
@@ -1889,7 +1838,7 @@ var __publicField = (obj, key, value) => {
1889
1838
  };
1890
1839
  }
1891
1840
  });
1892
- function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
1841
+ function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) {
1893
1842
  return vue.openBlock(), vue.createElementBlock("view", {
1894
1843
  class: vue.normalizeClass(_ctx.classes),
1895
1844
  style: vue.normalizeStyle(_ctx.style)
@@ -1897,9 +1846,9 @@ var __publicField = (obj, key, value) => {
1897
1846
  vue.renderSlot(_ctx.$slots, "default")
1898
1847
  ], 6);
1899
1848
  }
1900
- var SwiperItem = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$15]]);
1901
- const { componentName: componentName$T, create: create$1a } = createComponent("imagepreview");
1902
- const _sfc_main$1a = create$1a({
1849
+ var SwiperItem = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$18]]);
1850
+ const { componentName: componentName$X, create: create$1e } = createComponent("imagepreview");
1851
+ const _sfc_main$1e = create$1e({
1903
1852
  props: {
1904
1853
  show: {
1905
1854
  type: Boolean,
@@ -1984,7 +1933,6 @@ var __publicField = (obj, key, value) => {
1984
1933
  state.eleImg.style.transform = "scale(" + state.store.scale + ")";
1985
1934
  };
1986
1935
  const onTouchStart = (event) => {
1987
- console.log("start");
1988
1936
  const curTouchTime = new Date().getTime();
1989
1937
  if (curTouchTime - state.lastTouchEndTime < 300) {
1990
1938
  const store2 = state.store;
@@ -2036,7 +1984,6 @@ var __publicField = (obj, key, value) => {
2036
1984
  }
2037
1985
  };
2038
1986
  const onTouchEnd = () => {
2039
- console.log("end");
2040
1987
  state.lastTouchEndTime = new Date().getTime();
2041
1988
  const store = state.store;
2042
1989
  store.moveable = false;
@@ -2072,9 +2019,9 @@ var __publicField = (obj, key, value) => {
2072
2019
  });
2073
2020
  }
2074
2021
  });
2075
- const _hoisted_1$U = ["src"];
2076
- const _hoisted_2$K = { class: "nut-imagepreview-index" };
2077
- function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
2022
+ const _hoisted_1$X = ["src"];
2023
+ const _hoisted_2$M = { class: "nut-imagepreview-index" };
2024
+ function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) {
2078
2025
  const _component_nut_video = vue.resolveComponent("nut-video");
2079
2026
  const _component_nut_swiper_item = vue.resolveComponent("nut-swiper-item");
2080
2027
  const _component_nut_swiper = vue.resolveComponent("nut-swiper");
@@ -2122,7 +2069,7 @@ var __publicField = (obj, key, value) => {
2122
2069
  vue.createElementVNode("img", {
2123
2070
  src: item.src,
2124
2071
  class: "nut-imagepreview-img"
2125
- }, null, 8, _hoisted_1$U)
2072
+ }, null, 8, _hoisted_1$X)
2126
2073
  ]),
2127
2074
  _: 2
2128
2075
  }, 1024);
@@ -2131,12 +2078,12 @@ var __publicField = (obj, key, value) => {
2131
2078
  _: 1
2132
2079
  }, 8, ["auto-play", "onChange", "init-page", "pagination-visible", "pagination-color"])) : vue.createCommentVNode("", true)
2133
2080
  ], 32),
2134
- vue.createElementVNode("view", _hoisted_2$K, vue.toDisplayString(_ctx.active) + " / " + vue.toDisplayString(_ctx.images.length + _ctx.videos.length), 1)
2081
+ vue.createElementVNode("view", _hoisted_2$M, vue.toDisplayString(_ctx.active) + " / " + vue.toDisplayString(_ctx.images.length + _ctx.videos.length), 1)
2135
2082
  ]),
2136
2083
  _: 1
2137
2084
  }, 8, ["visible", "onClick"]);
2138
2085
  }
2139
- var ImagePreview = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$14]]);
2086
+ var ImagePreview = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$17]]);
2140
2087
  class ImagePreviewOptions {
2141
2088
  constructor() {
2142
2089
  __publicField(this, "show", false);
@@ -2184,17 +2131,180 @@ var __publicField = (obj, key, value) => {
2184
2131
  app.use(ImagePreview);
2185
2132
  app.config.globalProperties.$imagepreview = _ImagePreview;
2186
2133
  };
2187
- const MIN_DISTANCE = 10;
2188
- function getDirection(x, y) {
2189
- if (x > y && x > MIN_DISTANCE) {
2134
+ function isWindow(val) {
2135
+ return val === window;
2136
+ }
2137
+ const useRect = (elementRef) => {
2138
+ const element = vue.unref(elementRef);
2139
+ if (isWindow(element)) {
2140
+ const width = element.innerWidth;
2141
+ const height = element.innerHeight;
2142
+ return {
2143
+ top: 0,
2144
+ left: 0,
2145
+ right: width,
2146
+ bottom: height,
2147
+ width,
2148
+ height
2149
+ };
2150
+ }
2151
+ if (element && element.getBoundingClientRect) {
2152
+ return element.getBoundingClientRect();
2153
+ }
2154
+ return {
2155
+ top: 0,
2156
+ left: 0,
2157
+ right: 0,
2158
+ bottom: 0,
2159
+ width: 0,
2160
+ height: 0
2161
+ };
2162
+ };
2163
+ const { componentName: componentName$W, create: create$1d } = createComponent("sticky");
2164
+ const _sfc_main$1d = create$1d({
2165
+ props: {
2166
+ position: {
2167
+ type: String,
2168
+ default: "top"
2169
+ },
2170
+ top: {
2171
+ type: [Number, String],
2172
+ default: 0
2173
+ },
2174
+ bottom: {
2175
+ type: [Number, String],
2176
+ default: 0
2177
+ },
2178
+ container: {
2179
+ type: Object
2180
+ },
2181
+ zIndex: {
2182
+ type: [Number, String],
2183
+ default: 2e3
2184
+ }
2185
+ },
2186
+ emits: ["change", "scroll"],
2187
+ setup(props, { emit, slots }) {
2188
+ const root = vue.ref();
2189
+ const state = vue.reactive({
2190
+ width: 0,
2191
+ height: 0,
2192
+ fixed: false,
2193
+ transform: 0
2194
+ });
2195
+ const rootStyle = vue.computed(() => {
2196
+ const { fixed, width, height } = state;
2197
+ if (fixed) {
2198
+ return {
2199
+ width: `${width}px`,
2200
+ height: `${height}px`
2201
+ };
2202
+ }
2203
+ });
2204
+ const stickyStyle = vue.computed(() => {
2205
+ if (!state.fixed)
2206
+ return;
2207
+ const style = {
2208
+ width: `${state.width}px`,
2209
+ height: `${state.height}px`,
2210
+ [props.position]: `${offset.value}px`,
2211
+ zIndex: +props.zIndex
2212
+ };
2213
+ if (state.transform)
2214
+ style.transform = `translate3d(0, ${state.transform}px, 0)`;
2215
+ return style;
2216
+ });
2217
+ const offset = vue.computed(() => {
2218
+ return props.position === "top" ? props.top : props.bottom;
2219
+ });
2220
+ const isHidden = (elementRef) => {
2221
+ const el = vue.unref(elementRef);
2222
+ if (!el)
2223
+ return false;
2224
+ const style = window.getComputedStyle(el);
2225
+ const hidden = style.display === "none";
2226
+ const parentHidden = el.offsetParent === null && style.position !== "fixed";
2227
+ return hidden || parentHidden;
2228
+ };
2229
+ const isExistRoot = () => {
2230
+ if (!root.value || isHidden(root))
2231
+ return false;
2232
+ return true;
2233
+ };
2234
+ const getScrollTop = (el) => {
2235
+ return Math.max(0, "scrollTop" in el ? el.scrollTop : el.pageYOffset);
2236
+ };
2237
+ const renderFixed = () => {
2238
+ var _a;
2239
+ return vue.h("view", {
2240
+ style: stickyStyle.value,
2241
+ class: state.fixed ? `${componentName$W} nut-sticky--fixed` : componentName$W
2242
+ }, (_a = slots.default) == null ? void 0 : _a.call(slots));
2243
+ };
2244
+ const onScroll = () => {
2245
+ if (!isExistRoot())
2246
+ return;
2247
+ const { container, position } = props;
2248
+ const scrollTop = getScrollTop(window);
2249
+ const rootRect = useRect(root);
2250
+ if (rootRect.width || rootRect.height) {
2251
+ state.width = rootRect.width;
2252
+ state.height = rootRect.height;
2253
+ }
2254
+ if (position === "top") {
2255
+ if (container) {
2256
+ const containerRect = useRect(container);
2257
+ const diff = containerRect.bottom - +offset.value - state.height;
2258
+ state.fixed = +offset.value > rootRect.top && containerRect.bottom > 0;
2259
+ state.transform = diff < 0 ? diff : 0;
2260
+ } else {
2261
+ state.fixed = offset.value > rootRect.top;
2262
+ }
2263
+ } else if (position === "bottom") {
2264
+ const clientHeight = document.documentElement.clientHeight;
2265
+ if (container) {
2266
+ const containerRect = useRect(container);
2267
+ const diff = clientHeight - containerRect.top - +offset.value - state.height;
2268
+ state.fixed = clientHeight - +offset.value < rootRect.bottom && clientHeight > containerRect.top;
2269
+ state.transform = diff < 0 ? -diff : 0;
2270
+ } else {
2271
+ state.fixed = clientHeight - +offset.value < rootRect.bottom;
2272
+ }
2273
+ }
2274
+ emit("scroll", {
2275
+ top: scrollTop,
2276
+ fixed: state.fixed
2277
+ });
2278
+ };
2279
+ vue.watch(() => state.fixed, (val) => {
2280
+ emit("change", val);
2281
+ });
2282
+ vue.onMounted(() => {
2283
+ window.addEventListener("scroll", onScroll);
2284
+ onScroll();
2285
+ });
2286
+ vue.onUnmounted(() => {
2287
+ window.removeEventListener("scroll", onScroll);
2288
+ });
2289
+ return () => {
2290
+ return vue.h("view", {
2291
+ style: rootStyle.value,
2292
+ ref: root
2293
+ }, [renderFixed()]);
2294
+ };
2295
+ }
2296
+ });
2297
+ const MIN_DISTANCE$1 = 10;
2298
+ function getDirection$1(x, y) {
2299
+ if (x > y && x > MIN_DISTANCE$1) {
2190
2300
  return "horizontal";
2191
2301
  }
2192
- if (y > x && y > MIN_DISTANCE) {
2302
+ if (y > x && y > MIN_DISTANCE$1) {
2193
2303
  return "vertical";
2194
2304
  }
2195
2305
  return "";
2196
2306
  }
2197
- function useTouch() {
2307
+ function useTouch$1() {
2198
2308
  const startX = vue.ref(0);
2199
2309
  const startY = vue.ref(0);
2200
2310
  const deltaX = vue.ref(0);
@@ -2223,7 +2333,7 @@ var __publicField = (obj, key, value) => {
2223
2333
  offsetX.value = Math.abs(deltaX.value);
2224
2334
  offsetY.value = Math.abs(deltaY.value);
2225
2335
  if (!direction.value) {
2226
- direction.value = getDirection(offsetX.value, offsetY.value);
2336
+ direction.value = getDirection$1(offsetX.value, offsetY.value);
2227
2337
  }
2228
2338
  };
2229
2339
  return {
@@ -2241,8 +2351,8 @@ var __publicField = (obj, key, value) => {
2241
2351
  isHorizontal
2242
2352
  };
2243
2353
  }
2244
- const { componentName: componentName$S, create: create$19 } = createComponent("swipe");
2245
- const _sfc_main$19 = create$19({
2354
+ const { componentName: componentName$V, create: create$1c } = createComponent("swipe");
2355
+ const _sfc_main$1c = create$1c({
2246
2356
  props: {
2247
2357
  name: {
2248
2358
  type: String,
@@ -2264,7 +2374,7 @@ var __publicField = (obj, key, value) => {
2264
2374
  emits: ["open", "close"],
2265
2375
  setup(props, { emit }) {
2266
2376
  const classes = vue.computed(() => {
2267
- const prefixCls = componentName$S;
2377
+ const prefixCls = componentName$V;
2268
2378
  return {
2269
2379
  [prefixCls]: true
2270
2380
  };
@@ -2330,7 +2440,7 @@ var __publicField = (obj, key, value) => {
2330
2440
  }
2331
2441
  state.offset = offset;
2332
2442
  };
2333
- const touch = useTouch();
2443
+ const touch = useTouch$1();
2334
2444
  const touchMethods = {
2335
2445
  onTouchStart(event) {
2336
2446
  if (props.disabled)
@@ -2388,16 +2498,16 @@ var __publicField = (obj, key, value) => {
2388
2498
  });
2389
2499
  }
2390
2500
  });
2391
- const _hoisted_1$T = {
2501
+ const _hoisted_1$W = {
2392
2502
  class: "nut-swipe__left",
2393
2503
  ref: "leftRef"
2394
2504
  };
2395
- const _hoisted_2$J = { class: "nut-swipe__content" };
2396
- const _hoisted_3$z = {
2505
+ const _hoisted_2$L = { class: "nut-swipe__content" };
2506
+ const _hoisted_3$B = {
2397
2507
  class: "nut-swipe__right",
2398
2508
  ref: "rightRef"
2399
2509
  };
2400
- function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
2510
+ function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) {
2401
2511
  return vue.openBlock(), vue.createElementBlock("view", {
2402
2512
  class: vue.normalizeClass(_ctx.classes),
2403
2513
  style: vue.normalizeStyle(_ctx.touchStyle),
@@ -2406,20 +2516,20 @@ var __publicField = (obj, key, value) => {
2406
2516
  onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args)),
2407
2517
  onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
2408
2518
  }, [
2409
- vue.createElementVNode("view", _hoisted_1$T, [
2519
+ vue.createElementVNode("view", _hoisted_1$W, [
2410
2520
  vue.renderSlot(_ctx.$slots, "left")
2411
2521
  ], 512),
2412
- vue.createElementVNode("view", _hoisted_2$J, [
2522
+ vue.createElementVNode("view", _hoisted_2$L, [
2413
2523
  vue.renderSlot(_ctx.$slots, "default")
2414
2524
  ]),
2415
- vue.createElementVNode("view", _hoisted_3$z, [
2525
+ vue.createElementVNode("view", _hoisted_3$B, [
2416
2526
  vue.renderSlot(_ctx.$slots, "right")
2417
2527
  ], 512)
2418
2528
  ], 38);
2419
2529
  }
2420
- var Swipe = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$13]]);
2421
- const { componentName: componentName$R, create: create$18 } = createComponent("actionsheet");
2422
- const _sfc_main$18 = create$18({
2530
+ var Swipe = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$16]]);
2531
+ const { componentName: componentName$U, create: create$1b } = createComponent("actionsheet");
2532
+ const _sfc_main$1b = create$1b({
2423
2533
  props: __spreadProps(__spreadValues({}, popupProps), {
2424
2534
  cancelTxt: {
2425
2535
  type: String,
@@ -2454,10 +2564,10 @@ var __publicField = (obj, key, value) => {
2454
2564
  default: () => []
2455
2565
  }
2456
2566
  }),
2457
- emits: ["cancel", "choose", "update:visible"],
2567
+ emits: ["cancel", "close", "choose", "update:visible"],
2458
2568
  setup(props, { emit }) {
2459
2569
  const classes = vue.computed(() => {
2460
- const prefixCls = componentName$R;
2570
+ const prefixCls = componentName$U;
2461
2571
  return {
2462
2572
  [prefixCls]: true
2463
2573
  };
@@ -2488,22 +2598,22 @@ var __publicField = (obj, key, value) => {
2488
2598
  };
2489
2599
  }
2490
2600
  });
2491
- const _hoisted_1$S = { class: "nut-actionsheet-panel" };
2492
- const _hoisted_2$I = {
2601
+ const _hoisted_1$V = { class: "nut-actionsheet-panel" };
2602
+ const _hoisted_2$K = {
2493
2603
  key: 0,
2494
2604
  class: "nut-actionsheet-title"
2495
2605
  };
2496
- const _hoisted_3$y = {
2606
+ const _hoisted_3$A = {
2497
2607
  key: 1,
2498
2608
  class: "nut-actionsheet-item desc"
2499
2609
  };
2500
- const _hoisted_4$q = {
2610
+ const _hoisted_4$s = {
2501
2611
  key: 2,
2502
2612
  class: "nut-actionsheet-menu"
2503
2613
  };
2504
- const _hoisted_5$i = ["onClick"];
2505
- const _hoisted_6$f = { class: "subdesc" };
2506
- function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
2614
+ const _hoisted_5$j = ["onClick"];
2615
+ const _hoisted_6$g = { class: "subdesc" };
2616
+ function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) {
2507
2617
  const _component_nut_popup = vue.resolveComponent("nut-popup");
2508
2618
  return vue.openBlock(), vue.createElementBlock("view", {
2509
2619
  class: vue.normalizeClass(_ctx.classes)
@@ -2516,10 +2626,10 @@ var __publicField = (obj, key, value) => {
2516
2626
  onClickOverlay: _ctx.close
2517
2627
  }, {
2518
2628
  default: vue.withCtx(() => [
2519
- vue.createElementVNode("view", _hoisted_1$S, [
2520
- _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$I, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true),
2521
- _ctx.description ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$y, vue.toDisplayString(_ctx.description), 1)) : vue.createCommentVNode("", true),
2522
- _ctx.menuItems.length ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_4$q, [
2629
+ vue.createElementVNode("view", _hoisted_1$V, [
2630
+ _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$K, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true),
2631
+ _ctx.description ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$A, vue.toDisplayString(_ctx.description), 1)) : vue.createCommentVNode("", true),
2632
+ _ctx.menuItems.length ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_4$s, [
2523
2633
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.menuItems, (item, index) => {
2524
2634
  return vue.openBlock(), vue.createElementBlock("view", {
2525
2635
  class: vue.normalizeClass(["nut-actionsheet-item", { "nut-actionsheet-item-disabled": item.disable }]),
@@ -2528,8 +2638,8 @@ var __publicField = (obj, key, value) => {
2528
2638
  onClick: ($event) => _ctx.chooseItem(item, index)
2529
2639
  }, [
2530
2640
  vue.createTextVNode(vue.toDisplayString(item[_ctx.optionTag]), 1),
2531
- vue.createElementVNode("view", _hoisted_6$f, vue.toDisplayString(item[_ctx.optionSubTag]), 1)
2532
- ], 14, _hoisted_5$i);
2641
+ vue.createElementVNode("view", _hoisted_6$g, vue.toDisplayString(item[_ctx.optionSubTag]), 1)
2642
+ ], 14, _hoisted_5$j);
2533
2643
  }), 128))
2534
2644
  ])) : vue.createCommentVNode("", true),
2535
2645
  _ctx.cancelTxt ? (vue.openBlock(), vue.createElementBlock("view", {
@@ -2543,9 +2653,9 @@ var __publicField = (obj, key, value) => {
2543
2653
  }, 8, ["visible", "onClickOverlay"])
2544
2654
  ], 2);
2545
2655
  }
2546
- var ActionSheet = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$12]]);
2547
- const { componentName: componentName$Q, create: create$17 } = createComponent("backtop");
2548
- const _sfc_main$17 = create$17({
2656
+ var ActionSheet = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$15]]);
2657
+ const { componentName: componentName$T, create: create$1a } = createComponent("backtop");
2658
+ const _sfc_main$1a = create$1a({
2549
2659
  props: {
2550
2660
  bottom: {
2551
2661
  type: Number,
@@ -2586,7 +2696,7 @@ var __publicField = (obj, key, value) => {
2586
2696
  keepAlive: false
2587
2697
  });
2588
2698
  const classes = vue.computed(() => {
2589
- const prefixCls = componentName$Q;
2699
+ const prefixCls = componentName$T;
2590
2700
  return {
2591
2701
  [prefixCls]: true,
2592
2702
  show: state.backTop
@@ -2677,7 +2787,7 @@ var __publicField = (obj, key, value) => {
2677
2787
  };
2678
2788
  }
2679
2789
  });
2680
- function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
2790
+ function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) {
2681
2791
  const _component_nut_icon = vue.resolveComponent("nut-icon");
2682
2792
  return vue.openBlock(), vue.createElementBlock("div", {
2683
2793
  class: vue.normalizeClass(_ctx.classes),
@@ -2693,9 +2803,9 @@ var __publicField = (obj, key, value) => {
2693
2803
  ])
2694
2804
  ], 6);
2695
2805
  }
2696
- var BackTop = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$11]]);
2697
- const { create: create$16 } = createComponent("collapse");
2698
- const _sfc_main$16 = create$16({
2806
+ var BackTop = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$14]]);
2807
+ const { create: create$19 } = createComponent("collapse");
2808
+ const _sfc_main$19 = create$19({
2699
2809
  props: {
2700
2810
  active: {
2701
2811
  type: [String, Number, Array]
@@ -2768,14 +2878,14 @@ var __publicField = (obj, key, value) => {
2768
2878
  });
2769
2879
  }
2770
2880
  });
2771
- function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
2881
+ function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) {
2772
2882
  return vue.openBlock(), vue.createElementBlock("view", null, [
2773
2883
  vue.renderSlot(_ctx.$slots, "default")
2774
2884
  ]);
2775
2885
  }
2776
- var Collapse = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$10]]);
2777
- const { create: create$15, componentName: componentName$P } = createComponent("collapse-item");
2778
- const _sfc_main$15 = create$15({
2886
+ var Collapse = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$13]]);
2887
+ const { create: create$18, componentName: componentName$S } = createComponent("collapse-item");
2888
+ const _sfc_main$18 = create$18({
2779
2889
  props: {
2780
2890
  title: {
2781
2891
  type: String,
@@ -2802,7 +2912,7 @@ var __publicField = (obj, key, value) => {
2802
2912
  const collapse = vue.inject("collapseParent");
2803
2913
  const parent = vue.reactive(collapse);
2804
2914
  const classes = vue.computed(() => {
2805
- const prefixCls = componentName$P;
2915
+ const prefixCls = componentName$S;
2806
2916
  return {
2807
2917
  [prefixCls]: true,
2808
2918
  [`${prefixCls}-icon`]: parent.props.icon
@@ -2935,23 +3045,23 @@ var __publicField = (obj, key, value) => {
2935
3045
  });
2936
3046
  }
2937
3047
  });
2938
- const _hoisted_1$R = { class: "collapse-title" };
2939
- const _hoisted_2$H = { class: "collapse-title-value" };
2940
- const _hoisted_3$x = ["innerHTML"];
2941
- const _hoisted_4$p = {
3048
+ const _hoisted_1$U = { class: "collapse-title" };
3049
+ const _hoisted_2$J = { class: "collapse-title-value" };
3050
+ const _hoisted_3$z = ["innerHTML"];
3051
+ const _hoisted_4$r = {
2942
3052
  key: 0,
2943
3053
  class: "subTitle"
2944
3054
  };
2945
- const _hoisted_5$h = ["innerHTML"];
2946
- const _hoisted_6$e = {
3055
+ const _hoisted_5$i = ["innerHTML"];
3056
+ const _hoisted_6$f = {
2947
3057
  class: "collapse-wrapper",
2948
3058
  ref: "wrapperRef"
2949
3059
  };
2950
- const _hoisted_7$a = {
3060
+ const _hoisted_7$b = {
2951
3061
  class: "collapse-content",
2952
3062
  ref: "contentRef"
2953
3063
  };
2954
- function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
3064
+ function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) {
2955
3065
  const _component_nut_icon = vue.resolveComponent("nut-icon");
2956
3066
  return vue.openBlock(), vue.createElementBlock("view", {
2957
3067
  class: vue.normalizeClass(_ctx.classes)
@@ -2960,9 +3070,9 @@ var __publicField = (obj, key, value) => {
2960
3070
  class: vue.normalizeClass(["collapse-item", { "item-expanded": _ctx.openExpanded }, { "nut-collapse-item-disabled": _ctx.disabled }]),
2961
3071
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.toggleOpen && _ctx.toggleOpen(...args))
2962
3072
  }, [
2963
- vue.createElementVNode("view", _hoisted_1$R, [
3073
+ vue.createElementVNode("view", _hoisted_1$U, [
2964
3074
  vue.createElementVNode("view", null, [
2965
- vue.createElementVNode("view", _hoisted_2$H, [
3075
+ vue.createElementVNode("view", _hoisted_2$J, [
2966
3076
  _ctx.titleIcon ? (vue.openBlock(), vue.createBlock(_component_nut_icon, {
2967
3077
  key: 0,
2968
3078
  name: _ctx.titleIcon,
@@ -2974,17 +3084,17 @@ var __publicField = (obj, key, value) => {
2974
3084
  key: 2,
2975
3085
  innerHTML: _ctx.title,
2976
3086
  class: "collapse-icon-title"
2977
- }, null, 8, _hoisted_3$x))
3087
+ }, null, 8, _hoisted_3$z))
2978
3088
  ])
2979
3089
  ])
2980
3090
  ]),
2981
- _ctx.$slots.sTitle ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_4$p, [
3091
+ _ctx.$slots.sTitle ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_4$r, [
2982
3092
  vue.renderSlot(_ctx.$slots, "sTitle")
2983
3093
  ])) : (vue.openBlock(), vue.createElementBlock("view", {
2984
3094
  key: 1,
2985
3095
  innerHTML: _ctx.subTitle,
2986
3096
  class: "subTitle"
2987
- }, null, 8, _hoisted_5$h)),
3097
+ }, null, 8, _hoisted_5$i)),
2988
3098
  _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_nut_icon, {
2989
3099
  key: 2,
2990
3100
  name: _ctx.icon,
@@ -2994,14 +3104,14 @@ var __publicField = (obj, key, value) => {
2994
3104
  style: vue.normalizeStyle(_ctx.iconStyle)
2995
3105
  }, null, 8, ["name", "size", "color", "class", "style"])) : vue.createCommentVNode("", true)
2996
3106
  ], 2),
2997
- vue.createElementVNode("view", _hoisted_6$e, [
2998
- vue.createElementVNode("view", _hoisted_7$a, [
3107
+ vue.createElementVNode("view", _hoisted_6$f, [
3108
+ vue.createElementVNode("view", _hoisted_7$b, [
2999
3109
  vue.renderSlot(_ctx.$slots, "default")
3000
3110
  ], 512)
3001
3111
  ], 512)
3002
3112
  ], 2);
3003
3113
  }
3004
- var CollapseItem = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$$]]);
3114
+ var CollapseItem = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$12]]);
3005
3115
  const _window = window;
3006
3116
  function requestAniFrame() {
3007
3117
  if (typeof _window !== "undefined") {
@@ -3015,8 +3125,8 @@ var __publicField = (obj, key, value) => {
3015
3125
  }
3016
3126
  }
3017
3127
  var requestAniFrame$1 = requestAniFrame();
3018
- const { componentName: componentName$O, create: create$14 } = createComponent("drag");
3019
- const _sfc_main$14 = create$14({
3128
+ const { componentName: componentName$R, create: create$17 } = createComponent("drag");
3129
+ const _sfc_main$17 = create$17({
3020
3130
  props: {
3021
3131
  attract: {
3022
3132
  type: Boolean,
@@ -3061,7 +3171,7 @@ var __publicField = (obj, key, value) => {
3061
3171
  }
3062
3172
  });
3063
3173
  const classes = vue.computed(() => {
3064
- const prefixCls = componentName$O;
3174
+ const prefixCls = componentName$R;
3065
3175
  return {
3066
3176
  [prefixCls]: true
3067
3177
  };
@@ -3196,7 +3306,7 @@ var __publicField = (obj, key, value) => {
3196
3306
  };
3197
3307
  }
3198
3308
  });
3199
- function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
3309
+ function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
3200
3310
  return vue.openBlock(), vue.createElementBlock("view", {
3201
3311
  class: vue.normalizeClass(_ctx.classes),
3202
3312
  ref: "myDrag",
@@ -3207,9 +3317,9 @@ var __publicField = (obj, key, value) => {
3207
3317
  vue.renderSlot(_ctx.$slots, "default")
3208
3318
  ], 34);
3209
3319
  }
3210
- var Drag = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$_]]);
3211
- const { componentName: componentName$N, create: create$13 } = createComponent("dialog");
3212
- const _sfc_main$13 = create$13({
3320
+ var Drag = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$11]]);
3321
+ const { componentName: componentName$Q, create: create$16 } = createComponent("dialog");
3322
+ const _sfc_main$16 = create$16({
3213
3323
  inheritAttrs: false,
3214
3324
  components: {
3215
3325
  [Popup.name]: Popup,
@@ -3284,7 +3394,7 @@ var __publicField = (obj, key, value) => {
3284
3394
  });
3285
3395
  const classes = vue.computed(() => {
3286
3396
  return {
3287
- [componentName$N]: true
3397
+ [componentName$Q]: true
3288
3398
  };
3289
3399
  });
3290
3400
  const update = (val) => {
@@ -3314,12 +3424,12 @@ var __publicField = (obj, key, value) => {
3314
3424
  };
3315
3425
  }
3316
3426
  });
3317
- const _hoisted_1$Q = {
3427
+ const _hoisted_1$T = {
3318
3428
  key: 0,
3319
3429
  class: "nut-dialog__header"
3320
3430
  };
3321
- const _hoisted_2$G = ["innerHTML"];
3322
- function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
3431
+ const _hoisted_2$I = ["innerHTML"];
3432
+ function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) {
3323
3433
  const _component_nut_button = vue.resolveComponent("nut-button");
3324
3434
  const _component_nut_popup = vue.resolveComponent("nut-popup");
3325
3435
  return vue.openBlock(), vue.createBlock(_component_nut_popup, {
@@ -3336,7 +3446,7 @@ var __publicField = (obj, key, value) => {
3336
3446
  vue.createElementVNode("view", {
3337
3447
  class: vue.normalizeClass(_ctx.classes)
3338
3448
  }, [
3339
- _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$Q, [
3449
+ _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$T, [
3340
3450
  _ctx.$slots.header ? vue.renderSlot(_ctx.$slots, "header", { key: 0 }) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
3341
3451
  vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
3342
3452
  ], 64))
@@ -3348,7 +3458,7 @@ var __publicField = (obj, key, value) => {
3348
3458
  _ctx.$slots.default ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }) : (vue.openBlock(), vue.createElementBlock("view", {
3349
3459
  key: 1,
3350
3460
  innerHTML: _ctx.content
3351
- }, null, 8, _hoisted_2$G))
3461
+ }, null, 8, _hoisted_2$I))
3352
3462
  ], 4),
3353
3463
  !_ctx.noFooter ? (vue.openBlock(), vue.createElementBlock("view", {
3354
3464
  key: 1,
@@ -3388,7 +3498,7 @@ var __publicField = (obj, key, value) => {
3388
3498
  _: 3
3389
3499
  }, 8, ["teleport", "visible", "close-on-click-overlay", "lock-scroll", "onClickOverlay", "onClickCloseIcon"]);
3390
3500
  }
3391
- var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$Z]]);
3501
+ var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$10]]);
3392
3502
  class DialogOptions {
3393
3503
  constructor() {
3394
3504
  __publicField(this, "title", "");
@@ -3462,8 +3572,8 @@ var __publicField = (obj, key, value) => {
3462
3572
  app.use(Dialog);
3463
3573
  app.config.globalProperties.$dialog = _Dialog;
3464
3574
  };
3465
- const { componentName: componentName$M, create: create$12 } = createComponent("infiniteloading");
3466
- const _sfc_main$12 = create$12({
3575
+ const { componentName: componentName$P, create: create$15 } = createComponent("infiniteloading");
3576
+ const _sfc_main$15 = create$15({
3467
3577
  props: {
3468
3578
  hasMore: {
3469
3579
  type: Boolean,
@@ -3525,7 +3635,7 @@ var __publicField = (obj, key, value) => {
3525
3635
  distance: 0
3526
3636
  });
3527
3637
  const classes = vue.computed(() => {
3528
- const prefixCls = componentName$M;
3638
+ const prefixCls = componentName$P;
3529
3639
  return {
3530
3640
  [prefixCls]: true
3531
3641
  };
@@ -3649,20 +3759,20 @@ var __publicField = (obj, key, value) => {
3649
3759
  });
3650
3760
  }
3651
3761
  });
3652
- const _hoisted_1$P = { class: "top-box" };
3653
- const _hoisted_2$F = { class: "top-text" };
3654
- const _hoisted_3$w = { class: "nut-infinite-container" };
3655
- const _hoisted_4$o = { class: "nut-infinite-bottom" };
3656
- const _hoisted_5$g = {
3762
+ const _hoisted_1$S = { class: "top-box" };
3763
+ const _hoisted_2$H = { class: "top-text" };
3764
+ const _hoisted_3$y = { class: "nut-infinite-container" };
3765
+ const _hoisted_4$q = { class: "nut-infinite-bottom" };
3766
+ const _hoisted_5$h = {
3657
3767
  key: 0,
3658
3768
  class: "bottom-box"
3659
3769
  };
3660
- const _hoisted_6$d = { class: "bottom-text" };
3661
- const _hoisted_7$9 = {
3770
+ const _hoisted_6$e = { class: "bottom-text" };
3771
+ const _hoisted_7$a = {
3662
3772
  key: 1,
3663
3773
  class: "tips"
3664
3774
  };
3665
- function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
3775
+ function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) {
3666
3776
  const _component_nut_icon = vue.resolveComponent("nut-icon");
3667
3777
  return vue.openBlock(), vue.createElementBlock("view", {
3668
3778
  class: vue.normalizeClass(_ctx.classes),
@@ -3676,31 +3786,31 @@ var __publicField = (obj, key, value) => {
3676
3786
  ref: "refreshTop",
3677
3787
  style: vue.normalizeStyle(_ctx.getStyle)
3678
3788
  }, [
3679
- vue.createElementVNode("view", _hoisted_1$P, [
3789
+ vue.createElementVNode("view", _hoisted_1$S, [
3680
3790
  vue.createVNode(_component_nut_icon, {
3681
3791
  class: "top-img",
3682
3792
  name: _ctx.pullIcon
3683
3793
  }, null, 8, ["name"]),
3684
- vue.createElementVNode("view", _hoisted_2$F, vue.toDisplayString(_ctx.pullTxt), 1)
3794
+ vue.createElementVNode("view", _hoisted_2$H, vue.toDisplayString(_ctx.pullTxt), 1)
3685
3795
  ])
3686
3796
  ], 4),
3687
- vue.createElementVNode("view", _hoisted_3$w, [
3797
+ vue.createElementVNode("view", _hoisted_3$y, [
3688
3798
  vue.renderSlot(_ctx.$slots, "default")
3689
3799
  ]),
3690
- vue.createElementVNode("view", _hoisted_4$o, [
3691
- _ctx.isInfiniting ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_5$g, [
3800
+ vue.createElementVNode("view", _hoisted_4$q, [
3801
+ _ctx.isInfiniting ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_5$h, [
3692
3802
  vue.createVNode(_component_nut_icon, {
3693
3803
  class: "bottom-img",
3694
3804
  name: _ctx.loadIcon
3695
3805
  }, null, 8, ["name"]),
3696
- vue.createElementVNode("view", _hoisted_6$d, vue.toDisplayString(_ctx.loadTxt), 1)
3697
- ])) : !_ctx.hasMore ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_7$9, vue.toDisplayString(_ctx.loadMoreTxt), 1)) : vue.createCommentVNode("", true)
3806
+ vue.createElementVNode("view", _hoisted_6$e, vue.toDisplayString(_ctx.loadTxt), 1)
3807
+ ])) : !_ctx.hasMore ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_7$a, vue.toDisplayString(_ctx.loadMoreTxt), 1)) : vue.createCommentVNode("", true)
3698
3808
  ])
3699
3809
  ], 34);
3700
3810
  }
3701
- var InfiniteLoading = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$Y]]);
3702
- const { componentName: componentName$L, create: create$11 } = createComponent("notify");
3703
- const _sfc_main$11 = create$11({
3811
+ var InfiniteLoading = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$$]]);
3812
+ const { componentName: componentName$O, create: create$14 } = createComponent("notify");
3813
+ const _sfc_main$14 = create$14({
3704
3814
  components: {
3705
3815
  [Popup.name]: Popup
3706
3816
  },
@@ -3770,7 +3880,7 @@ var __publicField = (obj, key, value) => {
3770
3880
  return { state, hide, onAfterLeave, clickCover };
3771
3881
  }
3772
3882
  });
3773
- function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
3883
+ function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) {
3774
3884
  return vue.openBlock(), vue.createBlock(vue.Transition, {
3775
3885
  name: "toast-fade",
3776
3886
  onAfterLeave: _ctx.onAfterLeave
@@ -3791,7 +3901,7 @@ var __publicField = (obj, key, value) => {
3791
3901
  _: 3
3792
3902
  }, 8, ["onAfterLeave"]);
3793
3903
  }
3794
- var Notify = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$X]]);
3904
+ var Notify = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$_]]);
3795
3905
  const defaultOptions$1 = {
3796
3906
  type: "base",
3797
3907
  showPopup: false,
@@ -3900,37 +4010,8 @@ var __publicField = (obj, key, value) => {
3900
4010
  app.config.globalProperties.$notify = NotifyFunction;
3901
4011
  }
3902
4012
  };
3903
- function isWindow(val) {
3904
- return val === window;
3905
- }
3906
- const useRect = (elementRef) => {
3907
- const element = vue.unref(elementRef);
3908
- if (isWindow(element)) {
3909
- const width = element.innerWidth;
3910
- const height = element.innerHeight;
3911
- return {
3912
- top: 0,
3913
- left: 0,
3914
- right: width,
3915
- bottom: height,
3916
- width,
3917
- height
3918
- };
3919
- }
3920
- if (element && element.getBoundingClientRect) {
3921
- return element.getBoundingClientRect();
3922
- }
3923
- return {
3924
- top: 0,
3925
- left: 0,
3926
- right: 0,
3927
- bottom: 0,
3928
- width: 0,
3929
- height: 0
3930
- };
3931
- };
3932
- const { componentName: componentName$K, create: create$10 } = createComponent("range");
3933
- const _sfc_main$10 = create$10({
4013
+ const { componentName: componentName$N, create: create$13 } = createComponent("range");
4014
+ const _sfc_main$13 = create$13({
3934
4015
  props: {
3935
4016
  range: {
3936
4017
  type: Boolean,
@@ -3972,10 +4053,10 @@ var __publicField = (obj, key, value) => {
3972
4053
  let currentValue;
3973
4054
  const root = vue.ref();
3974
4055
  const dragStatus = vue.ref();
3975
- const touch = useTouch();
4056
+ const touch = useTouch$1();
3976
4057
  const scope = vue.computed(() => Number(props.max) - Number(props.min));
3977
4058
  const classes = vue.computed(() => {
3978
- const prefixCls = componentName$K;
4059
+ const prefixCls = componentName$N;
3979
4060
  return {
3980
4061
  [prefixCls]: true,
3981
4062
  [`${prefixCls}-disabled`]: props.disabled,
@@ -4126,28 +4207,28 @@ var __publicField = (obj, key, value) => {
4126
4207
  });
4127
4208
  }
4128
4209
  });
4129
- const _hoisted_1$O = { class: "nut-range-container" };
4130
- const _hoisted_2$E = {
4210
+ const _hoisted_1$R = { class: "nut-range-container" };
4211
+ const _hoisted_2$G = {
4131
4212
  key: 0,
4132
4213
  class: "min"
4133
4214
  };
4134
- const _hoisted_3$v = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax", "onTouchstart"];
4135
- const _hoisted_4$n = {
4215
+ const _hoisted_3$x = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax", "onTouchstart"];
4216
+ const _hoisted_4$p = {
4136
4217
  key: 0,
4137
4218
  class: "number"
4138
4219
  };
4139
- const _hoisted_5$f = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax"];
4140
- const _hoisted_6$c = {
4220
+ const _hoisted_5$g = ["tabindex", "aria-valuemin", "aria-valuenow", "aria-valuemax"];
4221
+ const _hoisted_6$d = {
4141
4222
  key: 0,
4142
4223
  class: "number"
4143
4224
  };
4144
- const _hoisted_7$8 = {
4225
+ const _hoisted_7$9 = {
4145
4226
  key: 1,
4146
4227
  class: "max"
4147
4228
  };
4148
- function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
4149
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$O, [
4150
- !_ctx.hiddenRange ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$E, vue.toDisplayString(+_ctx.min), 1)) : vue.createCommentVNode("", true),
4229
+ function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) {
4230
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$R, [
4231
+ !_ctx.hiddenRange ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$G, vue.toDisplayString(+_ctx.min), 1)) : vue.createCommentVNode("", true),
4151
4232
  vue.createElementVNode("view", {
4152
4233
  ref: "root",
4153
4234
  style: vue.normalizeStyle(_ctx.wrapperStyle),
@@ -4187,9 +4268,9 @@ var __publicField = (obj, key, value) => {
4187
4268
  class: "nut-range-button",
4188
4269
  style: vue.normalizeStyle(_ctx.buttonStyle)
4189
4270
  }, [
4190
- !_ctx.hiddenTag ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_4$n, vue.toDisplayString(_ctx.curValue(index)), 1)) : vue.createCommentVNode("", true)
4271
+ !_ctx.hiddenTag ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_4$p, vue.toDisplayString(_ctx.curValue(index)), 1)) : vue.createCommentVNode("", true)
4191
4272
  ], 4))
4192
- ], 42, _hoisted_3$v);
4273
+ ], 42, _hoisted_3$x);
4193
4274
  }), 64)) : (vue.openBlock(), vue.createElementBlock("view", {
4194
4275
  key: 1,
4195
4276
  role: "slider",
@@ -4212,17 +4293,355 @@ var __publicField = (obj, key, value) => {
4212
4293
  class: "nut-range-button",
4213
4294
  style: vue.normalizeStyle(_ctx.buttonStyle)
4214
4295
  }, [
4215
- !_ctx.hiddenTag ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_6$c, vue.toDisplayString(_ctx.curValue()), 1)) : vue.createCommentVNode("", true)
4296
+ !_ctx.hiddenTag ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_6$d, vue.toDisplayString(_ctx.curValue()), 1)) : vue.createCommentVNode("", true)
4216
4297
  ], 4))
4217
- ], 40, _hoisted_5$f))
4298
+ ], 40, _hoisted_5$g))
4218
4299
  ], 4)
4219
4300
  ], 6),
4220
- !_ctx.hiddenRange ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_7$8, vue.toDisplayString(+_ctx.max), 1)) : vue.createCommentVNode("", true)
4301
+ !_ctx.hiddenRange ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_7$9, vue.toDisplayString(+_ctx.max), 1)) : vue.createCommentVNode("", true)
4221
4302
  ]);
4222
4303
  }
4223
- var Range = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$W]]);
4224
- const { create: create$$, componentName: componentName$J } = createComponent("steps");
4225
- const _sfc_main$$ = create$$({
4304
+ var Range = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$Z]]);
4305
+ const MIN_DISTANCE = 10;
4306
+ function getDirection(x, y) {
4307
+ if (x > y && x > MIN_DISTANCE) {
4308
+ return "horizontal";
4309
+ }
4310
+ if (y > x && y > MIN_DISTANCE) {
4311
+ return "vertical";
4312
+ }
4313
+ return "";
4314
+ }
4315
+ function useTouch() {
4316
+ const startX = vue.ref(0);
4317
+ const startY = vue.ref(0);
4318
+ const deltaX = vue.ref(0);
4319
+ const deltaY = vue.ref(0);
4320
+ const offsetX = vue.ref(0);
4321
+ const offsetY = vue.ref(0);
4322
+ const direction = vue.ref("");
4323
+ const isVertical = () => direction.value === "vertical";
4324
+ const isHorizontal = () => direction.value === "horizontal";
4325
+ const reset = () => {
4326
+ deltaX.value = 0;
4327
+ deltaY.value = 0;
4328
+ offsetX.value = 0;
4329
+ offsetY.value = 0;
4330
+ direction.value = "";
4331
+ };
4332
+ const start = (event) => {
4333
+ reset();
4334
+ startX.value = event.touches[0].clientX;
4335
+ startY.value = event.touches[0].clientY;
4336
+ };
4337
+ const move = (event) => {
4338
+ const touch = event.touches[0];
4339
+ deltaX.value = touch.clientX - startX.value;
4340
+ deltaY.value = touch.clientY - startY.value;
4341
+ offsetX.value = Math.abs(deltaX.value);
4342
+ offsetY.value = Math.abs(deltaY.value);
4343
+ if (!direction.value) {
4344
+ direction.value = getDirection(offsetX.value, offsetY.value);
4345
+ }
4346
+ };
4347
+ return {
4348
+ move,
4349
+ start,
4350
+ reset,
4351
+ startX,
4352
+ startY,
4353
+ deltaX,
4354
+ deltaY,
4355
+ offsetX,
4356
+ offsetY,
4357
+ direction,
4358
+ isVertical,
4359
+ isHorizontal
4360
+ };
4361
+ }
4362
+ function preventDefault(event, isStopPropagation) {
4363
+ if (typeof event.cancelable !== "boolean" || event.cancelable) {
4364
+ event.preventDefault();
4365
+ }
4366
+ if (isStopPropagation)
4367
+ event.stopPropagation();
4368
+ }
4369
+ const { componentName: componentName$M, create: create$12 } = createComponent("pullrefresh");
4370
+ const _sfc_main$12 = create$12({
4371
+ props: {
4372
+ useWindow: {
4373
+ type: Boolean,
4374
+ default: true
4375
+ },
4376
+ containerId: {
4377
+ type: String,
4378
+ default: ""
4379
+ },
4380
+ disabled: {
4381
+ type: Boolean,
4382
+ default: false
4383
+ },
4384
+ direction: {
4385
+ type: String,
4386
+ default: "vertical"
4387
+ },
4388
+ pullingText: {
4389
+ type: Object,
4390
+ default: {
4391
+ top: "\u4E0B\u62C9\u5237\u65B0",
4392
+ bottom: "\u4E0A\u62C9\u52A0\u8F7D",
4393
+ left: "\u5DE6\u6ED1\u5237\u65B0",
4394
+ right: "\u53F3\u6ED1\u52A0\u8F7D"
4395
+ }
4396
+ },
4397
+ loosingText: {
4398
+ type: Object,
4399
+ default: {
4400
+ top: "\u677E\u624B\u91CA\u653E\u5237\u65B0",
4401
+ bottom: "\u677E\u624B\u91CA\u653E\u5237\u65B0",
4402
+ left: "\u91CA\u653E\u5237\u65B0",
4403
+ right: "\u52A0\u8F7D\u66F4\u591A"
4404
+ }
4405
+ },
4406
+ loadingText: {
4407
+ type: Object,
4408
+ default: {
4409
+ top: "\u52A0\u8F7D\u4E2D...",
4410
+ bottom: "\u52A0\u8F7D\u4E2D...",
4411
+ left: "\u52A0\u8F7D\u4E2D...",
4412
+ right: "\u52A0\u8F7D\u4E2D..."
4413
+ }
4414
+ }
4415
+ },
4416
+ emits: ["refresh", "downRefresh"],
4417
+ setup(props, { emit }) {
4418
+ const { containerId, useWindow, direction, disabled } = vue.toRefs(props);
4419
+ const reachTop = vue.ref(false);
4420
+ const reachBottom = vue.ref(false);
4421
+ const reachLeft = vue.ref(false);
4422
+ const reachRight = vue.ref(false);
4423
+ const state = vue.reactive({
4424
+ status: "normal",
4425
+ distance: 0,
4426
+ duration: 0
4427
+ });
4428
+ let scrollEl = document.documentElement || document.body;
4429
+ const scroller = vue.ref(null);
4430
+ const touch = useTouch();
4431
+ const getStyle = vue.computed(() => {
4432
+ let style = {};
4433
+ const { deltaY, deltaX } = touch;
4434
+ if (direction.value == "vertical" && (reachTop.value && deltaY.value > 0 || reachBottom.value && deltaY.value < 0) && touch.isVertical()) {
4435
+ style = {
4436
+ transitionDuration: `${state.duration}ms`,
4437
+ transform: state.distance ? `translate3d(0,${state.distance}px, 0)` : `translate3d(0,0,0)`
4438
+ };
4439
+ }
4440
+ if (direction.value == "horizontal" && (reachLeft.value && deltaX.value > 0 || reachRight.value && deltaX.value < 0) && touch.isHorizontal()) {
4441
+ style = {
4442
+ transitionDuration: `${state.duration}ms`,
4443
+ transform: state.distance ? `translate3d(${state.distance}px, 0,0)` : `translate3d(0,0,0)`
4444
+ };
4445
+ }
4446
+ return style;
4447
+ });
4448
+ const getBottomStyle = vue.computed(() => {
4449
+ let style = {};
4450
+ if (direction.value == "vertical" && reachBottom.value && touch.deltaY.value < 0 && touch.isVertical()) {
4451
+ const dis = Math.abs(state.distance) < 50 ? -state.distance : 50;
4452
+ style = {
4453
+ height: dis + "px"
4454
+ };
4455
+ }
4456
+ if (direction.value == "horizontal" && reachRight.value && touch.deltaX.value < 0 && touch.isVertical()) {
4457
+ const dis = Math.abs(state.distance) < 50 ? -state.distance : 50;
4458
+ style = {
4459
+ width: dis + "px"
4460
+ };
4461
+ }
4462
+ return style;
4463
+ });
4464
+ const refreshTopTem = vue.computed(() => {
4465
+ const { status, distance } = state;
4466
+ const tag = direction.value == "vertical" ? "top" : "left";
4467
+ if (status == "loading" && (reachTop.value || reachLeft.value) && distance > 0) {
4468
+ return props.loadingText[tag];
4469
+ }
4470
+ if (status == "pulling" && (reachTop.value || reachLeft.value) && distance > 0) {
4471
+ return props.pullingText[tag];
4472
+ }
4473
+ if (status == "loosing" && (reachTop.value || reachLeft.value) && distance > 0) {
4474
+ return props.loosingText[tag];
4475
+ }
4476
+ return "";
4477
+ });
4478
+ const refreshBottomTem = vue.computed(() => {
4479
+ const { status, distance } = state;
4480
+ const tag = direction.value == "vertical" ? "bottom" : "right";
4481
+ if (status == "loading" && (reachBottom.value || reachRight.value) && distance < 0) {
4482
+ return props.loadingText[tag];
4483
+ }
4484
+ if (status == "pulling" && (reachBottom.value || reachRight.value) && distance < 0) {
4485
+ return props.pullingText[tag];
4486
+ }
4487
+ if (status == "loosing" && (reachBottom.value || reachRight.value) && distance < 0) {
4488
+ return props.loosingText[tag];
4489
+ }
4490
+ return "";
4491
+ });
4492
+ const isTouchable = () => state.status !== "loading" && !disabled.value;
4493
+ const setStatus = (distance, isLoading) => {
4494
+ state.distance = distance;
4495
+ if (isLoading) {
4496
+ state.status = "loading";
4497
+ } else if (distance === 0) {
4498
+ state.status = "normal";
4499
+ } else if (Math.abs(distance) < 50) {
4500
+ state.status = "pulling";
4501
+ } else {
4502
+ state.status = "loosing";
4503
+ }
4504
+ };
4505
+ const getParentElement = (el) => {
4506
+ if (containerId.value != "") {
4507
+ return document.querySelector(`#${containerId.value}`);
4508
+ }
4509
+ return el && el.parentNode;
4510
+ };
4511
+ vue.onMounted(() => {
4512
+ const parentElement = getParentElement(scroller);
4513
+ let scrollElCopy = document.documentElement || document.body;
4514
+ if (useWindow.value === false) {
4515
+ scrollElCopy = parentElement;
4516
+ }
4517
+ scrollEl = scrollElCopy;
4518
+ });
4519
+ const ease = (distance) => {
4520
+ const headHeight = 50;
4521
+ if (distance > headHeight) {
4522
+ if (distance < headHeight * 2) {
4523
+ distance = headHeight + (distance - headHeight) / 2;
4524
+ } else {
4525
+ distance = headHeight * 1.5 + (distance - headHeight * 2) / 4;
4526
+ }
4527
+ }
4528
+ return Math.round(distance);
4529
+ };
4530
+ const refreshDone = () => {
4531
+ setStatus(0);
4532
+ };
4533
+ const touchStart = (event) => {
4534
+ if (isTouchable()) {
4535
+ if (direction.value == "vertical") {
4536
+ const top = "scrollTop" in scrollEl ? scrollEl.scrollTop : 0;
4537
+ reachTop.value = Math.max(top, 0) == 0 ? true : false;
4538
+ const { scrollHeight, clientHeight, scrollTop } = scrollEl;
4539
+ reachBottom.value = clientHeight + scrollTop == scrollHeight ? true : false;
4540
+ if (reachTop.value || reachBottom.value) {
4541
+ state.duration = 0;
4542
+ touch.start(event);
4543
+ }
4544
+ } else {
4545
+ const { scrollWidth, clientWidth, scrollLeft } = scrollEl;
4546
+ const left = "scrollLeft" in scrollEl ? scrollEl.scrollLeft : 0;
4547
+ reachLeft.value = Math.max(left, 0) == 0 ? true : false;
4548
+ reachRight.value = clientWidth + scrollLeft == scrollWidth ? true : false;
4549
+ if (reachLeft.value || reachRight.value) {
4550
+ state.duration = 0;
4551
+ touch.start(event);
4552
+ }
4553
+ }
4554
+ } else {
4555
+ preventDefault(event);
4556
+ }
4557
+ };
4558
+ const touchMove = (event) => {
4559
+ if (isTouchable()) {
4560
+ const { deltaY, deltaX } = touch;
4561
+ touch.move(event);
4562
+ if (direction.value == "vertical" && (reachBottom.value && deltaY.value < 0 || reachTop.value && deltaY.value >= 0) && touch.isVertical()) {
4563
+ preventDefault(event);
4564
+ setStatus(ease(deltaY.value));
4565
+ }
4566
+ if (direction.value == "horizontal" && (reachLeft.value && deltaX.value >= 0 || reachRight.value && deltaX.value < 0) && touch.isHorizontal()) {
4567
+ preventDefault(event);
4568
+ setStatus(ease(deltaX.value));
4569
+ }
4570
+ } else {
4571
+ preventDefault(event);
4572
+ }
4573
+ };
4574
+ const touchEnd = () => {
4575
+ if (isTouchable()) {
4576
+ const { deltaY, deltaX } = touch;
4577
+ if (state.status === "loosing") {
4578
+ let dis = 0;
4579
+ if (direction.value == "vertical" && reachTop.value && deltaY.value > 0) {
4580
+ dis = 50;
4581
+ emit("downRefresh", refreshDone);
4582
+ }
4583
+ if (direction.value == "vertical" && reachBottom.value && deltaY.value < 0) {
4584
+ dis = -50;
4585
+ emit("refresh", refreshDone);
4586
+ }
4587
+ if (direction.value == "horizontal" && reachLeft.value && deltaX.value > 0) {
4588
+ dis = 50;
4589
+ emit("downRefresh", refreshDone);
4590
+ }
4591
+ if (direction.value == "horizontal" && reachRight.value && deltaX.value < 0) {
4592
+ dis = -50;
4593
+ emit("refresh", refreshDone);
4594
+ }
4595
+ setStatus(dis, true);
4596
+ } else {
4597
+ setStatus(0);
4598
+ }
4599
+ }
4600
+ };
4601
+ return __spreadValues({
4602
+ scroller,
4603
+ touchStart,
4604
+ touchMove,
4605
+ touchEnd,
4606
+ getStyle,
4607
+ reachBottom,
4608
+ reachTop,
4609
+ reachRight,
4610
+ reachLeft,
4611
+ getBottomStyle,
4612
+ refreshTopTem,
4613
+ refreshBottomTem
4614
+ }, vue.toRefs(state));
4615
+ }
4616
+ });
4617
+ const _hoisted_1$Q = {
4618
+ class: "pullrefresh-content",
4619
+ ref: "pull"
4620
+ };
4621
+ function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) {
4622
+ return vue.openBlock(), vue.createElementBlock("view", {
4623
+ class: "nut-pullrefresh",
4624
+ ref: "scroller",
4625
+ style: vue.normalizeStyle(_ctx.getStyle),
4626
+ onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.touchStart && _ctx.touchStart(...args)),
4627
+ onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.touchMove && _ctx.touchMove(...args)),
4628
+ onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.touchEnd && _ctx.touchEnd(...args))
4629
+ }, [
4630
+ vue.createElementVNode("view", {
4631
+ class: vue.normalizeClass(["pullrefresh-top", _ctx.direction == "horizontal" ? "pullrefresh-top-h" : "pullrefresh-top-v"])
4632
+ }, vue.toDisplayString(_ctx.refreshTopTem), 3),
4633
+ vue.createElementVNode("view", _hoisted_1$Q, [
4634
+ vue.renderSlot(_ctx.$slots, "default")
4635
+ ], 512),
4636
+ vue.createElementVNode("view", {
4637
+ class: vue.normalizeClass(["pullrefresh-bottom", _ctx.direction == "horizontal" ? "pullrefresh-bottom-h" : "pullrefresh-bottom-v"]),
4638
+ style: vue.normalizeStyle(_ctx.getBottomStyle)
4639
+ }, vue.toDisplayString(_ctx.refreshBottomTem), 7)
4640
+ ], 36);
4641
+ }
4642
+ var PullRefresh = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$Y]]);
4643
+ const { create: create$11, componentName: componentName$L } = createComponent("steps");
4644
+ const _sfc_main$11 = create$11({
4226
4645
  props: {
4227
4646
  direction: {
4228
4647
  type: String,
@@ -4242,7 +4661,7 @@ var __publicField = (obj, key, value) => {
4242
4661
  children: []
4243
4662
  });
4244
4663
  const classes = vue.computed(() => {
4245
- const prefixCls = componentName$J;
4664
+ const prefixCls = componentName$L;
4246
4665
  return {
4247
4666
  [prefixCls]: true,
4248
4667
  [`${prefixCls}-${props.direction}`]: true,
@@ -4265,8 +4684,8 @@ var __publicField = (obj, key, value) => {
4265
4684
  };
4266
4685
  }
4267
4686
  });
4268
- const { create: create$_, componentName: componentName$I } = createComponent("step");
4269
- const _sfc_main$_ = create$_({
4687
+ const { create: create$10, componentName: componentName$K } = createComponent("step");
4688
+ const _sfc_main$10 = create$10({
4270
4689
  props: {
4271
4690
  title: {
4272
4691
  type: String,
@@ -4307,7 +4726,7 @@ var __publicField = (obj, key, value) => {
4307
4726
  return getCurrentStatus();
4308
4727
  });
4309
4728
  const classes = vue.computed(() => {
4310
- const prefixCls = componentName$I;
4729
+ const prefixCls = componentName$K;
4311
4730
  return {
4312
4731
  [prefixCls]: true,
4313
4732
  [`${prefixCls}-${status.value}`]: true
@@ -4319,22 +4738,22 @@ var __publicField = (obj, key, value) => {
4319
4738
  });
4320
4739
  }
4321
4740
  });
4322
- const _hoisted_1$N = { class: "nut-step-head" };
4323
- const _hoisted_2$D = /* @__PURE__ */ vue.createElementVNode("view", { class: "nut-step-line" }, null, -1);
4324
- const _hoisted_3$u = {
4741
+ const _hoisted_1$P = { class: "nut-step-head" };
4742
+ const _hoisted_2$F = /* @__PURE__ */ vue.createElementVNode("view", { class: "nut-step-line" }, null, -1);
4743
+ const _hoisted_3$w = {
4325
4744
  key: 2,
4326
4745
  class: "nut-step-inner"
4327
4746
  };
4328
- const _hoisted_4$m = { class: "nut-step-main" };
4329
- const _hoisted_5$e = { class: "nut-step-title" };
4330
- const _hoisted_6$b = ["innerHTML"];
4331
- function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
4747
+ const _hoisted_4$o = { class: "nut-step-main" };
4748
+ const _hoisted_5$f = { class: "nut-step-title" };
4749
+ const _hoisted_6$c = ["innerHTML"];
4750
+ function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) {
4332
4751
  const _component_nut_icon = vue.resolveComponent("nut-icon");
4333
4752
  return vue.openBlock(), vue.createElementBlock("view", {
4334
4753
  class: vue.normalizeClass(_ctx.classes)
4335
4754
  }, [
4336
- vue.createElementVNode("view", _hoisted_1$N, [
4337
- _hoisted_2$D,
4755
+ vue.createElementVNode("view", _hoisted_1$P, [
4756
+ _hoisted_2$F,
4338
4757
  vue.createElementVNode("view", {
4339
4758
  class: vue.normalizeClass(["nut-step-icon", [!_ctx.dot ? _ctx.icon ? "is-icon" : "is-text" : ""]])
4340
4759
  }, [
@@ -4344,22 +4763,22 @@ var __publicField = (obj, key, value) => {
4344
4763
  color: _ctx.iconColor,
4345
4764
  name: _ctx.icon,
4346
4765
  size: _ctx.size
4347
- }, null, 8, ["color", "name", "size"])) : _ctx.dot ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [], 64)) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$u, vue.toDisplayString(_ctx.index), 1))
4766
+ }, null, 8, ["color", "name", "size"])) : _ctx.dot ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [], 64)) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$w, vue.toDisplayString(_ctx.index), 1))
4348
4767
  ], 2)
4349
4768
  ]),
4350
- vue.createElementVNode("view", _hoisted_4$m, [
4351
- vue.createElementVNode("view", _hoisted_5$e, vue.toDisplayString(_ctx.title), 1),
4769
+ vue.createElementVNode("view", _hoisted_4$o, [
4770
+ vue.createElementVNode("view", _hoisted_5$f, vue.toDisplayString(_ctx.title), 1),
4352
4771
  _ctx.content ? (vue.openBlock(), vue.createElementBlock("view", {
4353
4772
  key: 0,
4354
4773
  class: "nut-step-content",
4355
4774
  innerHTML: _ctx.content
4356
- }, null, 8, _hoisted_6$b)) : vue.createCommentVNode("", true)
4775
+ }, null, 8, _hoisted_6$c)) : vue.createCommentVNode("", true)
4357
4776
  ])
4358
4777
  ], 2);
4359
4778
  }
4360
- var Step = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$V]]);
4361
- const { componentName: componentName$H, create: create$Z } = createComponent("switch");
4362
- const _sfc_main$Z = create$Z({
4779
+ var Step = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$X]]);
4780
+ const { componentName: componentName$J, create: create$$ } = createComponent("switch");
4781
+ const _sfc_main$$ = create$$({
4363
4782
  props: {
4364
4783
  modelValue: {
4365
4784
  type: [String, Number, Boolean],
@@ -4410,11 +4829,11 @@ var __publicField = (obj, key, value) => {
4410
4829
  default: ""
4411
4830
  }
4412
4831
  },
4413
- emits: ["change", "update:modelValue"],
4832
+ emits: ["change", "update:modelValue", "update:loading"],
4414
4833
  setup(props, { emit }) {
4415
4834
  const isActive = vue.computed(() => props.modelValue === props.activeValue);
4416
4835
  const classes = vue.computed(() => {
4417
- const prefixCls = componentName$H;
4836
+ const prefixCls = componentName$J;
4418
4837
  return {
4419
4838
  [prefixCls]: true,
4420
4839
  [isActive.value ? "switch-open" : "switch-close"]: true,
@@ -4442,15 +4861,15 @@ var __publicField = (obj, key, value) => {
4442
4861
  };
4443
4862
  }
4444
4863
  });
4445
- const _hoisted_1$M = { class: "switch-button" };
4446
- function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
4864
+ const _hoisted_1$O = { class: "switch-button" };
4865
+ function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) {
4447
4866
  const _component_nut_icon = vue.resolveComponent("nut-icon");
4448
4867
  return vue.openBlock(), vue.createElementBlock("view", {
4449
4868
  class: vue.normalizeClass(_ctx.classes),
4450
4869
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
4451
4870
  style: vue.normalizeStyle(_ctx.style)
4452
4871
  }, [
4453
- vue.createElementVNode("view", _hoisted_1$M, [
4872
+ vue.createElementVNode("view", _hoisted_1$O, [
4454
4873
  _ctx.loading ? (vue.openBlock(), vue.createBlock(_component_nut_icon, {
4455
4874
  key: 0,
4456
4875
  name: _ctx.name,
@@ -4468,11 +4887,11 @@ var __publicField = (obj, key, value) => {
4468
4887
  ])
4469
4888
  ], 6);
4470
4889
  }
4471
- var Switch = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$U]]);
4472
- const { create: create$Y } = createComponent("toast");
4473
- const _sfc_main$Y = create$Y({
4890
+ var Switch = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$W]]);
4891
+ const { create: create$_ } = createComponent("toast");
4892
+ const _sfc_main$_ = create$_({
4474
4893
  components: {
4475
- [_sfc_main$1o.name]: _sfc_main$1o
4894
+ [_sfc_main$1s.name]: _sfc_main$1s
4476
4895
  },
4477
4896
  props: {
4478
4897
  id: String,
@@ -4598,16 +5017,16 @@ var __publicField = (obj, key, value) => {
4598
5017
  };
4599
5018
  }
4600
5019
  });
4601
- const _hoisted_1$L = {
5020
+ const _hoisted_1$N = {
4602
5021
  key: 0,
4603
5022
  class: "nut-toast-icon-wrapper"
4604
5023
  };
4605
- const _hoisted_2$C = {
5024
+ const _hoisted_2$E = {
4606
5025
  key: 1,
4607
5026
  class: "nut-toast-title"
4608
5027
  };
4609
- const _hoisted_3$t = ["innerHTML"];
4610
- function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
5028
+ const _hoisted_3$v = ["innerHTML"];
5029
+ function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) {
4611
5030
  const _component_nut_icon = vue.resolveComponent("nut-icon");
4612
5031
  return vue.openBlock(), vue.createBlock(vue.Transition, {
4613
5032
  name: "toast-fade",
@@ -4629,18 +5048,18 @@ var __publicField = (obj, key, value) => {
4629
5048
  "background-color": _ctx.bgColor
4630
5049
  })
4631
5050
  }, [
4632
- _ctx.hasIcon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$L, [
5051
+ _ctx.hasIcon ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$N, [
4633
5052
  vue.createVNode(_component_nut_icon, {
4634
5053
  size: "20",
4635
5054
  color: "#ffffff",
4636
5055
  name: _ctx.icon
4637
5056
  }, null, 8, ["name"])
4638
5057
  ])) : vue.createCommentVNode("", true),
4639
- _ctx.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$C, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true),
5058
+ _ctx.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$E, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true),
4640
5059
  vue.createElementVNode("view", {
4641
5060
  class: "nut-toast-text",
4642
5061
  innerHTML: _ctx.msg
4643
- }, null, 8, _hoisted_3$t)
5062
+ }, null, 8, _hoisted_3$v)
4644
5063
  ], 4)
4645
5064
  ], 6), [
4646
5065
  [vue.vShow, _ctx.state.mounted]
@@ -4649,7 +5068,7 @@ var __publicField = (obj, key, value) => {
4649
5068
  _: 1
4650
5069
  }, 8, ["onAfterLeave"]);
4651
5070
  }
4652
- var Toast = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$T]]);
5071
+ var Toast = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$V]]);
4653
5072
  const defaultOptions = {
4654
5073
  msg: "",
4655
5074
  id: "",
@@ -4766,8 +5185,8 @@ var __publicField = (obj, key, value) => {
4766
5185
  app.config.globalProperties.$toast = ToastFunction;
4767
5186
  }
4768
5187
  };
4769
- const { create: create$X } = createComponent("progress");
4770
- const _sfc_main$X = create$X({
5188
+ const { create: create$Z } = createComponent("progress");
5189
+ const _sfc_main$Z = create$Z({
4771
5190
  props: {
4772
5191
  percentage: {
4773
5192
  type: [Number, String],
@@ -4809,11 +5228,16 @@ var __publicField = (obj, key, value) => {
4809
5228
  iconColor: {
4810
5229
  type: String,
4811
5230
  default: "#439422"
5231
+ },
5232
+ isShowPercentage: {
5233
+ type: Boolean,
5234
+ default: true
4812
5235
  }
4813
5236
  },
4814
5237
  setup(props, { emit }) {
4815
5238
  const height = vue.ref(props.strokeWidth + "px");
4816
5239
  const progressOuter = vue.ref();
5240
+ const insideText = vue.ref();
4817
5241
  const left = vue.ref();
4818
5242
  const bgStyle = vue.computed(() => {
4819
5243
  return {
@@ -4826,32 +5250,39 @@ var __publicField = (obj, key, value) => {
4826
5250
  color: props.textColor || ""
4827
5251
  };
4828
5252
  });
5253
+ const slideLeft = (values) => {
5254
+ if (props.textInside) {
5255
+ let offsetWidth = progressOuter.value.offsetWidth;
5256
+ let percentageWidth = progressOuter.value.offsetWidth * Number(values) * 0.01;
5257
+ let insideTextWidth = insideText.value.offsetWidth;
5258
+ left.value = percentageWidth - 5 + "px";
5259
+ if (offsetWidth == percentageWidth) {
5260
+ left.value = percentageWidth - insideTextWidth + "px";
5261
+ }
5262
+ }
5263
+ };
4829
5264
  vue.watch(() => props.percentage, (values) => {
4830
- console.log("progressOuter.value.offsetWidth", progressOuter.value.offsetWidth);
4831
- console.log("values", values);
4832
- left.value = progressOuter.value.offsetWidth * Number(values) * 0.01 - 5 + "px";
5265
+ slideLeft(values);
4833
5266
  });
4834
5267
  vue.onMounted(() => {
4835
- left.value = progressOuter.value.offsetWidth * Number(props.percentage) * 0.01 - 5 + "px";
5268
+ slideLeft(props.percentage);
4836
5269
  });
4837
5270
  return {
4838
5271
  height,
4839
5272
  bgStyle,
4840
5273
  textStyle,
4841
5274
  progressOuter,
5275
+ insideText,
4842
5276
  left
4843
5277
  };
4844
5278
  }
4845
5279
  });
4846
- const _hoisted_1$K = { class: "nut-progress" };
4847
- function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
5280
+ const _hoisted_1$M = { class: "nut-progress" };
5281
+ function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) {
4848
5282
  const _component_nut_icon = vue.resolveComponent("nut-icon");
4849
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$K, [
5283
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$M, [
4850
5284
  vue.createElementVNode("div", {
4851
- class: vue.normalizeClass(["nut-progress-outer", [
4852
- _ctx.showText && !_ctx.textInside ? "nut-progress-outer-part" : "",
4853
- _ctx.size ? "nut-progress-" + _ctx.size : ""
4854
- ]]),
5285
+ class: vue.normalizeClass(["nut-progress-outer", [_ctx.showText && !_ctx.textInside ? "nut-progress-outer-part" : "", _ctx.size ? "nut-progress-" + _ctx.size : ""]]),
4855
5286
  ref: "progressOuter",
4856
5287
  style: vue.normalizeStyle({ height: _ctx.height })
4857
5288
  }, [
@@ -4862,11 +5293,12 @@ var __publicField = (obj, key, value) => {
4862
5293
  _ctx.showText && _ctx.textInside ? (vue.openBlock(), vue.createElementBlock("div", {
4863
5294
  key: 0,
4864
5295
  class: "nut-progress-text nut-progress-insidetext",
5296
+ ref: "insideText",
4865
5297
  style: vue.normalizeStyle({ lineHeight: _ctx.height, left: _ctx.left })
4866
5298
  }, [
4867
5299
  vue.createElementVNode("span", {
4868
5300
  style: vue.normalizeStyle(_ctx.textStyle)
4869
- }, vue.toDisplayString(_ctx.percentage) + "%", 5)
5301
+ }, vue.toDisplayString(_ctx.percentage) + vue.toDisplayString(_ctx.isShowPercentage ? "%" : ""), 5)
4870
5302
  ], 4)) : vue.createCommentVNode("", true)
4871
5303
  ], 6)
4872
5304
  ], 6),
@@ -4878,7 +5310,7 @@ var __publicField = (obj, key, value) => {
4878
5310
  _ctx.status == "active" || _ctx.status == "" ? (vue.openBlock(), vue.createElementBlock("span", {
4879
5311
  key: 0,
4880
5312
  style: vue.normalizeStyle(_ctx.textStyle)
4881
- }, vue.toDisplayString(_ctx.percentage) + "%", 5)) : _ctx.status == "icon" ? (vue.openBlock(), vue.createBlock(_component_nut_icon, {
5313
+ }, vue.toDisplayString(_ctx.percentage) + vue.toDisplayString(_ctx.isShowPercentage ? "%" : ""), 5)) : _ctx.status == "icon" ? (vue.openBlock(), vue.createBlock(_component_nut_icon, {
4882
5314
  key: 1,
4883
5315
  size: "16px",
4884
5316
  name: _ctx.iconName,
@@ -4887,9 +5319,9 @@ var __publicField = (obj, key, value) => {
4887
5319
  ], 4)) : vue.createCommentVNode("", true)
4888
5320
  ]);
4889
5321
  }
4890
- var Progress = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$S]]);
4891
- const { componentName: componentName$G, create: create$W } = createComponent("circleprogress");
4892
- const _sfc_main$W = create$W({
5322
+ var Progress = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$U]]);
5323
+ const { componentName: componentName$I, create: create$Y } = createComponent("circleprogress");
5324
+ const _sfc_main$Y = create$Y({
4893
5325
  props: {
4894
5326
  progress: {
4895
5327
  type: [Number, String],
@@ -4911,7 +5343,7 @@ var __publicField = (obj, key, value) => {
4911
5343
  },
4912
5344
  setup(props, { emit }) {
4913
5345
  const classes = vue.computed(() => {
4914
- const prefixCls = componentName$G;
5346
+ const prefixCls = componentName$I;
4915
5347
  return {
4916
5348
  [prefixCls]: true
4917
5349
  };
@@ -4945,11 +5377,11 @@ var __publicField = (obj, key, value) => {
4945
5377
  };
4946
5378
  }
4947
5379
  });
4948
- const _hoisted_1$J = ["height", "width"];
4949
- const _hoisted_2$B = ["r", "cx", "cy", "stroke", "stroke-width"];
4950
- const _hoisted_3$s = ["r", "cx", "cy", "stroke", "stroke-dasharray", "stroke-width", "transform"];
4951
- const _hoisted_4$l = { class: "nut-circleprogress-content" };
4952
- function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
5380
+ const _hoisted_1$L = ["height", "width"];
5381
+ const _hoisted_2$D = ["r", "cx", "cy", "stroke", "stroke-width"];
5382
+ const _hoisted_3$u = ["r", "cx", "cy", "stroke", "stroke-dasharray", "stroke-width", "transform"];
5383
+ const _hoisted_4$n = { class: "nut-circleprogress-content" };
5384
+ function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) {
4953
5385
  return vue.openBlock(), vue.createElementBlock("div", {
4954
5386
  class: vue.normalizeClass(_ctx.classes),
4955
5387
  style: vue.normalizeStyle({ height: _ctx.option.size + "px", width: _ctx.option.size + "px" })
@@ -4966,7 +5398,7 @@ var __publicField = (obj, key, value) => {
4966
5398
  stroke: _ctx.option.backColor,
4967
5399
  "stroke-width": _ctx.option.strokeOutWidth,
4968
5400
  fill: "none"
4969
- }, null, 8, _hoisted_2$B),
5401
+ }, null, 8, _hoisted_2$D),
4970
5402
  vue.createElementVNode("circle", {
4971
5403
  r: _ctx.option.radius,
4972
5404
  cx: _ctx.option.cx,
@@ -4978,18 +5410,18 @@ var __publicField = (obj, key, value) => {
4978
5410
  transform: _ctx.option.startPosition,
4979
5411
  "stroke-linecap": "round",
4980
5412
  style: { "transition": "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease 0s" }
4981
- }, null, 8, _hoisted_3$s)
4982
- ], 8, _hoisted_1$J)),
4983
- vue.createElementVNode("div", _hoisted_4$l, [
5413
+ }, null, 8, _hoisted_3$u)
5414
+ ], 8, _hoisted_1$L)),
5415
+ vue.createElementVNode("div", _hoisted_4$n, [
4984
5416
  !_ctx.isAuto ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
4985
5417
  vue.createTextVNode(vue.toDisplayString(_ctx.progress) + "%", 1)
4986
5418
  ]) : vue.renderSlot(_ctx.$slots, "default", { key: 1 })
4987
5419
  ])
4988
5420
  ], 6);
4989
5421
  }
4990
- var CircleProgress = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$R]]);
4991
- const { componentName: componentName$F, create: create$V } = createComponent("noticebar");
4992
- const _sfc_main$V = create$V({
5422
+ var CircleProgress = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$T]]);
5423
+ const { componentName: componentName$H, create: create$X } = createComponent("noticebar");
5424
+ const _sfc_main$X = create$X({
4993
5425
  props: {
4994
5426
  direction: {
4995
5427
  type: String,
@@ -5055,7 +5487,6 @@ var __publicField = (obj, key, value) => {
5055
5487
  },
5056
5488
  emits: ["click", "close"],
5057
5489
  setup(props, { emit, slots }) {
5058
- console.log("componentName", componentName$F);
5059
5490
  const wrap = vue.ref(null);
5060
5491
  const content = vue.ref(null);
5061
5492
  const state = vue.reactive({
@@ -5072,7 +5503,7 @@ var __publicField = (obj, key, value) => {
5072
5503
  keepAlive: false
5073
5504
  });
5074
5505
  const classes = vue.computed(() => {
5075
- const prefixCls = componentName$F;
5506
+ const prefixCls = componentName$H;
5076
5507
  return {
5077
5508
  [prefixCls]: true
5078
5509
  };
@@ -5201,14 +5632,12 @@ var __publicField = (obj, key, value) => {
5201
5632
  emit("close", state.scrollList[0]);
5202
5633
  };
5203
5634
  vue.onMounted(() => {
5204
- console.log(props.direction);
5205
5635
  if (props.direction == "vertical") {
5206
5636
  if (slots.default) {
5207
5637
  state.scrollList = [].concat(slots.default()[0].children);
5208
5638
  } else {
5209
5639
  state.scrollList = [].concat(props.list);
5210
5640
  }
5211
- console.log(state.scrollList);
5212
5641
  setTimeout(() => {
5213
5642
  props.complexAm ? startRoll() : startRollEasy();
5214
5643
  }, props.standTime);
@@ -5246,12 +5675,12 @@ var __publicField = (obj, key, value) => {
5246
5675
  });
5247
5676
  }
5248
5677
  });
5249
- const _hoisted_1$I = {
5678
+ const _hoisted_1$K = {
5250
5679
  ref: "wrap",
5251
5680
  class: "wrap"
5252
5681
  };
5253
- const _hoisted_2$A = ["onClick"];
5254
- function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
5682
+ const _hoisted_2$C = ["onClick"];
5683
+ function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) {
5255
5684
  const _component_nut_icon = vue.resolveComponent("nut-icon");
5256
5685
  const _component_ScrollItem = vue.resolveComponent("ScrollItem");
5257
5686
  return vue.openBlock(), vue.createElementBlock("view", {
@@ -5275,7 +5704,7 @@ var __publicField = (obj, key, value) => {
5275
5704
  color: _ctx.color
5276
5705
  }, null, 8, ["color"])) : vue.createCommentVNode("", true)
5277
5706
  ], 4)) : vue.createCommentVNode("", true),
5278
- vue.createElementVNode("view", _hoisted_1$I, [
5707
+ vue.createElementVNode("view", _hoisted_1$K, [
5279
5708
  vue.createElementVNode("view", {
5280
5709
  ref: "content",
5281
5710
  class: vue.normalizeClass(["content", [_ctx.animationClass, { "nut-ellipsis": !_ctx.scrollable && !_ctx.wrapable }]]),
@@ -5329,7 +5758,7 @@ var __publicField = (obj, key, value) => {
5329
5758
  key: index,
5330
5759
  style: vue.normalizeStyle({ height: _ctx.height }),
5331
5760
  onClick: ($event) => _ctx.go(item)
5332
- }, vue.toDisplayString(item), 13, _hoisted_2$A);
5761
+ }, vue.toDisplayString(item), 13, _hoisted_2$C);
5333
5762
  }), 128))
5334
5763
  ], 4)),
5335
5764
  vue.createElementVNode("view", {
@@ -5346,9 +5775,9 @@ var __publicField = (obj, key, value) => {
5346
5775
  ], 4)) : vue.createCommentVNode("", true)
5347
5776
  ], 2);
5348
5777
  }
5349
- var NoticeBar = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$Q]]);
5350
- const { create: create$U } = createComponent("searchbar");
5351
- const _sfc_main$U = create$U({
5778
+ var NoticeBar = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$S]]);
5779
+ const { create: create$W } = createComponent("searchbar");
5780
+ const _sfc_main$W = create$W({
5352
5781
  props: {
5353
5782
  modelValue: {
5354
5783
  type: [String, Number],
@@ -5439,41 +5868,41 @@ var __publicField = (obj, key, value) => {
5439
5868
  });
5440
5869
  }
5441
5870
  });
5442
- const _hoisted_1$H = {
5871
+ const _hoisted_1$J = {
5443
5872
  key: 0,
5444
5873
  class: "nut-searchbar__search-icon nut-searchbar__left-search-icon"
5445
5874
  };
5446
- const _hoisted_2$z = {
5875
+ const _hoisted_2$B = {
5447
5876
  key: 0,
5448
5877
  class: "nut-searchbar__search-icon nut-searchbar__iptleft-search-icon"
5449
5878
  };
5450
- const _hoisted_3$r = { class: "nut-searchbar__input-inner" };
5451
- const _hoisted_4$k = ["type", "maxlength", "placeholder", "value"];
5452
- const _hoisted_5$d = {
5879
+ const _hoisted_3$t = { class: "nut-searchbar__input-inner" };
5880
+ const _hoisted_4$m = ["type", "maxlength", "placeholder", "value"];
5881
+ const _hoisted_5$e = {
5453
5882
  key: 1,
5454
5883
  class: "nut-searchbar__search-icon nut-searchbar__iptright-sarch-icon"
5455
5884
  };
5456
- const _hoisted_6$a = {
5885
+ const _hoisted_6$b = {
5457
5886
  key: 1,
5458
5887
  class: "nut-searchbar__search-icon nut-searchbar__right-search-icon"
5459
5888
  };
5460
- function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
5889
+ function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) {
5461
5890
  const _component_nut_icon = vue.resolveComponent("nut-icon");
5462
5891
  return vue.openBlock(), vue.createElementBlock("view", {
5463
5892
  class: "nut-searchbar",
5464
5893
  style: vue.normalizeStyle(_ctx.searchbarStyle)
5465
5894
  }, [
5466
- _ctx.$slots.leftout ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$H, [
5895
+ _ctx.$slots.leftout ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$J, [
5467
5896
  vue.renderSlot(_ctx.$slots, "leftout")
5468
5897
  ])) : vue.createCommentVNode("", true),
5469
5898
  vue.createElementVNode("view", {
5470
5899
  class: "nut-searchbar__search-input",
5471
5900
  style: vue.normalizeStyle(_ctx.inputSearchbarStyle)
5472
5901
  }, [
5473
- _ctx.$slots.leftin ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$z, [
5902
+ _ctx.$slots.leftin ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$B, [
5474
5903
  vue.renderSlot(_ctx.$slots, "leftin")
5475
5904
  ])) : vue.createCommentVNode("", true),
5476
- vue.createElementVNode("view", _hoisted_3$r, [
5905
+ vue.createElementVNode("view", _hoisted_3$t, [
5477
5906
  vue.createElementVNode("form", {
5478
5907
  action: "#",
5479
5908
  onSubmit: _cache[3] || (_cache[3] = vue.withModifiers((...args) => _ctx.handleSubmit && _ctx.handleSubmit(...args), ["prevent"]))
@@ -5487,7 +5916,7 @@ var __publicField = (obj, key, value) => {
5487
5916
  onInput: _cache[0] || (_cache[0] = (...args) => _ctx.valueChange && _ctx.valueChange(...args)),
5488
5917
  onFocus: _cache[1] || (_cache[1] = (...args) => _ctx.valueFocus && _ctx.valueFocus(...args)),
5489
5918
  onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.valueBlur && _ctx.valueBlur(...args))
5490
- }, null, 40, _hoisted_4$k)
5919
+ }, null, 40, _hoisted_4$m)
5491
5920
  ], 32),
5492
5921
  _ctx.clearable ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("view", {
5493
5922
  key: 0,
@@ -5503,23 +5932,23 @@ var __publicField = (obj, key, value) => {
5503
5932
  [vue.vShow, _ctx.modelValue.length > 0]
5504
5933
  ]) : vue.createCommentVNode("", true)
5505
5934
  ]),
5506
- _ctx.$slots.rightin ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_5$d, [
5935
+ _ctx.$slots.rightin ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_5$e, [
5507
5936
  vue.renderSlot(_ctx.$slots, "rightin")
5508
5937
  ])) : vue.createCommentVNode("", true)
5509
5938
  ], 4),
5510
- _ctx.$slots.rightout ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_6$a, [
5939
+ _ctx.$slots.rightout ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_6$b, [
5511
5940
  vue.renderSlot(_ctx.$slots, "rightout")
5512
5941
  ])) : vue.createCommentVNode("", true)
5513
5942
  ], 4);
5514
5943
  }
5515
- var SearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$P]]);
5516
- const { componentName: componentName$E, create: create$T } = createComponent("empty");
5944
+ var SearchBar = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$R]]);
5945
+ const { componentName: componentName$G, create: create$V } = createComponent("empty");
5517
5946
  const defaultStatus = {
5518
5947
  empty: "https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png",
5519
5948
  error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
5520
5949
  network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
5521
5950
  };
5522
- const _sfc_main$T = create$T({
5951
+ const _sfc_main$V = create$V({
5523
5952
  props: {
5524
5953
  image: {
5525
5954
  type: String,
@@ -5553,31 +5982,389 @@ var __publicField = (obj, key, value) => {
5553
5982
  };
5554
5983
  }
5555
5984
  });
5556
- const _hoisted_1$G = { class: "nut-empty" };
5557
- const _hoisted_2$y = ["src"];
5558
- const _hoisted_3$q = {
5985
+ const _hoisted_1$I = { class: "nut-empty" };
5986
+ const _hoisted_2$A = ["src"];
5987
+ const _hoisted_3$s = {
5559
5988
  key: 1,
5560
5989
  class: "nut-empty-description"
5561
5990
  };
5562
- function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
5563
- return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$G, [
5991
+ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
5992
+ return vue.openBlock(), vue.createElementBlock("view", _hoisted_1$I, [
5564
5993
  vue.createElementVNode("view", {
5565
5994
  class: "nut-empty-image",
5566
5995
  style: vue.normalizeStyle(_ctx.imgStyle)
5567
5996
  }, [
5568
- _ctx.$slots.image ? vue.renderSlot(_ctx.$slots, "image", { key: 0 }) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
5569
- _ctx.imageUrl ? (vue.openBlock(), vue.createElementBlock("img", {
5570
- key: 0,
5571
- class: "img",
5572
- src: _ctx.imageUrl
5573
- }, null, 8, _hoisted_2$y)) : vue.createCommentVNode("", true)
5574
- ], 64))
5575
- ], 4),
5576
- _ctx.$slots.description ? vue.renderSlot(_ctx.$slots, "description", { key: 0 }) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$q, vue.toDisplayString(_ctx.description), 1)),
5577
- _ctx.$slots.default ? vue.renderSlot(_ctx.$slots, "default", { key: 2 }) : vue.createCommentVNode("", true)
5997
+ _ctx.$slots.image ? vue.renderSlot(_ctx.$slots, "image", { key: 0 }) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
5998
+ _ctx.imageUrl ? (vue.openBlock(), vue.createElementBlock("img", {
5999
+ key: 0,
6000
+ class: "img",
6001
+ src: _ctx.imageUrl
6002
+ }, null, 8, _hoisted_2$A)) : vue.createCommentVNode("", true)
6003
+ ], 64))
6004
+ ], 4),
6005
+ _ctx.$slots.description ? vue.renderSlot(_ctx.$slots, "description", { key: 0 }) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$s, vue.toDisplayString(_ctx.description), 1)),
6006
+ _ctx.$slots.default ? vue.renderSlot(_ctx.$slots, "default", { key: 2 }) : vue.createCommentVNode("", true)
6007
+ ]);
6008
+ }
6009
+ var Empty = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$Q]]);
6010
+ const { componentName: componentName$F, create: create$U } = createComponent("audio");
6011
+ const _sfc_main$U = create$U({
6012
+ props: {
6013
+ url: {
6014
+ type: String,
6015
+ default() {
6016
+ return "";
6017
+ }
6018
+ },
6019
+ muted: {
6020
+ type: Boolean,
6021
+ default() {
6022
+ return false;
6023
+ }
6024
+ },
6025
+ autoplay: {
6026
+ type: Boolean,
6027
+ default() {
6028
+ return false;
6029
+ }
6030
+ },
6031
+ loop: {
6032
+ type: Boolean,
6033
+ default() {
6034
+ return false;
6035
+ }
6036
+ },
6037
+ preload: {
6038
+ type: String,
6039
+ default() {
6040
+ return "auto";
6041
+ }
6042
+ },
6043
+ second: {
6044
+ type: Number,
6045
+ default() {
6046
+ return 0;
6047
+ }
6048
+ },
6049
+ type: {
6050
+ type: String,
6051
+ default() {
6052
+ return "progress";
6053
+ }
6054
+ }
6055
+ },
6056
+ components: {},
6057
+ emits: ["fastBack", "play", "forward", "ended", "changeProgress", "mute"],
6058
+ setup(props, { emit }) {
6059
+ const audioRef = vue.ref(null);
6060
+ const audioData = vue.reactive({
6061
+ currentTime: 0,
6062
+ currentDuration: "00:00:00",
6063
+ percent: 0,
6064
+ duration: "00:00:00",
6065
+ second: 0,
6066
+ hanMuted: props.muted,
6067
+ playing: props.autoplay
6068
+ });
6069
+ vue.onMounted(() => {
6070
+ var arr = ["webkitVisibilityState", "visibilitychange"];
6071
+ try {
6072
+ for (let i = 0; i < arr.length; i++) {
6073
+ document.addEventListener(arr[i], () => {
6074
+ if (document.hidden) {
6075
+ audioRef.value.pause();
6076
+ } else {
6077
+ if (audioData.playing) {
6078
+ setTimeout(() => {
6079
+ audioRef.value.play();
6080
+ }, 200);
6081
+ }
6082
+ }
6083
+ });
6084
+ }
6085
+ } catch (e) {
6086
+ console.log(e.message);
6087
+ }
6088
+ setTimeout(() => {
6089
+ if (props.autoplay) {
6090
+ if (audioRef.value && audioRef.value.paused) {
6091
+ audioRef.value.play();
6092
+ }
6093
+ }
6094
+ audioData.second = audioRef.value.duration;
6095
+ audioData.duration = formatSeconds(audioRef.value.duration);
6096
+ }, 500);
6097
+ });
6098
+ const onTimeupdate = (e) => {
6099
+ audioData.currentTime = parseInt(e.target.currentTime);
6100
+ };
6101
+ const fastBack = () => {
6102
+ audioData.currentTime--;
6103
+ audioRef.value.currentTime = audioData.currentTime;
6104
+ emit("fastBack", audioData.currentTime);
6105
+ };
6106
+ const changeStatus = () => {
6107
+ if (audioData.playing) {
6108
+ audioRef.value.pause();
6109
+ audioData.handPlaying = false;
6110
+ } else {
6111
+ audioRef.value.play();
6112
+ audioData.handPlaying = true;
6113
+ }
6114
+ audioData.playing = !audioData.playing;
6115
+ emit("play", audioData.playing);
6116
+ };
6117
+ const forward = () => {
6118
+ audioData.currentTime++;
6119
+ audioRef.value.currentTime = audioData.currentTime;
6120
+ emit("forward", audioData.currentTime);
6121
+ };
6122
+ const handle = (val) => {
6123
+ audioData.currentDuration = formatSeconds(val);
6124
+ audioData.percent = val / audioData.second * 100;
6125
+ };
6126
+ const audioEnd = () => {
6127
+ audioData.playing = false;
6128
+ emit("ended");
6129
+ };
6130
+ const progressChange = (val) => {
6131
+ audioRef.value.currentTime = audioData.second * val / 100;
6132
+ emit("changeProgress", audioRef.value.currentTime);
6133
+ };
6134
+ const handleMute = () => {
6135
+ audioData.hanMuted = !audioData.hanMuted;
6136
+ emit("mute", audioData.hanMuted);
6137
+ };
6138
+ const formatSeconds = (value) => {
6139
+ let theTime = parseInt(value);
6140
+ let theTime1 = 0;
6141
+ let theTime2 = 0;
6142
+ if (theTime > 60) {
6143
+ theTime1 = parseInt(theTime / 60);
6144
+ theTime = parseInt(theTime % 60);
6145
+ if (theTime1 > 60) {
6146
+ theTime2 = parseInt(theTime1 / 60);
6147
+ theTime1 = parseInt(theTime1 % 60);
6148
+ }
6149
+ }
6150
+ let result = "" + parseInt(theTime);
6151
+ if (result < 10) {
6152
+ result = "0" + result;
6153
+ }
6154
+ if (theTime1 > 0) {
6155
+ result = "" + parseInt(theTime1) + ":" + result;
6156
+ if (theTime1 < 10) {
6157
+ result = "0" + result;
6158
+ }
6159
+ } else {
6160
+ result = "00:" + result;
6161
+ }
6162
+ if (theTime2 > 0) {
6163
+ result = "" + parseInt(theTime2) + ":" + result;
6164
+ if (theTime2 < 10) {
6165
+ result = "0" + result;
6166
+ }
6167
+ } else {
6168
+ result = "00:" + result;
6169
+ }
6170
+ return result;
6171
+ };
6172
+ vue.watch(() => audioData.currentTime, (value) => {
6173
+ handle(value);
6174
+ });
6175
+ vue.provide("audioParent", {
6176
+ children: [],
6177
+ props,
6178
+ audioData,
6179
+ handleMute,
6180
+ forward,
6181
+ fastBack,
6182
+ changeStatus
6183
+ });
6184
+ return __spreadProps(__spreadValues(__spreadValues({}, vue.toRefs(props)), vue.toRefs(audioData)), {
6185
+ audioRef,
6186
+ fastBack,
6187
+ forward,
6188
+ changeStatus,
6189
+ progressChange,
6190
+ audioEnd,
6191
+ onTimeupdate,
6192
+ handleMute
6193
+ });
6194
+ }
6195
+ });
6196
+ const _hoisted_1$H = { class: "nut-audio" };
6197
+ const _hoisted_2$z = {
6198
+ key: 0,
6199
+ class: "progress-wrapper"
6200
+ };
6201
+ const _hoisted_3$r = { class: "time" };
6202
+ const _hoisted_4$l = { class: "progress-bar-wrapper" };
6203
+ const _hoisted_5$d = /* @__PURE__ */ vue.createElementVNode("div", { class: "custom-button" }, null, -1);
6204
+ const _hoisted_6$a = { class: "time" };
6205
+ const _hoisted_7$8 = {
6206
+ key: 1,
6207
+ class: "nut-audio-icon"
6208
+ };
6209
+ const _hoisted_8$8 = ["controls", "src", "preload", "autoplay", "loop", "muted"];
6210
+ function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
6211
+ const _component_nut_range = vue.resolveComponent("nut-range");
6212
+ const _component_nut_icon = vue.resolveComponent("nut-icon");
6213
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$H, [
6214
+ _ctx.type == "progress" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$z, [
6215
+ vue.createElementVNode("div", _hoisted_3$r, vue.toDisplayString(_ctx.currentDuration), 1),
6216
+ vue.createElementVNode("div", _hoisted_4$l, [
6217
+ vue.createVNode(_component_nut_range, {
6218
+ modelValue: _ctx.percent,
6219
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.percent = $event),
6220
+ "hidden-range": "",
6221
+ onChange: _ctx.progressChange,
6222
+ "inactive-color": "#cccccc",
6223
+ "active-color": "#fa2c19"
6224
+ }, {
6225
+ button: vue.withCtx(() => [
6226
+ _hoisted_5$d
6227
+ ]),
6228
+ _: 1
6229
+ }, 8, ["modelValue", "onChange"])
6230
+ ]),
6231
+ vue.createElementVNode("div", _hoisted_6$a, vue.toDisplayString(_ctx.duration), 1)
6232
+ ])) : vue.createCommentVNode("", true),
6233
+ _ctx.type == "icon" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$8, [
6234
+ vue.createElementVNode("div", {
6235
+ class: vue.normalizeClass(["nut-audio-icon-box", _ctx.playing ? "nut-audio-icon-play" : "nut-audio-icon-stop"]),
6236
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
6237
+ }, [
6238
+ _ctx.playing ? (vue.openBlock(), vue.createBlock(_component_nut_icon, {
6239
+ key: 0,
6240
+ name: "service",
6241
+ class: "nut-icon-am-rotate nut-icon-am-infinite"
6242
+ })) : vue.createCommentVNode("", true),
6243
+ !_ctx.playing ? (vue.openBlock(), vue.createBlock(_component_nut_icon, {
6244
+ key: 1,
6245
+ name: "service"
6246
+ })) : vue.createCommentVNode("", true)
6247
+ ], 2)
6248
+ ])) : vue.createCommentVNode("", true),
6249
+ _ctx.type == "none" ? (vue.openBlock(), vue.createElementBlock("div", {
6250
+ key: 2,
6251
+ onClick: _cache[2] || (_cache[2] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
6252
+ }, [
6253
+ vue.renderSlot(_ctx.$slots, "default")
6254
+ ])) : vue.createCommentVNode("", true),
6255
+ _ctx.type != "none" ? vue.renderSlot(_ctx.$slots, "default", { key: 3 }) : vue.createCommentVNode("", true),
6256
+ vue.createElementVNode("audio", {
6257
+ class: "audioMain",
6258
+ controls: _ctx.type == "controls",
6259
+ ref: "audioRef",
6260
+ src: _ctx.url,
6261
+ preload: _ctx.preload,
6262
+ autoplay: _ctx.autoplay,
6263
+ loop: _ctx.loop,
6264
+ onTimeupdate: _cache[3] || (_cache[3] = (...args) => _ctx.onTimeupdate && _ctx.onTimeupdate(...args)),
6265
+ onEnded: _cache[4] || (_cache[4] = (...args) => _ctx.audioEnd && _ctx.audioEnd(...args)),
6266
+ muted: _ctx.hanMuted
6267
+ }, null, 40, _hoisted_8$8)
6268
+ ]);
6269
+ }
6270
+ var Audio = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$P]]);
6271
+ const { componentName: componentName$E, create: create$T } = createComponent("audio-operate");
6272
+ const _sfc_main$T = create$T({
6273
+ props: {
6274
+ type: {
6275
+ type: Array,
6276
+ default() {
6277
+ return "play";
6278
+ }
6279
+ }
6280
+ },
6281
+ components: {},
6282
+ emits: ["click"],
6283
+ setup(props, { emit }) {
6284
+ const audio = vue.inject("audioParent");
6285
+ const parent = vue.reactive(audio);
6286
+ const customSlot = vue.ref(vue.useSlots().default);
6287
+ return __spreadProps(__spreadValues(__spreadValues({}, vue.toRefs(props)), vue.toRefs(parent)), { customSlot });
6288
+ }
6289
+ });
6290
+ const _hoisted_1$G = { class: "nut-audio-operate" };
6291
+ const _hoisted_2$y = /* @__PURE__ */ vue.createTextVNode("\u5012\u9000");
6292
+ const _hoisted_3$q = /* @__PURE__ */ vue.createTextVNode("\u5FEB\u8FDB");
6293
+ const _hoisted_4$k = /* @__PURE__ */ vue.createTextVNode("\u9759\u97F3");
6294
+ function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
6295
+ const _component_nut_button = vue.resolveComponent("nut-button");
6296
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$G, [
6297
+ _ctx.type == "back" ? (vue.openBlock(), vue.createElementBlock("div", {
6298
+ key: 0,
6299
+ class: "nut-audio-operate-item",
6300
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.fastBack && _ctx.fastBack(...args))
6301
+ }, [
6302
+ !_ctx.customSlot ? (vue.openBlock(), vue.createBlock(_component_nut_button, {
6303
+ key: 0,
6304
+ type: "primary",
6305
+ size: "small"
6306
+ }, {
6307
+ default: vue.withCtx(() => [
6308
+ _hoisted_2$y
6309
+ ]),
6310
+ _: 1
6311
+ })) : vue.createCommentVNode("", true),
6312
+ vue.renderSlot(_ctx.$slots, "default")
6313
+ ])) : vue.createCommentVNode("", true),
6314
+ _ctx.type == "play" ? (vue.openBlock(), vue.createElementBlock("div", {
6315
+ key: 1,
6316
+ class: "nut-audio-operate-item",
6317
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.changeStatus && _ctx.changeStatus(...args))
6318
+ }, [
6319
+ !_ctx.customSlot ? (vue.openBlock(), vue.createBlock(_component_nut_button, {
6320
+ key: 0,
6321
+ type: "primary",
6322
+ size: "small"
6323
+ }, {
6324
+ default: vue.withCtx(() => [
6325
+ vue.createTextVNode(vue.toDisplayString(!_ctx.audioData.playing ? "\u5F00\u59CB" : "\u6682\u505C"), 1)
6326
+ ]),
6327
+ _: 1
6328
+ })) : vue.createCommentVNode("", true),
6329
+ vue.renderSlot(_ctx.$slots, "default")
6330
+ ])) : vue.createCommentVNode("", true),
6331
+ _ctx.type == "forward" ? (vue.openBlock(), vue.createElementBlock("div", {
6332
+ key: 2,
6333
+ class: "nut-audio-operate-item",
6334
+ onClick: _cache[2] || (_cache[2] = (...args) => _ctx.forward && _ctx.forward(...args))
6335
+ }, [
6336
+ !_ctx.customSlot ? (vue.openBlock(), vue.createBlock(_component_nut_button, {
6337
+ key: 0,
6338
+ type: "primary",
6339
+ size: "small"
6340
+ }, {
6341
+ default: vue.withCtx(() => [
6342
+ _hoisted_3$q
6343
+ ]),
6344
+ _: 1
6345
+ })) : vue.createCommentVNode("", true),
6346
+ vue.renderSlot(_ctx.$slots, "default")
6347
+ ])) : vue.createCommentVNode("", true),
6348
+ _ctx.type == "mute" ? (vue.openBlock(), vue.createElementBlock("div", {
6349
+ key: 3,
6350
+ class: "nut-audio-operate-item",
6351
+ onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleMute && _ctx.handleMute(...args))
6352
+ }, [
6353
+ !_ctx.customSlot ? (vue.openBlock(), vue.createBlock(_component_nut_button, {
6354
+ key: 0,
6355
+ type: !_ctx.audioData.hanMuted ? "primary" : "default",
6356
+ size: "small"
6357
+ }, {
6358
+ default: vue.withCtx(() => [
6359
+ _hoisted_4$k
6360
+ ]),
6361
+ _: 1
6362
+ }, 8, ["type"])) : vue.createCommentVNode("", true),
6363
+ vue.renderSlot(_ctx.$slots, "default")
6364
+ ])) : vue.createCommentVNode("", true)
5578
6365
  ]);
5579
6366
  }
5580
- var Empty = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$O]]);
6367
+ var AudioOperate = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$O]]);
5581
6368
  const { componentName: componentName$D, create: create$S } = createComponent("navbar");
5582
6369
  const _sfc_main$S = create$S({
5583
6370
  props: {
@@ -5952,7 +6739,7 @@ var __publicField = (obj, key, value) => {
5952
6739
  }
5953
6740
  },
5954
6741
  components: {
5955
- [_sfc_main$1o.name]: _sfc_main$1o,
6742
+ [_sfc_main$1s.name]: _sfc_main$1s,
5956
6743
  [Popup.name]: Popup
5957
6744
  },
5958
6745
  emits: ["update:modelValue", "change"],
@@ -6311,7 +7098,8 @@ var __publicField = (obj, key, value) => {
6311
7098
  y2: 0
6312
7099
  },
6313
7100
  scrollStart: false,
6314
- currentIndex: 0
7101
+ currentIndex: 0,
7102
+ currentData: {}
6315
7103
  });
6316
7104
  const classes = vue.computed(() => {
6317
7105
  const prefixCls = componentName$z;
@@ -6371,7 +7159,6 @@ var __publicField = (obj, key, value) => {
6371
7159
  state.touchState.y1 = firstTouch.pageY;
6372
7160
  state.anchorIndex = +index;
6373
7161
  state.currentIndex = +index;
6374
- console.log(state.currentIndex);
6375
7162
  scrollTo(+index);
6376
7163
  };
6377
7164
  const touchMove = (e) => {
@@ -6386,10 +7173,14 @@ var __publicField = (obj, key, value) => {
6386
7173
  };
6387
7174
  const handleClickItem = (key, item) => {
6388
7175
  context.emit("click-item", key, item);
7176
+ state.currentData = item;
6389
7177
  };
6390
7178
  const handleClickIndex = (key) => {
6391
7179
  context.emit("click-index", key);
6392
7180
  };
7181
+ useExpose({
7182
+ scrollTo
7183
+ });
6393
7184
  return __spreadProps(__spreadValues({
6394
7185
  classes
6395
7186
  }, vue.toRefs(state)), {
@@ -6426,11 +7217,11 @@ var __publicField = (obj, key, value) => {
6426
7217
  vue.createElementVNode("view", _hoisted_1$A, vue.toDisplayString(item[_ctx.acceptKey]), 1),
6427
7218
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.list, (subitem) => {
6428
7219
  return vue.openBlock(), vue.createElementBlock("view", {
6429
- class: "nut-elevator__list__item__name",
7220
+ class: vue.normalizeClass(["nut-elevator__list__item__name", { "nut-elevator__list__item__name--highcolor": _ctx.currentData.id === subitem.id }]),
6430
7221
  key: subitem["id"],
6431
7222
  onClick: ($event) => _ctx.handleClickItem(item[_ctx.acceptKey], subitem),
6432
7223
  innerHTML: subitem.name
6433
- }, null, 8, _hoisted_2$t);
7224
+ }, null, 10, _hoisted_2$t);
6434
7225
  }), 128))
6435
7226
  ]);
6436
7227
  }), 128))
@@ -7442,12 +8233,36 @@ var __publicField = (obj, key, value) => {
7442
8233
  type: Boolean,
7443
8234
  default: true
7444
8235
  },
8236
+ showTitle: {
8237
+ type: Boolean,
8238
+ default: true
8239
+ },
8240
+ showSubTitle: {
8241
+ type: Boolean,
8242
+ default: true
8243
+ },
8244
+ showToday: {
8245
+ type: Boolean,
8246
+ default: true
8247
+ },
7445
8248
  title: {
7446
8249
  type: String,
7447
8250
  default: "\u65E5\u5386\u9009\u62E9"
7448
8251
  },
7449
- defaultValue: {
8252
+ confirmText: {
8253
+ type: String,
8254
+ default: "\u786E\u8BA4"
8255
+ },
8256
+ startText: {
8257
+ type: String,
8258
+ default: "\u5F00\u59CB"
8259
+ },
8260
+ endText: {
7450
8261
  type: String,
8262
+ default: "\u7ED3\u675F"
8263
+ },
8264
+ defaultValue: {
8265
+ type: [String, Array],
7451
8266
  default: null
7452
8267
  },
7453
8268
  startDate: {
@@ -7459,15 +8274,32 @@ var __publicField = (obj, key, value) => {
7459
8274
  default: Utils.getDay(365)
7460
8275
  }
7461
8276
  },
7462
- emits: ["choose", "update", "close"],
7463
- setup(props, { emit }) {
8277
+ emits: ["choose", "update", "close", "select"],
8278
+ setup(props, { emit, slots }) {
7464
8279
  const weeks = vue.ref(["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"]);
7465
8280
  const months = vue.ref(null);
7466
8281
  const monthsPanel = vue.ref(null);
7467
8282
  const weeksPanel = vue.ref(null);
8283
+ const viewArea = vue.ref(null);
8284
+ const viewHeight = vue.ref(0);
8285
+ const compConthsData = vue.computed(() => {
8286
+ return state.monthsData.slice(state.defaultRange[0], state.defaultRange[1]);
8287
+ });
8288
+ const showTopBtn = vue.computed(() => {
8289
+ return slots.btn;
8290
+ });
8291
+ const topInfo = vue.computed(() => {
8292
+ return slots.topInfo;
8293
+ });
8294
+ const bottomInfo = vue.computed(() => {
8295
+ return slots.bottomInfo;
8296
+ });
7468
8297
  const state = vue.reactive({
7469
8298
  yearMonthTitle: "",
8299
+ defaultRange: [],
7470
8300
  currDate: "",
8301
+ propStartDate: "",
8302
+ propEndDate: "",
7471
8303
  unLoadPrev: false,
7472
8304
  touchParams: {
7473
8305
  startY: 0,
@@ -7487,7 +8319,10 @@ var __publicField = (obj, key, value) => {
7487
8319
  startData: "",
7488
8320
  endData: "",
7489
8321
  isRange: props.type === "range",
7490
- timer: 0
8322
+ timer: 0,
8323
+ currentIndex: 0,
8324
+ avgHeight: 0,
8325
+ monthsNum: 0
7491
8326
  });
7492
8327
  const splitDate = (date) => {
7493
8328
  return date.split("-");
@@ -7499,14 +8334,14 @@ var __publicField = (obj, key, value) => {
7499
8334
  return Utils.isEqual(state.currDate[1], currDate);
7500
8335
  };
7501
8336
  const getCurrDate = (day, month, isRange) => {
7502
- return isRange ? month.curData[3] + "-" + month.curData[4] + "-" + Utils.getNumTwoBit(+day.day) : month.curData[0] + "-" + month.curData[1] + "-" + Utils.getNumTwoBit(+day.day);
8337
+ return month.curData[0] + "-" + month.curData[1] + "-" + Utils.getNumTwoBit(+day.day);
7503
8338
  };
7504
8339
  const getClass = (day, month, isRange) => {
7505
- const currDate = getCurrDate(day, month, isRange);
8340
+ const currDate = getCurrDate(day, month);
7506
8341
  if (day.type == "curr") {
7507
8342
  if (!state.isRange && Utils.isEqual(state.currDate, currDate) || state.isRange && (isStart(currDate) || isEnd(currDate))) {
7508
8343
  return `${state.dayPrefix}-active`;
7509
- } else if (props.startDate && Utils.compareDate(currDate, props.startDate) || props.endDate && Utils.compareDate(props.endDate, currDate)) {
8344
+ } else if (state.propStartDate && Utils.compareDate(currDate, state.propStartDate) || state.propEndDate && Utils.compareDate(state.propEndDate, currDate)) {
7510
8345
  return `${state.dayPrefix}-disabled`;
7511
8346
  } else if (state.isRange && Array.isArray(state.currDate) && Object.values(state.currDate).length == 2 && Utils.compareDate(state.currDate[0], currDate) && Utils.compareDate(currDate, state.currDate[1])) {
7512
8347
  return `${state.dayPrefix}-choose`;
@@ -7526,9 +8361,8 @@ var __publicField = (obj, key, value) => {
7526
8361
  }
7527
8362
  };
7528
8363
  const chooseDay = (day, month, isFirst, isRange) => {
7529
- if (getClass(day, month, isRange) != `${state.dayPrefix}-disabled`) {
8364
+ if (getClass(day, month) != `${state.dayPrefix}-disabled`) {
7530
8365
  let days = [...month.curData];
7531
- days = isRange ? days.splice(3) : days.splice(0, 3);
7532
8366
  days[2] = typeof day.day == "number" ? Utils.getNumTwoBit(day.day) : day.day;
7533
8367
  days[3] = `${days[0]}-${days[1]}-${days[2]}`;
7534
8368
  days[4] = Utils.getWhatDay(+days[0], +days[1], +days[2]);
@@ -7555,8 +8389,11 @@ var __publicField = (obj, key, value) => {
7555
8389
  }
7556
8390
  }
7557
8391
  }
7558
- if (props.isAutoBackFill && !isFirst) {
7559
- confirm();
8392
+ if (!isFirst) {
8393
+ emit("select", state.chooseData);
8394
+ if (props.isAutoBackFill) {
8395
+ confirm();
8396
+ }
7560
8397
  }
7561
8398
  }
7562
8399
  };
@@ -7574,26 +8411,47 @@ var __publicField = (obj, key, value) => {
7574
8411
  month = month == 12 ? 1 : ++month;
7575
8412
  break;
7576
8413
  }
7577
- return [
7578
- year,
7579
- Utils.getNumTwoBit(month),
7580
- Utils.getMonthDays(String(year), String(month))
7581
- ];
8414
+ return [year, Utils.getNumTwoBit(month), Utils.getMonthDays(String(year), String(month))];
7582
8415
  };
7583
- const getDaysStatus = (days, type) => {
8416
+ const getDaysStatus = (days, type, dateInfo) => {
8417
+ let { year, month } = dateInfo;
7584
8418
  if (type == "prev" && days >= 7) {
7585
8419
  days -= 7;
7586
8420
  }
7587
8421
  return Array.from(Array(days), (v, k) => {
7588
8422
  return {
7589
8423
  day: k + 1,
7590
- type
8424
+ type,
8425
+ year,
8426
+ month
8427
+ };
8428
+ });
8429
+ };
8430
+ const getPreDaysStatus = (days, type, dateInfo, preCurrMonthDays) => {
8431
+ let { year, month } = dateInfo;
8432
+ if (type == "prev" && days >= 7) {
8433
+ days -= 7;
8434
+ }
8435
+ let months2 = Array.from(Array(preCurrMonthDays), (v, k) => {
8436
+ return {
8437
+ day: k + 1,
8438
+ type,
8439
+ year,
8440
+ month
7591
8441
  };
7592
8442
  });
8443
+ return months2.slice(preCurrMonthDays - days);
7593
8444
  };
7594
8445
  const getMonth = (curData, type) => {
7595
8446
  const preMonthDays = Utils.getMonthPreDay(+curData[0], +curData[1]);
8447
+ let preMonth = curData[1] - 1;
8448
+ let preYear = curData[0];
8449
+ if (preMonth <= 0) {
8450
+ preMonth = 12;
8451
+ preYear += 1;
8452
+ }
7596
8453
  const currMonthDays = Utils.getMonthDays(curData[0], curData[1]);
8454
+ const preCurrMonthDays = Utils.getMonthDays(preYear + "", preMonth + "");
7597
8455
  const title = {
7598
8456
  year: curData[0],
7599
8457
  month: curData[1]
@@ -7602,10 +8460,16 @@ var __publicField = (obj, key, value) => {
7602
8460
  curData,
7603
8461
  title: `${title.year}\u5E74${title.month}\u6708`,
7604
8462
  monthData: [
7605
- ...getDaysStatus(preMonthDays, "prev"),
7606
- ...getDaysStatus(currMonthDays, "curr")
8463
+ ...getPreDaysStatus(preMonthDays, "prev", { month: preMonth, year: preYear }, preCurrMonthDays),
8464
+ ...getDaysStatus(currMonthDays, "curr", title)
7607
8465
  ]
7608
8466
  };
8467
+ monthInfo.cssHeight = 39 + (monthInfo.monthData.length > 35 ? 384 : 320);
8468
+ let cssScrollHeight = 0;
8469
+ if (state.monthsData.length > 0) {
8470
+ cssScrollHeight = state.monthsData[state.monthsData.length - 1].cssScrollHeight + state.monthsData[state.monthsData.length - 1].cssHeight;
8471
+ }
8472
+ monthInfo.cssScrollHeight = cssScrollHeight;
7609
8473
  if (type == "next") {
7610
8474
  if (!state.endData || !Utils.compareDate(`${state.endData[0]}-${state.endData[1]}-${Utils.getMonthDays(state.endData[0], state.endData[1])}`, `${curData[0]}-${curData[1]}-${curData[2]}`)) {
7611
8475
  state.monthsData.push(monthInfo);
@@ -7619,44 +8483,97 @@ var __publicField = (obj, key, value) => {
7619
8483
  }
7620
8484
  };
7621
8485
  const initData = () => {
7622
- state.startData = props.startDate ? splitDate(props.startDate) : "";
7623
- state.endData = props.endDate ? splitDate(props.endDate) : "";
7624
- if (!props.defaultValue) {
8486
+ let propStartDate = props.startDate ? props.startDate : Utils.getDay(0);
8487
+ let propEndDate = props.endDate ? props.endDate : Utils.getDay(365);
8488
+ state.propStartDate = propStartDate;
8489
+ state.propEndDate = propEndDate;
8490
+ state.startData = splitDate(propStartDate);
8491
+ state.endData = splitDate(propEndDate);
8492
+ if (!props.defaultValue || Array.isArray(props.defaultValue) && props.defaultValue.length <= 0) {
7625
8493
  state.currDate = state.isRange ? [Utils.date2Str(new Date()), Utils.getDay(1)] : Utils.date2Str(new Date());
7626
8494
  } else {
7627
8495
  state.currDate = state.isRange ? [...props.defaultValue] : props.defaultValue;
7628
8496
  }
8497
+ const startDate = {
8498
+ year: Number(state.startData[0]),
8499
+ month: Number(state.startData[1])
8500
+ };
8501
+ const endDate = {
8502
+ year: Number(state.endData[0]),
8503
+ month: Number(state.endData[1])
8504
+ };
8505
+ let monthsNum = endDate.month - startDate.month;
8506
+ if (endDate.year - startDate.year > 0) {
8507
+ monthsNum = monthsNum + 12 * (endDate.year - startDate.year);
8508
+ }
8509
+ getMonth(state.startData, "next");
8510
+ let i = 1;
8511
+ do {
8512
+ getMonth(getCurrData("next"), "next");
8513
+ } while (i++ < monthsNum);
8514
+ state.monthsNum = monthsNum;
7629
8515
  if (state.isRange && Array.isArray(state.currDate)) {
7630
- if (props.startDate && Utils.compareDate(state.currDate[0], props.startDate)) {
7631
- state.currDate.splice(0, 1, props.startDate);
8516
+ if (propStartDate && Utils.compareDate(state.currDate[0], propStartDate)) {
8517
+ state.currDate.splice(0, 1, propStartDate);
7632
8518
  }
7633
- if (props.endDate && Utils.compareDate(props.endDate, state.currDate[1])) {
7634
- state.currDate.splice(1, 1, props.endDate);
8519
+ if (propEndDate && Utils.compareDate(propEndDate, state.currDate[1])) {
8520
+ state.currDate.splice(1, 1, propEndDate);
7635
8521
  }
7636
- state.defaultData = [
7637
- ...splitDate(state.currDate[0]),
7638
- ...splitDate(state.currDate[1])
7639
- ];
8522
+ state.defaultData = [...splitDate(state.currDate[0]), ...splitDate(state.currDate[1])];
7640
8523
  } else {
7641
- if (props.startDate && Utils.compareDate(state.currDate, props.startDate)) {
7642
- state.currDate = props.startDate;
7643
- } else if (props.endDate && !Utils.compareDate(state.currDate, props.endDate)) {
7644
- state.currDate = props.endDate;
8524
+ if (propStartDate && Utils.compareDate(state.currDate, propStartDate)) {
8525
+ state.currDate = propStartDate;
8526
+ } else if (propEndDate && !Utils.compareDate(state.currDate, propEndDate)) {
8527
+ state.currDate = propEndDate;
7645
8528
  }
7646
8529
  state.defaultData = [...splitDate(state.currDate)];
7647
8530
  }
7648
- getMonth(state.defaultData, "next");
7649
- state.yearMonthTitle = state.monthsData[0].title;
7650
- let i = 1;
7651
- do {
7652
- getMonth(getCurrData("next"), "next");
7653
- } while (i++ < 4);
8531
+ let current = 0;
8532
+ let lastCurrent = 0;
8533
+ state.monthsData.forEach((item, index) => {
8534
+ if (item.title == `${state.defaultData[0]}\u5E74${state.defaultData[1]}\u6708`) {
8535
+ current = index;
8536
+ }
8537
+ if (state.isRange) {
8538
+ if (item.title == `${state.defaultData[3]}\u5E74${state.defaultData[4]}\u6708`) {
8539
+ lastCurrent = index;
8540
+ }
8541
+ }
8542
+ });
8543
+ setDefaultRange(monthsNum, current);
8544
+ state.currentIndex = current;
8545
+ state.yearMonthTitle = state.monthsData[state.currentIndex].title;
7654
8546
  if (state.isRange) {
7655
- chooseDay({ day: state.defaultData[2], type: "curr" }, state.monthsData[0], true);
7656
- chooseDay({ day: state.defaultData[5], type: "curr" }, state.monthsData[0], true, true);
8547
+ chooseDay({ day: state.defaultData[2], type: "curr" }, state.monthsData[state.currentIndex], true);
8548
+ chooseDay({ day: state.defaultData[5], type: "curr" }, state.monthsData[lastCurrent], true);
8549
+ } else {
8550
+ chooseDay({ day: state.defaultData[2], type: "curr" }, state.monthsData[state.currentIndex], true);
8551
+ }
8552
+ let lastItem = state.monthsData[state.monthsData.length - 1];
8553
+ let containerHeight = lastItem.cssHeight + lastItem.cssScrollHeight;
8554
+ requestAniFrame$1(() => {
8555
+ if ((months == null ? void 0 : months.value) && (monthsPanel == null ? void 0 : monthsPanel.value) && (viewArea == null ? void 0 : viewArea.value)) {
8556
+ viewHeight.value = months.value.clientHeight;
8557
+ monthsPanel.value.style.height = `${containerHeight}px`;
8558
+ months.value.scrollTop = state.monthsData[state.currentIndex].cssScrollHeight;
8559
+ }
8560
+ });
8561
+ state.avgHeight = Math.floor(containerHeight / (monthsNum + 1));
8562
+ };
8563
+ const setDefaultRange = (monthsNum, current) => {
8564
+ if (monthsNum >= 3) {
8565
+ if (current > 0 && current < monthsNum) {
8566
+ state.defaultRange = [current - 1, current + 3];
8567
+ } else if (current == 0) {
8568
+ state.defaultRange = [current, current + 4];
8569
+ } else if (current == monthsNum) {
8570
+ state.defaultRange = [current - 2, current + 2];
8571
+ }
7657
8572
  } else {
7658
- chooseDay({ day: state.defaultData[2], type: "curr" }, state.monthsData[0], true);
8573
+ state.defaultRange = [0, monthsNum + 2];
7659
8574
  }
8575
+ let defaultScrollTop = state.monthsData[state.defaultRange[0]].cssScrollHeight;
8576
+ state.translateY = defaultScrollTop;
7660
8577
  };
7661
8578
  const isActive = (day, month) => {
7662
8579
  return state.isRange && day.type == "curr" && getClass(day, month) == "calendar-month-day-active";
@@ -7669,139 +8586,72 @@ var __publicField = (obj, key, value) => {
7669
8586
  }
7670
8587
  };
7671
8588
  const isEndTip = (day, month) => {
7672
- return isActive(day, month);
8589
+ if (state.currDate.length >= 2 && isEnd(getCurrDate(day, month))) {
8590
+ return isActive(day, month);
8591
+ }
8592
+ return false;
8593
+ };
8594
+ const rangeTip = (day, month) => {
8595
+ if (state.currDate.length >= 2) {
8596
+ return Utils.isEqual(state.currDate[0], state.currDate[1]);
8597
+ }
7673
8598
  };
7674
8599
  const isCurrDay = (month, day) => {
7675
8600
  const date = `${month.curData[0]}-${month.curData[1]}-${day}`;
7676
8601
  return Utils.isEqual(date, Utils.date2Str(new Date()));
7677
8602
  };
7678
- const loadScroll = () => {
7679
- if (!props.poppable) {
7680
- return false;
7681
- }
7682
- requestAniFrame$1(() => {
7683
- if ((weeksPanel == null ? void 0 : weeksPanel.value) && (monthsPanel == null ? void 0 : monthsPanel.value)) {
7684
- const top = weeksPanel == null ? void 0 : weeksPanel.value.getBoundingClientRect().bottom;
7685
- const monthsDoms = monthsPanel.value.getElementsByClassName("calendar-month");
7686
- for (let i = 0; i < monthsDoms.length; i++) {
7687
- if (monthsDoms[i].getBoundingClientRect().top <= top && monthsDoms[i].getBoundingClientRect().bottom >= top) {
7688
- state.yearMonthTitle = state.monthsData[i].title;
7689
- } else if (state.scrollDistance === 0) {
7690
- state.yearMonthTitle = state.monthsData[0].title;
7691
- }
7692
- }
7693
- }
7694
- });
7695
- };
7696
- const setTransform = (translateY = 0, type, time = 1e3) => {
7697
- if (monthsPanel == null ? void 0 : monthsPanel.value) {
7698
- if (type === "end") {
7699
- monthsPanel.value.style.webkitTransition = `transform ${time}ms cubic-bezier(0.19, 1, 0.22, 1)`;
7700
- clearTimeout(state.timer);
7701
- state.timer = setTimeout(() => {
7702
- loadScroll();
7703
- }, time);
7704
- } else {
7705
- monthsPanel.value.style.webkitTransition = "";
7706
- loadScroll();
7707
- }
7708
- monthsPanel.value.style.webkitTransform = `translateY(${translateY}px)`;
7709
- state.scrollDistance = translateY;
7710
- }
7711
- };
7712
- const setMove = (move, type, time) => {
7713
- var _a, _b;
7714
- let updateMove = move + state.transformY;
7715
- const h = ((_a = months.value) == null ? void 0 : _a.offsetHeight) || 0;
7716
- const offsetHeight = ((_b = monthsPanel.value) == null ? void 0 : _b.offsetHeight) || 0;
7717
- if (type === "end") {
7718
- if (updateMove > 0) {
7719
- updateMove = 0;
8603
+ const mothsViewScroll = (e) => {
8604
+ var currentScrollTop = e.target.scrollTop;
8605
+ let current = Math.floor(currentScrollTop / state.avgHeight);
8606
+ if (current == 0) {
8607
+ if (currentScrollTop >= state.monthsData[current + 1].cssScrollHeight) {
8608
+ current += 1;
7720
8609
  }
7721
- if (updateMove < 0 && updateMove < -offsetHeight + h) {
7722
- updateMove = -offsetHeight + h;
8610
+ } else if (current > 0 && current < state.monthsNum - 1) {
8611
+ if (currentScrollTop >= state.monthsData[current + 1].cssScrollHeight) {
8612
+ current += 1;
7723
8613
  }
7724
- if (offsetHeight <= h && state.monthsData.length == 1) {
7725
- updateMove = 0;
8614
+ if (currentScrollTop < state.monthsData[current].cssScrollHeight) {
8615
+ current -= 1;
7726
8616
  }
7727
- setTransform(updateMove, type, time);
7728
8617
  } else {
7729
- if (updateMove > 0 && updateMove > 100) {
7730
- updateMove = 100;
8618
+ if (currentScrollTop + viewHeight.value < state.monthsData[current].cssScrollHeight + state.monthsData[current].cssHeight) {
8619
+ current -= 1;
7731
8620
  }
7732
- if (updateMove < -offsetHeight + h - 100 && state.monthsData.length > 1) {
7733
- updateMove = -offsetHeight + h - 100;
8621
+ if (current + 1 <= state.monthsNum && currentScrollTop + viewHeight.value >= state.monthsData[current + 1].cssScrollHeight + state.monthsData[current + 1].cssHeight) {
8622
+ current += 1;
7734
8623
  }
7735
- if (updateMove < 0 && updateMove < -100 && state.monthsData.length == 1) {
7736
- updateMove = -100;
7737
- }
7738
- setTransform(updateMove);
7739
- }
7740
- };
7741
- const touchStart = (event) => {
7742
- const changedTouches = event.changedTouches[0];
7743
- state.touchParams.startY = changedTouches.pageY;
7744
- state.touchParams.startTime = event.timeStamp || Date.now();
7745
- state.transformY = state.scrollDistance;
7746
- };
7747
- const touchMove = (event) => {
7748
- const changedTouches = event.changedTouches[0];
7749
- state.touchParams.lastY = changedTouches.pageY;
7750
- state.touchParams.lastTime = event.timeStamp || Date.now();
7751
- const move = state.touchParams.lastY - state.touchParams.startY;
7752
- if (Math.abs(move) < 5) {
7753
- return false;
7754
- }
7755
- setMove(move);
7756
- };
7757
- const touchEnd = (event) => {
7758
- var _a, _b;
7759
- const changedTouches = event.changedTouches[0];
7760
- state.touchParams.lastY = changedTouches.pageY;
7761
- state.touchParams.lastTime = event.timeStamp || Date.now();
7762
- let move = state.touchParams.lastY - state.touchParams.startY;
7763
- if (Math.abs(move) < 5) {
7764
- return false;
7765
- }
7766
- const updateMove = move + state.transformY;
7767
- const h = ((_a = months.value) == null ? void 0 : _a.offsetHeight) || 0;
7768
- const offsetHeight = ((_b = monthsPanel.value) == null ? void 0 : _b.offsetHeight) || 0;
7769
- if (updateMove > 0) {
7770
- getMonth(getCurrData("prev"), "prev");
7771
- } else if (updateMove < 0 && updateMove < -offsetHeight + (Math.abs(move) > h ? Math.abs(move) : h) * 5) {
7772
- getMonth(getCurrData("next"), "next");
7773
- if (Math.abs(move) >= 300) {
7774
- getMonth(getCurrData("next"), "next");
8624
+ if (currentScrollTop < state.monthsData[current - 1].cssScrollHeight) {
8625
+ current -= 1;
7775
8626
  }
7776
8627
  }
7777
- let moveTime = state.touchParams.lastTime - state.touchParams.startTime;
7778
- if (moveTime <= 300) {
7779
- move = move * 2;
7780
- moveTime = moveTime + 1e3;
7781
- setMove(move, "end", moveTime);
7782
- } else {
7783
- setMove(move, "end");
8628
+ if (state.currentIndex !== current) {
8629
+ state.currentIndex = current;
8630
+ setDefaultRange(state.monthsNum, current);
7784
8631
  }
8632
+ state.yearMonthTitle = state.monthsData[current].title;
7785
8633
  };
7786
8634
  const resetRender = () => {
7787
8635
  state.chooseData.splice(0);
7788
8636
  state.monthsData.splice(0);
7789
- state.scrollDistance = 0;
7790
- state.translateY = 0;
7791
- setTransform(state.scrollDistance);
7792
8637
  initData();
7793
8638
  };
7794
8639
  initData();
7795
8640
  vue.watch(() => props.defaultValue, (val) => {
7796
8641
  if (val) {
7797
- resetRender();
8642
+ if (props.poppable) {
8643
+ resetRender();
8644
+ }
7798
8645
  }
7799
8646
  });
7800
8647
  return __spreadValues(__spreadValues({
7801
8648
  weeks,
7802
- touchStart,
7803
- touchMove,
7804
- touchEnd,
8649
+ compConthsData,
8650
+ showTopBtn,
8651
+ topInfo,
8652
+ bottomInfo,
8653
+ rangeTip,
8654
+ mothsViewScroll,
7805
8655
  getClass,
7806
8656
  isStartTip,
7807
8657
  isEndTip,
@@ -7810,38 +8660,52 @@ var __publicField = (obj, key, value) => {
7810
8660
  confirm,
7811
8661
  monthsPanel,
7812
8662
  months,
7813
- weeksPanel
8663
+ weeksPanel,
8664
+ viewArea
7814
8665
  }, vue.toRefs(state)), vue.toRefs(props));
7815
8666
  }
7816
8667
  });
7817
- const _hoisted_1$t = { class: "calendar-title" };
7818
- const _hoisted_2$o = { class: "calendar-curr-month" };
8668
+ const _hoisted_1$t = {
8669
+ key: 0,
8670
+ class: "calendar-title"
8671
+ };
8672
+ const _hoisted_2$o = {
8673
+ key: 1,
8674
+ class: "calendar-top-slot"
8675
+ };
7819
8676
  const _hoisted_3$k = {
8677
+ key: 2,
8678
+ class: "calendar-curr-month"
8679
+ };
8680
+ const _hoisted_4$f = {
7820
8681
  class: "calendar-weeks",
7821
8682
  ref: "weeksPanel"
7822
8683
  };
7823
- const _hoisted_4$f = {
8684
+ const _hoisted_5$a = {
7824
8685
  class: "calendar-months-panel",
7825
8686
  ref: "monthsPanel"
7826
8687
  };
7827
- const _hoisted_5$a = { class: "calendar-loading-tip" };
7828
8688
  const _hoisted_6$8 = { class: "calendar-month-title" };
7829
8689
  const _hoisted_7$7 = { class: "calendar-month-con" };
7830
8690
  const _hoisted_8$7 = ["onClick"];
7831
8691
  const _hoisted_9$5 = { class: "calendar-day" };
7832
8692
  const _hoisted_10$3 = {
7833
8693
  key: 0,
7834
- class: "calendar-curr-tips"
8694
+ class: "calendar-curr-tips calendar-curr-tips-top"
7835
8695
  };
7836
8696
  const _hoisted_11$3 = {
7837
8697
  key: 1,
7838
- class: "calendar-day-tip"
8698
+ class: "calendar-curr-tips calendar-curr-tips-bottom"
7839
8699
  };
7840
8700
  const _hoisted_12$3 = {
7841
8701
  key: 2,
7842
- class: "calendar-day-tip"
8702
+ class: "calendar-curr-tip-curr"
7843
8703
  };
7844
8704
  const _hoisted_13$2 = {
8705
+ key: 4,
8706
+ class: "calendar-day-tip"
8707
+ };
8708
+ const _hoisted_14$2 = {
7845
8709
  key: 0,
7846
8710
  class: "nut-calendar-footer"
7847
8711
  };
@@ -7855,11 +8719,12 @@ var __publicField = (obj, key, value) => {
7855
8719
  vue.createElementVNode("view", {
7856
8720
  class: vue.normalizeClass(["nut-calendar-header", { "nut-calendar-header-tile": !_ctx.poppable }])
7857
8721
  }, [
7858
- _ctx.poppable ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
7859
- vue.createElementVNode("view", _hoisted_1$t, vue.toDisplayString(_ctx.title), 1),
7860
- vue.createElementVNode("view", _hoisted_2$o, vue.toDisplayString(_ctx.yearMonthTitle), 1)
7861
- ], 64)) : vue.createCommentVNode("", true),
7862
- vue.createElementVNode("view", _hoisted_3$k, [
8722
+ _ctx.showTitle ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$t, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true),
8723
+ _ctx.showTopBtn ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$o, [
8724
+ vue.renderSlot(_ctx.$slots, "btn")
8725
+ ])) : vue.createCommentVNode("", true),
8726
+ _ctx.showSubTitle ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$k, vue.toDisplayString(_ctx.yearMonthTitle), 1)) : vue.createCommentVNode("", true),
8727
+ vue.createElementVNode("view", _hoisted_4$f, [
7863
8728
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.weeks, (item, index) => {
7864
8729
  return vue.openBlock(), vue.createElementBlock("view", {
7865
8730
  class: "calendar-week-item",
@@ -7871,44 +8736,67 @@ var __publicField = (obj, key, value) => {
7871
8736
  vue.createElementVNode("view", {
7872
8737
  class: "nut-calendar-content",
7873
8738
  ref: "months",
7874
- onTouchstart: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.touchStart && _ctx.touchStart(...args), ["stop"])),
7875
- onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.touchMove && _ctx.touchMove(...args), ["stop", "prevent"])),
7876
- onTouchend: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.touchEnd && _ctx.touchEnd(...args), ["stop"]))
8739
+ onScroll: _cache[0] || (_cache[0] = (...args) => _ctx.mothsViewScroll && _ctx.mothsViewScroll(...args))
7877
8740
  }, [
7878
- vue.createElementVNode("view", _hoisted_4$f, [
7879
- vue.createElementVNode("view", _hoisted_5$a, vue.toDisplayString(!_ctx.unLoadPrev ? "\u52A0\u8F7D\u4E0A\u4E00\u4E2A\u6708" : "\u6CA1\u6709\u66F4\u65E9\u6708\u4EFD"), 1),
7880
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.monthsData, (month, index) => {
7881
- return vue.openBlock(), vue.createElementBlock("view", {
7882
- class: "calendar-month",
7883
- key: index
7884
- }, [
7885
- vue.createElementVNode("view", _hoisted_6$8, vue.toDisplayString(month.title), 1),
7886
- vue.createElementVNode("view", _hoisted_7$7, [
7887
- vue.createElementVNode("view", {
7888
- class: vue.normalizeClass(["calendar-month-item", _ctx.type === "range" ? "month-item-range" : ""])
7889
- }, [
7890
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(month.monthData, (day, i) => {
7891
- return vue.openBlock(), vue.createElementBlock("view", {
7892
- key: i,
7893
- class: vue.normalizeClass(["calendar-month-day", _ctx.getClass(day, month)]),
7894
- onClick: ($event) => _ctx.chooseDay(day, month)
7895
- }, [
7896
- vue.createElementVNode("view", _hoisted_9$5, vue.toDisplayString(day.type == "curr" ? day.day : ""), 1),
7897
- _ctx.isCurrDay(month, day.day) ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_10$3, "\u4ECA\u5929")) : vue.createCommentVNode("", true),
7898
- _ctx.isStartTip(day, month) ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_11$3, vue.toDisplayString("\u5F00\u59CB"))) : _ctx.isEndTip(day, month) ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_12$3, vue.toDisplayString("\u7ED3\u675F"))) : vue.createCommentVNode("", true)
7899
- ], 10, _hoisted_8$7);
7900
- }), 128))
7901
- ], 2)
7902
- ])
7903
- ]);
7904
- }), 128))
8741
+ vue.createElementVNode("view", _hoisted_5$a, [
8742
+ vue.createElementVNode("view", {
8743
+ class: "viewArea",
8744
+ ref: "viewArea",
8745
+ style: vue.normalizeStyle({ transform: `translateY(${_ctx.translateY}px)` })
8746
+ }, [
8747
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.compConthsData, (month, index) => {
8748
+ return vue.openBlock(), vue.createElementBlock("view", {
8749
+ class: "calendar-month",
8750
+ key: index
8751
+ }, [
8752
+ vue.createElementVNode("view", _hoisted_6$8, vue.toDisplayString(month.title), 1),
8753
+ vue.createElementVNode("view", _hoisted_7$7, [
8754
+ vue.createElementVNode("view", {
8755
+ class: vue.normalizeClass(["calendar-month-item", _ctx.type === "range" ? "month-item-range" : ""])
8756
+ }, [
8757
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(month.monthData, (day, i) => {
8758
+ return vue.openBlock(), vue.createElementBlock("view", {
8759
+ key: i,
8760
+ class: vue.normalizeClass(["calendar-month-day", _ctx.getClass(day, month)]),
8761
+ onClick: ($event) => _ctx.chooseDay(day, month)
8762
+ }, [
8763
+ vue.createElementVNode("view", _hoisted_9$5, [
8764
+ vue.renderSlot(_ctx.$slots, "day", {
8765
+ date: day.type == "curr" ? day : ""
8766
+ }, () => [
8767
+ vue.createTextVNode(vue.toDisplayString(day.type == "curr" ? day.day : ""), 1)
8768
+ ])
8769
+ ]),
8770
+ _ctx.topInfo ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_10$3, [
8771
+ vue.renderSlot(_ctx.$slots, "topInfo", {
8772
+ date: day.type == "curr" ? day : ""
8773
+ })
8774
+ ])) : vue.createCommentVNode("", true),
8775
+ _ctx.bottomInfo ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_11$3, [
8776
+ vue.renderSlot(_ctx.$slots, "bottomInfo", {
8777
+ date: day.type == "curr" ? day : ""
8778
+ })
8779
+ ])) : vue.createCommentVNode("", true),
8780
+ !_ctx.bottomInfo && _ctx.showToday && _ctx.isCurrDay(month, day.day) ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_12$3, " \u4ECA\u5929 ")) : vue.createCommentVNode("", true),
8781
+ _ctx.isStartTip(day, month) ? (vue.openBlock(), vue.createElementBlock("view", {
8782
+ key: 3,
8783
+ class: vue.normalizeClass(["calendar-day-tip", { "calendar-curr-tips-top": _ctx.rangeTip(day, month) }])
8784
+ }, vue.toDisplayString(_ctx.startText), 3)) : vue.createCommentVNode("", true),
8785
+ _ctx.isEndTip(day, month) ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_13$2, vue.toDisplayString(_ctx.endText), 1)) : vue.createCommentVNode("", true)
8786
+ ], 10, _hoisted_8$7);
8787
+ }), 128))
8788
+ ], 2)
8789
+ ])
8790
+ ]);
8791
+ }), 128))
8792
+ ], 4)
7905
8793
  ], 512)
7906
8794
  ], 544),
7907
- _ctx.poppable && !_ctx.isAutoBackFill ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_13$2, [
8795
+ _ctx.poppable && !_ctx.isAutoBackFill ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_14$2, [
7908
8796
  vue.createElementVNode("view", {
7909
8797
  class: "calendar-confirm-btn",
7910
- onClick: _cache[3] || (_cache[3] = (...args) => _ctx.confirm && _ctx.confirm(...args))
7911
- }, "\u786E\u5B9A")
8798
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.confirm && _ctx.confirm(...args))
8799
+ }, vue.toDisplayString(_ctx.confirmText), 1)
7912
8800
  ])) : vue.createCommentVNode("", true)
7913
8801
  ], 2);
7914
8802
  }
@@ -7931,16 +8819,40 @@ var __publicField = (obj, key, value) => {
7931
8819
  type: Boolean,
7932
8820
  default: true
7933
8821
  },
8822
+ showTitle: {
8823
+ type: Boolean,
8824
+ default: true
8825
+ },
8826
+ showSubTitle: {
8827
+ type: Boolean,
8828
+ default: true
8829
+ },
7934
8830
  visible: {
7935
8831
  type: Boolean,
7936
8832
  default: false
7937
8833
  },
8834
+ showToday: {
8835
+ type: Boolean,
8836
+ default: true
8837
+ },
7938
8838
  title: {
7939
8839
  type: String,
7940
8840
  default: "\u65E5\u5386\u9009\u62E9"
7941
8841
  },
8842
+ confirmText: {
8843
+ type: String,
8844
+ default: "\u786E\u8BA4"
8845
+ },
8846
+ startText: {
8847
+ type: String,
8848
+ default: "\u5F00\u59CB"
8849
+ },
8850
+ endText: {
8851
+ type: String,
8852
+ default: "\u7ED3\u675F"
8853
+ },
7942
8854
  defaultValue: {
7943
- type: String
8855
+ type: [String, Array]
7944
8856
  },
7945
8857
  startDate: {
7946
8858
  type: String,
@@ -7951,8 +8863,20 @@ var __publicField = (obj, key, value) => {
7951
8863
  default: Utils.getDay(365)
7952
8864
  }
7953
8865
  },
7954
- emits: ["choose", "close", "update:visible"],
7955
- setup(props, { emit }) {
8866
+ emits: ["choose", "close", "update:visible", "select"],
8867
+ setup(props, { emit, slots }) {
8868
+ const showTopBtn = vue.computed(() => {
8869
+ return slots.btn;
8870
+ });
8871
+ const topInfo = vue.computed(() => {
8872
+ return slots.topInfo;
8873
+ });
8874
+ const dayInfo = vue.computed(() => {
8875
+ return slots.day;
8876
+ });
8877
+ const bottomInfo = vue.computed(() => {
8878
+ return slots.bottomInfo;
8879
+ });
7956
8880
  const calendarRef = vue.ref(null);
7957
8881
  const update = () => {
7958
8882
  emit("update:visible", false);
@@ -7965,6 +8889,9 @@ var __publicField = (obj, key, value) => {
7965
8889
  close();
7966
8890
  emit("choose", param);
7967
8891
  };
8892
+ const select = (param) => {
8893
+ emit("select", param);
8894
+ };
7968
8895
  const closePopup = () => {
7969
8896
  close();
7970
8897
  };
@@ -7973,7 +8900,12 @@ var __publicField = (obj, key, value) => {
7973
8900
  update,
7974
8901
  close,
7975
8902
  choose,
7976
- calendarRef
8903
+ select,
8904
+ calendarRef,
8905
+ showTopBtn,
8906
+ topInfo,
8907
+ dayInfo,
8908
+ bottomInfo
7977
8909
  };
7978
8910
  }
7979
8911
  });
@@ -7987,43 +8919,121 @@ var __publicField = (obj, key, value) => {
7987
8919
  round: "",
7988
8920
  closeable: true,
7989
8921
  onClickOverlay: _ctx.closePopup,
7990
- onClickCloseIcon: _ctx.closePopup
8922
+ onClickCloseIcon: _ctx.closePopup,
8923
+ "destroy-on-close": true,
8924
+ style: { height: "85vh" }
7991
8925
  }, {
7992
8926
  default: vue.withCtx(() => [
7993
- vue.createVNode(_component_nut_calendar_item, {
8927
+ _ctx.visible ? (vue.openBlock(), vue.createBlock(_component_nut_calendar_item, {
8928
+ key: 0,
7994
8929
  props: "",
7995
8930
  ref: "calendarRef",
7996
8931
  type: _ctx.type,
7997
8932
  "is-auto-back-fill": _ctx.isAutoBackFill,
7998
8933
  poppable: _ctx.poppable,
7999
8934
  title: _ctx.title,
8935
+ "confirm-text": _ctx.confirmText,
8936
+ "start-text": _ctx.startText,
8937
+ "end-text": _ctx.endText,
8000
8938
  "default-value": _ctx.defaultValue,
8939
+ "show-today": _ctx.showToday,
8001
8940
  "start-date": _ctx.startDate,
8002
8941
  "end-date": _ctx.endDate,
8003
8942
  onUpdate: _ctx.update,
8004
8943
  onClose: _ctx.close,
8005
- onChoose: _ctx.choose
8006
- }, null, 8, ["type", "is-auto-back-fill", "poppable", "title", "default-value", "start-date", "end-date", "onUpdate", "onClose", "onChoose"])
8944
+ onChoose: _ctx.choose,
8945
+ onSelect: _ctx.select,
8946
+ "show-title": _ctx.showTitle,
8947
+ "show-sub-title": _ctx.showSubTitle
8948
+ }, vue.createSlots({ _: 2 }, [
8949
+ _ctx.showTopBtn ? {
8950
+ name: "btn",
8951
+ fn: vue.withCtx(() => [
8952
+ vue.renderSlot(_ctx.$slots, "btn")
8953
+ ])
8954
+ } : void 0,
8955
+ _ctx.dayInfo ? {
8956
+ name: "day",
8957
+ fn: vue.withCtx((date) => [
8958
+ vue.renderSlot(_ctx.$slots, "day", {
8959
+ date: date.date
8960
+ })
8961
+ ])
8962
+ } : void 0,
8963
+ _ctx.topInfo ? {
8964
+ name: "topInfo",
8965
+ fn: vue.withCtx((date) => [
8966
+ vue.renderSlot(_ctx.$slots, "topInfo", {
8967
+ date: date.date
8968
+ })
8969
+ ])
8970
+ } : void 0,
8971
+ _ctx.bottomInfo ? {
8972
+ name: "bottomInfo",
8973
+ fn: vue.withCtx((date) => [
8974
+ vue.renderSlot(_ctx.$slots, "bottomInfo", {
8975
+ date: date.date
8976
+ })
8977
+ ])
8978
+ } : void 0
8979
+ ]), 1032, ["type", "is-auto-back-fill", "poppable", "title", "confirm-text", "start-text", "end-text", "default-value", "show-today", "start-date", "end-date", "onUpdate", "onClose", "onChoose", "onSelect", "show-title", "show-sub-title"])) : vue.createCommentVNode("", true)
8007
8980
  ]),
8008
- _: 1
8981
+ _: 3
8009
8982
  }, 8, ["visible", "onClickOverlay", "onClickCloseIcon"])) : (vue.openBlock(), vue.createBlock(_component_nut_calendar_item, {
8010
8983
  key: 1,
8011
8984
  type: _ctx.type,
8012
8985
  "is-auto-back-fill": _ctx.isAutoBackFill,
8013
8986
  poppable: _ctx.poppable,
8014
8987
  title: _ctx.title,
8988
+ "confirm-text": _ctx.confirmText,
8989
+ "start-text": _ctx.startText,
8990
+ "end-text": _ctx.endText,
8015
8991
  "default-value": _ctx.defaultValue,
8016
8992
  "start-date": _ctx.startDate,
8017
8993
  "end-date": _ctx.endDate,
8018
8994
  onClose: _ctx.close,
8019
- onChoose: _ctx.choose
8020
- }, null, 8, ["type", "is-auto-back-fill", "poppable", "title", "default-value", "start-date", "end-date", "onClose", "onChoose"]));
8995
+ onChoose: _ctx.choose,
8996
+ onSelect: _ctx.select,
8997
+ "show-title": _ctx.showTitle,
8998
+ "show-sub-title": _ctx.showSubTitle
8999
+ }, vue.createSlots({ _: 2 }, [
9000
+ _ctx.showTopBtn ? {
9001
+ name: "btn",
9002
+ fn: vue.withCtx(() => [
9003
+ vue.renderSlot(_ctx.$slots, "btn")
9004
+ ])
9005
+ } : void 0,
9006
+ _ctx.dayInfo ? {
9007
+ name: "day",
9008
+ fn: vue.withCtx((date) => [
9009
+ vue.renderSlot(_ctx.$slots, "day", {
9010
+ date: date.date
9011
+ })
9012
+ ])
9013
+ } : void 0,
9014
+ _ctx.topInfo ? {
9015
+ name: "topInfo",
9016
+ fn: vue.withCtx((date) => [
9017
+ vue.renderSlot(_ctx.$slots, "topInfo", {
9018
+ date: date.date
9019
+ })
9020
+ ])
9021
+ } : void 0,
9022
+ _ctx.bottomInfo ? {
9023
+ name: "bottomInfo",
9024
+ fn: vue.withCtx((date) => [
9025
+ vue.renderSlot(_ctx.$slots, "bottomInfo", {
9026
+ date: date.date
9027
+ })
9028
+ ])
9029
+ } : void 0
9030
+ ]), 1032, ["type", "is-auto-back-fill", "poppable", "title", "confirm-text", "start-text", "end-text", "default-value", "start-date", "end-date", "onClose", "onChoose", "onSelect", "show-title", "show-sub-title"]));
8021
9031
  }
8022
9032
  var Calendar = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$x]]);
8023
9033
  const { create: create$A, componentName: componentName$r } = createComponent("checkbox");
8024
9034
  const _sfc_main$A = create$A({
8025
9035
  components: {
8026
- nutIcon: _sfc_main$1o
9036
+ nutIcon: _sfc_main$1s
8027
9037
  },
8028
9038
  props: {
8029
9039
  modelValue: {
@@ -8057,7 +9067,7 @@ var __publicField = (obj, key, value) => {
8057
9067
  },
8058
9068
  emits: ["change", "update:modelValue"],
8059
9069
  setup(props, { emit, slots }) {
8060
- const parent = vue.inject("parent");
9070
+ const parent = vue.inject("parent", null);
8061
9071
  const hasParent = vue.computed(() => !!parent);
8062
9072
  const pValue = vue.computed(() => {
8063
9073
  if (hasParent.value) {
@@ -8079,7 +9089,7 @@ var __publicField = (obj, key, value) => {
8079
9089
  };
8080
9090
  const renderIcon = () => {
8081
9091
  const { iconName, iconSize, iconActiveName } = props;
8082
- return vue.h(_sfc_main$1o, {
9092
+ return vue.h(_sfc_main$1s, {
8083
9093
  name: !pValue.value ? iconName : iconActiveName,
8084
9094
  size: iconSize,
8085
9095
  class: color.value
@@ -8163,7 +9173,7 @@ var __publicField = (obj, key, value) => {
8163
9173
  vue.watch(() => props.modelValue, (value) => {
8164
9174
  emit("change", value);
8165
9175
  });
8166
- useExpose$1({ toggleAll });
9176
+ useExpose({ toggleAll });
8167
9177
  return () => {
8168
9178
  var _a;
8169
9179
  return vue.h("view", {
@@ -8811,7 +9821,6 @@ var __publicField = (obj, key, value) => {
8811
9821
  return 0;
8812
9822
  };
8813
9823
  const columns = vue.computed(() => {
8814
- console.log(ranges.value);
8815
9824
  const val = ranges.value.map((res) => {
8816
9825
  return generateValue(res.range[0], res.range[1], getDateIndex(res.type), res.type);
8817
9826
  });
@@ -9091,6 +10100,9 @@ var __publicField = (obj, key, value) => {
9091
10100
  [`${prefixCls}-border`]: props.hasBorder
9092
10101
  };
9093
10102
  });
10103
+ const inputmode = vue.computed(() => {
10104
+ return props.type === "digit" ? "decimal" : props.type === "number" ? "numeric" : "text";
10105
+ });
9094
10106
  const styles = vue.computed(() => {
9095
10107
  return {
9096
10108
  textAlign: props.textAlign
@@ -9137,6 +10149,7 @@ var __publicField = (obj, key, value) => {
9137
10149
  active,
9138
10150
  classes,
9139
10151
  styles,
10152
+ inputmode,
9140
10153
  valueChange,
9141
10154
  valueFocus,
9142
10155
  valueBlur,
@@ -9149,7 +10162,7 @@ var __publicField = (obj, key, value) => {
9149
10162
  class: "nut-input-label"
9150
10163
  };
9151
10164
  const _hoisted_2$l = { class: "label-string" };
9152
- const _hoisted_3$i = ["type", "maxlength", "placeholder", "disabled", "readonly", "value"];
10165
+ const _hoisted_3$i = ["type", "maxlength", "placeholder", "disabled", "readonly", "value", "inputmode"];
9153
10166
  function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
9154
10167
  const _component_nut_icon = vue.resolveComponent("nut-icon");
9155
10168
  return vue.openBlock(), vue.createElementBlock("view", {
@@ -9167,6 +10180,7 @@ var __publicField = (obj, key, value) => {
9167
10180
  disabled: _ctx.disabled,
9168
10181
  readonly: _ctx.readonly,
9169
10182
  value: _ctx.modelValue,
10183
+ inputmode: _ctx.inputmode,
9170
10184
  onInput: _cache[0] || (_cache[0] = (...args) => _ctx.valueChange && _ctx.valueChange(...args)),
9171
10185
  onFocus: _cache[1] || (_cache[1] = (...args) => _ctx.valueFocus && _ctx.valueFocus(...args)),
9172
10186
  onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.valueBlur && _ctx.valueBlur(...args))
@@ -9215,7 +10229,7 @@ var __publicField = (obj, key, value) => {
9215
10229
  }
9216
10230
  },
9217
10231
  setup(props, { emit, slots }) {
9218
- let parent = vue.inject("parent");
10232
+ let parent = vue.inject("parent", null);
9219
10233
  const isCurValue = vue.computed(() => {
9220
10234
  return parent.label.value == props.label;
9221
10235
  });
@@ -9227,7 +10241,7 @@ var __publicField = (obj, key, value) => {
9227
10241
  });
9228
10242
  const renderIcon = () => {
9229
10243
  const { iconName, iconSize, iconActiveName } = props;
9230
- return vue.h(_sfc_main$1o, {
10244
+ return vue.h(_sfc_main$1s, {
9231
10245
  name: isCurValue.value ? iconActiveName : iconName,
9232
10246
  size: iconSize,
9233
10247
  class: color.value
@@ -9484,7 +10498,10 @@ var __publicField = (obj, key, value) => {
9484
10498
  });
9485
10499
  vue.watch(() => props.modelValue, (value) => {
9486
10500
  realInput.value = value;
9487
- console.log("watch", value);
10501
+ emit("update:modelValue", value);
10502
+ }, {
10503
+ deep: true,
10504
+ immediate: true
9488
10505
  });
9489
10506
  function changeValue(e) {
9490
10507
  const input = e.target;
@@ -10806,7 +11823,6 @@ var __publicField = (obj, key, value) => {
10806
11823
  },
10807
11824
  emits: ["input", "delete", "close", "update:value"],
10808
11825
  setup(props, { emit }) {
10809
- console.log(props.overlay);
10810
11826
  const clickKeyIndex = vue.ref(void 0);
10811
11827
  const show = vue.ref(props.visible);
10812
11828
  const root = vue.ref();
@@ -11887,7 +12903,7 @@ var __publicField = (obj, key, value) => {
11887
12903
  };
11888
12904
  });
11889
12905
  const getStyle = () => {
11890
- if (avatarSize == null ? void 0 : avatarSize.value) {
12906
+ if (avatarSize.value) {
11891
12907
  return {
11892
12908
  width: avatarSize.value,
11893
12909
  height: avatarSize.value
@@ -11899,7 +12915,6 @@ var __publicField = (obj, key, value) => {
11899
12915
  };
11900
12916
  };
11901
12917
  vue.onMounted(() => {
11902
- console.log("row", props.row);
11903
12918
  });
11904
12919
  return {
11905
12920
  avatarShape,
@@ -11916,7 +12931,10 @@ var __publicField = (obj, key, value) => {
11916
12931
  key: 1,
11917
12932
  class: "skeleton"
11918
12933
  };
11919
- const _hoisted_3$b = /* @__PURE__ */ vue.createElementVNode("view", { class: "skeleton-animation" }, null, -1);
12934
+ const _hoisted_3$b = {
12935
+ key: 0,
12936
+ class: "skeleton-animation"
12937
+ };
11920
12938
  const _hoisted_4$a = { class: "content" };
11921
12939
  const _hoisted_5$5 = { class: "content-line" };
11922
12940
  const _hoisted_6$3 = {
@@ -11928,7 +12946,7 @@ var __publicField = (obj, key, value) => {
11928
12946
  return !_ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_1$e, [
11929
12947
  vue.renderSlot(_ctx.$slots, "default")
11930
12948
  ])) : (vue.openBlock(), vue.createElementBlock("view", _hoisted_2$c, [
11931
- _hoisted_3$b,
12949
+ _ctx.animated ? (vue.openBlock(), vue.createElementBlock("view", _hoisted_3$b)) : vue.createCommentVNode("", true),
11932
12950
  vue.createElementVNode("view", _hoisted_4$a, [
11933
12951
  _ctx.avatar ? (vue.openBlock(), vue.createBlock(_component_nut_avatar, {
11934
12952
  key: 0,
@@ -12119,7 +13137,7 @@ var __publicField = (obj, key, value) => {
12119
13137
  const tree = vue.ref(new Tree([], {}));
12120
13138
  const panes = vue.ref([]);
12121
13139
  const isLazy = vue.computed(() => configs.value.lazy && Boolean(configs.value.lazyLoad));
12122
- const lazyLoadMap = new Map();
13140
+ const lazyLoadMap = /* @__PURE__ */ new Map();
12123
13141
  let currentProcessNode;
12124
13142
  const init = async () => {
12125
13143
  lazyLoadMap.clear();
@@ -12462,6 +13480,10 @@ var __publicField = (obj, key, value) => {
12462
13480
  const _sfc_main$c = create$c({
12463
13481
  inheritAttrs: false,
12464
13482
  props: {
13483
+ modelValue: {
13484
+ type: Array,
13485
+ default: () => []
13486
+ },
12465
13487
  visible: {
12466
13488
  type: Boolean,
12467
13489
  default: false
@@ -12525,9 +13547,13 @@ var __publicField = (obj, key, value) => {
12525
13547
  height: {
12526
13548
  type: [String, Number],
12527
13549
  default: "200px"
13550
+ },
13551
+ columnsPlaceholder: {
13552
+ type: [String, Array],
13553
+ default: "\u8BF7\u9009\u62E9"
12528
13554
  }
12529
13555
  },
12530
- emits: ["update:visible", "type", "change", "selected", "close", "close-mask", "switch-module"],
13556
+ emits: ["update:visible", "update:modelValue", "type", "change", "selected", "close", "close-mask", "switch-module"],
12531
13557
  setup(props, { emit }) {
12532
13558
  const regionLine = vue.ref(null);
12533
13559
  const tabRegion = vue.ref(null);
@@ -12535,6 +13561,7 @@ var __publicField = (obj, key, value) => {
12535
13561
  const privateType = vue.ref(props.type);
12536
13562
  const tabIndex = vue.ref(0);
12537
13563
  const tabName = vue.ref(["province", "city", "country", "town"]);
13564
+ const tabNameDefault = vue.ref([""]);
12538
13565
  const isCustom2 = vue.computed(() => props.type === "custom2");
12539
13566
  const transformData = (data) => {
12540
13567
  if (!Array.isArray(data))
@@ -12582,13 +13609,55 @@ var __publicField = (obj, key, value) => {
12582
13609
  let selectedExistAddress = vue.reactive({});
12583
13610
  const closeWay = vue.ref("self");
12584
13611
  const lineDistance = vue.ref(20);
13612
+ vue.onMounted(() => {
13613
+ customPlaceholder();
13614
+ });
13615
+ const initCustomSelected = () => {
13616
+ if (props.modelValue.length > 0) {
13617
+ tabIndex.value = props.modelValue.length - 1;
13618
+ for (let index = 0; index < props.modelValue.length; index++) {
13619
+ if (regionList[tabName.value[index]].length == 0) {
13620
+ tabIndex.value = index - 1;
13621
+ break;
13622
+ } else {
13623
+ const val = props.modelValue[index];
13624
+ const arr = regionList[tabName.value[index]];
13625
+ if (privateType.value == "custom") {
13626
+ selectedRegion[tabName.value[index]] = arr.filter((item) => item.id == val)[0];
13627
+ } else if (privateType.value == "custom2") {
13628
+ let sumArr = [];
13629
+ arr.map((item) => {
13630
+ sumArr.push(...item.list);
13631
+ });
13632
+ selectedRegion[tabName.value[index]] = sumArr.filter((item) => item.id == val)[0];
13633
+ }
13634
+ }
13635
+ }
13636
+ lineAnimation();
13637
+ }
13638
+ };
13639
+ const customPlaceholder = () => {
13640
+ let typeD = Object.prototype.toString.call(props.columnsPlaceholder);
13641
+ if (typeD == "[object String]") {
13642
+ tabNameDefault.value = new Array(4).fill(props.columnsPlaceholder);
13643
+ } else if (typeD == "[object Array]") {
13644
+ tabNameDefault.value = new Array(4).fill("");
13645
+ tabNameDefault.value.forEach((val, index) => {
13646
+ if (props.columnsPlaceholder[index]) {
13647
+ tabNameDefault.value[index] = props.columnsPlaceholder[index];
13648
+ } else {
13649
+ tabNameDefault.value[index] = "\u8BF7\u9009\u62E9";
13650
+ }
13651
+ });
13652
+ }
13653
+ };
12585
13654
  const getTabName = (item, index) => {
12586
13655
  if (item.name)
12587
13656
  return item.name;
12588
13657
  if (tabIndex.value < index) {
12589
13658
  return item.name;
12590
13659
  } else {
12591
- return "\u8BF7\u9009\u62E9";
13660
+ return tabNameDefault.value[index];
12592
13661
  }
12593
13662
  };
12594
13663
  const handClose = (type = "self") => {
@@ -12601,7 +13670,6 @@ var __publicField = (obj, key, value) => {
12601
13670
  closeWay.value = "mask";
12602
13671
  };
12603
13672
  const lineAnimation = () => {
12604
- console.log("\u6ED1\u52A8\u7EA2\u7EBF");
12605
13673
  vue.nextTick(() => {
12606
13674
  const name = tabRegion.value && tabRegion.value.getElementsByClassName("active")[0];
12607
13675
  if (name) {
@@ -12617,7 +13685,7 @@ var __publicField = (obj, key, value) => {
12617
13685
  custom: tabName.value[tabIndex.value]
12618
13686
  };
12619
13687
  selectedRegion[tabName.value[tabIndex.value]] = item;
12620
- for (let i = tabIndex.value; i < tabIndex.value - 1; i++) {
13688
+ for (let i = tabIndex.value; i < 4; i++) {
12621
13689
  selectedRegion[tabName.value[i + 1]] = {};
12622
13690
  }
12623
13691
  if (tabIndex.value < 3) {
@@ -12628,6 +13696,7 @@ var __publicField = (obj, key, value) => {
12628
13696
  emit("change", calBack);
12629
13697
  } else {
12630
13698
  handClose();
13699
+ emit("update:modelValue");
12631
13700
  }
12632
13701
  };
12633
13702
  const changeRegionTab = (item, key, index) => {
@@ -12710,6 +13779,8 @@ var __publicField = (obj, key, value) => {
12710
13779
  vue.watch(() => showPopup.value, (value) => {
12711
13780
  if (value == false) {
12712
13781
  close();
13782
+ } else {
13783
+ initCustomSelected();
12713
13784
  }
12714
13785
  });
12715
13786
  vue.watch(() => props.province, (value) => {
@@ -12819,7 +13890,7 @@ var __publicField = (obj, key, value) => {
12819
13890
  name: _ctx.backBtnIcon,
12820
13891
  color: "#cccccc"
12821
13892
  }, null, 8, ["name"]), [
12822
- [vue.vShow, _ctx.privateType == "custom" && _ctx.backBtnIcon]
13893
+ [vue.vShow, _ctx.type == "exist" && _ctx.privateType == "custom" && _ctx.backBtnIcon]
12823
13894
  ])
12824
13895
  ]),
12825
13896
  vue.createElementVNode("view", _hoisted_3$9, vue.toDisplayString(_ctx.privateType == "custom" ? _ctx.customAddressTitle : _ctx.existAddressTitle), 1),
@@ -13933,7 +15004,6 @@ var __publicField = (obj, key, value) => {
13933
15004
  }
13934
15005
  },
13935
15006
  setup(props, { emit, slots }) {
13936
- console.log(slots["origin"]);
13937
15007
  const isHaveSlot = (slot) => {
13938
15008
  return slots[slot];
13939
15009
  };
@@ -14001,7 +15071,7 @@ var __publicField = (obj, key, value) => {
14001
15071
  return () => vue.h(`view`, {}, props.slots());
14002
15072
  },
14003
15073
  props: {
14004
- slots: Object
15074
+ slots: Function
14005
15075
  }
14006
15076
  };
14007
15077
  const component = (componentName2) => {
@@ -14166,7 +15236,7 @@ var __publicField = (obj, key, value) => {
14166
15236
  }
14167
15237
  var Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
14168
15238
  function install(app) {
14169
- const packages = [Avatar, Button, Cell, CellGroup, _sfc_main$1o, Price, OverLay, Divider, _sfc_main$1h, Col, Row, _ImagePreview, Swipe, ActionSheet, BackTop, Collapse, CollapseItem, Drag, _Dialog, InfiniteLoading, NotifyFunction, Range, Video, Popup, _sfc_main$$, Step, Swiper, SwiperItem, Switch, ToastFunction, Progress, CircleProgress, NoticeBar, SearchBar, Empty, Navbar, FixedNav, Menu, MenuItem, Tabbar, TabbarItem, Elevator, Pagination, Tabs, TabPane, Indicator, _sfc_main$H, GridItem, SideNavBar, SideNavBarItem, SubSideNavBar, Calendar, _sfc_main$A, _sfc_main$z, DatePicker, InputNumber, Input, _sfc_main$t, _sfc_main$s, Rate, Picker, ShortPassword, TextArea, Uploader, CountUp, NumberKeyboard, CountDown, Badge, Tag, Popover, Form, FormItem, Skeleton, Cascader, Address, Barrage, Signature, TimeSelect, TimePannel, TimeDetail, Sku, Card, Table];
15239
+ const packages = [Avatar, Button, Cell, CellGroup, _sfc_main$1s, Price, OverLay, Divider, _sfc_main$1l, Col, Row, _ImagePreview, _sfc_main$1d, Swipe, ActionSheet, BackTop, Collapse, CollapseItem, Drag, _Dialog, InfiniteLoading, NotifyFunction, Range, PullRefresh, Video, Popup, _sfc_main$11, Step, Swiper, SwiperItem, Switch, ToastFunction, Progress, CircleProgress, NoticeBar, SearchBar, Empty, Audio, AudioOperate, Navbar, FixedNav, Menu, MenuItem, Tabbar, TabbarItem, Elevator, Pagination, Tabs, TabPane, Indicator, _sfc_main$H, GridItem, SideNavBar, SideNavBarItem, SubSideNavBar, Calendar, _sfc_main$A, _sfc_main$z, DatePicker, InputNumber, Input, _sfc_main$t, _sfc_main$s, Rate, CalendarItem, Picker, ShortPassword, TextArea, Uploader, CountUp, NumberKeyboard, CountDown, Badge, Tag, Popover, Form, FormItem, Skeleton, Cascader, Address, Barrage, Signature, TimeSelect, TimePannel, TimeDetail, Sku, Card, Table];
14170
15240
  packages.forEach((item) => {
14171
15241
  if (item.install) {
14172
15242
  app.use(item);
@@ -14175,16 +15245,19 @@ var __publicField = (obj, key, value) => {
14175
15245
  }
14176
15246
  });
14177
15247
  }
14178
- const version = "3.1.16-beta.1";
15248
+ const version = "3.1.16";
14179
15249
  var nutui_vue_build = { install, version };
14180
15250
  exports2.ActionSheet = ActionSheet;
14181
15251
  exports2.Address = Address;
15252
+ exports2.Audio = Audio;
15253
+ exports2.AudioOperate = AudioOperate;
14182
15254
  exports2.Avatar = Avatar;
14183
15255
  exports2.BackTop = BackTop;
14184
15256
  exports2.Badge = Badge;
14185
15257
  exports2.Barrage = Barrage;
14186
15258
  exports2.Button = Button;
14187
15259
  exports2.Calendar = Calendar;
15260
+ exports2.CalendarItem = CalendarItem;
14188
15261
  exports2.Card = Card;
14189
15262
  exports2.Cascader = Cascader;
14190
15263
  exports2.Cell = Cell;
@@ -14208,13 +15281,13 @@ var __publicField = (obj, key, value) => {
14208
15281
  exports2.FormItem = FormItem;
14209
15282
  exports2.Grid = _sfc_main$H;
14210
15283
  exports2.GridItem = GridItem;
14211
- exports2.Icon = _sfc_main$1o;
15284
+ exports2.Icon = _sfc_main$1s;
14212
15285
  exports2.ImagePreview = _ImagePreview;
14213
15286
  exports2.Indicator = Indicator;
14214
15287
  exports2.InfiniteLoading = InfiniteLoading;
14215
15288
  exports2.Input = Input;
14216
15289
  exports2.InputNumber = InputNumber;
14217
- exports2.Layout = _sfc_main$1h;
15290
+ exports2.Layout = _sfc_main$1l;
14218
15291
  exports2.Menu = Menu;
14219
15292
  exports2.MenuItem = MenuItem;
14220
15293
  exports2.Navbar = Navbar;
@@ -14228,6 +15301,7 @@ var __publicField = (obj, key, value) => {
14228
15301
  exports2.Popup = Popup;
14229
15302
  exports2.Price = Price;
14230
15303
  exports2.Progress = Progress;
15304
+ exports2.PullRefresh = PullRefresh;
14231
15305
  exports2.Radio = _sfc_main$t;
14232
15306
  exports2.RadioGroup = _sfc_main$s;
14233
15307
  exports2.Range = Range;
@@ -14241,7 +15315,8 @@ var __publicField = (obj, key, value) => {
14241
15315
  exports2.Skeleton = Skeleton;
14242
15316
  exports2.Sku = Sku;
14243
15317
  exports2.Step = Step;
14244
- exports2.Steps = _sfc_main$$;
15318
+ exports2.Steps = _sfc_main$11;
15319
+ exports2.Sticky = _sfc_main$1d;
14245
15320
  exports2.SubSideNavBar = SubSideNavBar;
14246
15321
  exports2.Swipe = Swipe;
14247
15322
  exports2.Swiper = Swiper;