@nutui/nutui 3.1.12-beta.1 → 3.1.12

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 (114) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/nutui.d.ts +1 -1
  3. package/dist/nutui.es.js +3219 -2562
  4. package/dist/nutui.umd.js +3292 -2565
  5. package/dist/packages/_es/ActionSheet.js +12 -13
  6. package/dist/packages/_es/Address.js +49 -63
  7. package/dist/packages/_es/Avatar.js +5 -4
  8. package/dist/packages/_es/BackTop.js +109 -72
  9. package/dist/packages/_es/Badge.js +5 -4
  10. package/dist/packages/_es/Barrage.js +57 -63
  11. package/dist/packages/_es/Button.js +6 -5
  12. package/dist/packages/_es/Calendar.js +18 -27
  13. package/dist/packages/_es/Card.js +8 -7
  14. package/dist/packages/_es/Cell.js +13 -5
  15. package/dist/packages/_es/CellGroup.js +14 -7
  16. package/dist/packages/_es/Checkbox.js +3 -3
  17. package/dist/packages/_es/CheckboxGroup.js +4 -9
  18. package/dist/packages/_es/CircleProgress.js +46 -142
  19. package/dist/packages/_es/Col.js +5 -4
  20. package/dist/packages/_es/Collapse.js +10 -35
  21. package/dist/packages/_es/CollapseItem.js +35 -80
  22. package/dist/packages/_es/CountDown.js +5 -7
  23. package/dist/packages/_es/CountUp.js +31 -34
  24. package/dist/packages/_es/DatePicker.js +219 -451
  25. package/dist/packages/_es/Dialog.js +98 -46
  26. package/dist/packages/_es/Divider.js +6 -5
  27. package/dist/packages/_es/Drag.js +50 -76
  28. package/dist/packages/_es/Elevator.js +52 -81
  29. package/dist/packages/_es/FixedNav.js +9 -8
  30. package/dist/packages/_es/Form.js +6 -5
  31. package/dist/packages/_es/FormItem.js +5 -4
  32. package/dist/packages/_es/Icon.js +40 -6
  33. package/dist/packages/_es/ImagePreview.js +158 -44
  34. package/dist/packages/_es/InfiniteLoading.js +109 -95
  35. package/dist/packages/_es/Input.js +21 -22
  36. package/dist/packages/_es/InputNumber.js +18 -24
  37. package/dist/packages/_es/Layout.js +2 -2
  38. package/dist/packages/_es/Menu.js +14 -16
  39. package/dist/packages/_es/MenuItem.js +11 -9
  40. package/dist/packages/_es/Navbar.js +7 -7
  41. package/dist/packages/_es/NoticeBar.js +26 -39
  42. package/dist/packages/_es/Notify.js +166 -30
  43. package/dist/packages/_es/NumberKeyboard.js +7 -9
  44. package/dist/packages/_es/OverLay.js +29 -22
  45. package/dist/packages/_es/Pagination.js +9 -8
  46. package/dist/packages/_es/Picker.js +447 -61
  47. package/dist/packages/_es/Popover.js +34 -161
  48. package/dist/packages/_es/Popup.js +77 -17
  49. package/dist/packages/_es/Price.js +7 -18
  50. package/dist/packages/_es/Progress.js +12 -23
  51. package/dist/packages/_es/Radio.js +3 -3
  52. package/dist/packages/_es/RadioGroup.js +2 -2
  53. package/dist/packages/_es/Range.js +31 -38
  54. package/dist/packages/_es/Rate.js +35 -17
  55. package/dist/packages/_es/Row.js +5 -4
  56. package/dist/packages/_es/SearchBar.js +5 -7
  57. package/dist/packages/_es/ShortPassword.js +59 -89
  58. package/dist/packages/_es/Signature.js +71 -70
  59. package/dist/packages/_es/Sku.js +43 -53
  60. package/dist/packages/_es/Step.js +8 -10
  61. package/dist/packages/_es/Steps.js +2 -2
  62. package/dist/packages/_es/Swipe.js +28 -43
  63. package/dist/packages/_es/Swiper.js +418 -17
  64. package/dist/packages/_es/SwiperItem.js +39 -14
  65. package/dist/packages/_es/Switch.js +32 -11
  66. package/dist/packages/_es/TabPane.js +5 -4
  67. package/dist/packages/_es/Tabbar.js +5 -4
  68. package/dist/packages/_es/TabbarItem.js +9 -8
  69. package/dist/packages/_es/Tabs.js +16 -22
  70. package/dist/packages/_es/Tag.js +6 -5
  71. package/dist/packages/_es/TextArea.js +12 -16
  72. package/dist/packages/_es/TimeDetail.js +5 -7
  73. package/dist/packages/_es/TimePannel.js +5 -7
  74. package/dist/packages/_es/TimeSelect.js +7 -12
  75. package/dist/packages/_es/Toast.js +178 -46
  76. package/dist/packages/_es/Uploader.js +149 -109
  77. package/dist/packages/_es/Video.js +405 -0
  78. package/dist/packages/_es/component.js +1 -1
  79. package/dist/packages/_es/index.js +7 -58
  80. package/dist/packages/_es/index2.js +58 -43
  81. package/dist/packages/_es/index3.js +28 -411
  82. package/dist/packages/_es/plugin-vue_export-helper.js +13 -0
  83. package/dist/packages/_es/pxCheck.js +1 -1
  84. package/dist/packages/_es/raf.js +1 -1
  85. package/dist/packages/_es/util.js +1 -1
  86. package/dist/packages/cellgroup/index.scss +9 -0
  87. package/dist/packages/dialog/index.scss +17 -0
  88. package/dist/packages/drag/index.scss +4 -0
  89. package/dist/packages/fixednav/index.scss +6 -1
  90. package/dist/packages/formitem/index.scss +3 -0
  91. package/dist/packages/icon/index.scss +2 -1
  92. package/dist/packages/numberkeyboard/index.scss +1 -1
  93. package/dist/packages/popover/index.scss +2 -2
  94. package/dist/packages/rate/index.scss +1 -0
  95. package/dist/packages/textarea/index.scss +1 -0
  96. package/dist/packages/timedetail/index.scss +1 -2
  97. package/dist/packages/timeselect/index.scss +3 -0
  98. package/dist/packages/toast/index.scss +6 -0
  99. package/dist/style.css +1 -1
  100. package/dist/style.es.js +2 -1
  101. package/dist/styles/font/config.json +2 -1
  102. package/dist/styles/font/demo_index.html +26 -3
  103. package/dist/styles/font/iconfont.css +7 -3
  104. package/dist/styles/font/iconfont.js +31 -32
  105. package/dist/styles/font/iconfont.json +7 -0
  106. package/dist/styles/font/iconfont.ttf +0 -0
  107. package/dist/styles/font/iconfont.woff +0 -0
  108. package/dist/styles/font/iconfont.woff2 +0 -0
  109. package/dist/styles/themes/default.scss +38 -38
  110. package/dist/styles/variables.scss +5 -1
  111. package/package.json +1 -1
  112. package/dist/packages/_es/commonProps.js +0 -30
  113. package/dist/packages/_es/index.taro.vue_vue&type=script&lang.js +0 -44
  114. package/dist/packages/_es/use-lock-scroll.js +0 -23
@@ -17,16 +17,14 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __require = typeof require !== "undefined" ? require : (x) => {
21
- throw new Error('Dynamic require of "' + x + '" is not supported');
22
- };
23
20
  /*!
24
- * @nutui/nutui v3.1.11 Wed Nov 24 2021 14:54:38 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
25
22
  * (c) 2021 @jdf2e.
26
23
  * Released under the MIT License.
27
24
  */
28
25
  import { getCurrentInstance, reactive, watch, nextTick, onMounted, onUnmounted, toRefs, openBlock, createElementBlock, Fragment, normalizeStyle, renderList, createCommentVNode, toDisplayString, createTextVNode } from "vue";
29
26
  import { c as createComponent } from "./component.js";
27
+ import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
30
28
  function useExtend(apis) {
31
29
  const instance = getCurrentInstance();
32
30
  if (instance) {
@@ -34,7 +32,7 @@ function useExtend(apis) {
34
32
  }
35
33
  }
36
34
  const { componentName, create } = createComponent("countup");
37
- var _sfc_main = create({
35
+ const _sfc_main = create({
38
36
  props: {
39
37
  initNum: {
40
38
  type: Number,
@@ -181,20 +179,20 @@ var _sfc_main = create({
181
179
  return m / baseNum;
182
180
  }
183
181
  };
184
- const topNumber = (index) => {
182
+ const topNumber = (index2) => {
185
183
  let { num_total_len, pointNum, initDigit1, initDigit2, sortFlag } = data;
186
- let idx1 = sortFlag == "add" || sortFlag == "equal" ? String(initDigit2)[index - (num_total_len - pointNum)] : 10 - Number(String(initDigit2)[index - (num_total_len - pointNum)]);
187
- let idx2 = sortFlag == "add" || sortFlag == "equal" ? String(initDigit1)[index] : 10 - Number(String(initDigit1)[index]);
188
- let num = index > num_total_len - pointNum - 1 ? -idx1 * 100 + "%" : index <= String(initDigit1).length - 1 ? -idx2 * 100 + "%" : 0;
184
+ let idx1 = sortFlag == "add" || sortFlag == "equal" ? String(initDigit2)[index2 - (num_total_len - pointNum)] : 10 - Number(String(initDigit2)[index2 - (num_total_len - pointNum)]);
185
+ let idx2 = sortFlag == "add" || sortFlag == "equal" ? String(initDigit1)[index2] : 10 - Number(String(initDigit1)[index2]);
186
+ let num = index2 > num_total_len - pointNum - 1 ? -idx1 * 100 + "%" : index2 <= String(initDigit1).length - 1 ? -idx2 * 100 + "%" : 0;
189
187
  if (num == "-1000%") {
190
188
  num = 0;
191
189
  }
192
190
  return num;
193
191
  };
194
- const turnNumber = (index) => {
192
+ const turnNumber = (index2) => {
195
193
  let { num_total_len, pointNum, initDigit1, initDigit2, sortFlag } = data;
196
- let idx1 = String(initDigit2)[index - (num_total_len - pointNum)];
197
- let num = index > num_total_len - pointNum - 1 ? idx1 ? idx1 : 0 : index <= String(initDigit1).length - 1 ? String(initDigit1)[index] : 0;
194
+ let idx1 = String(initDigit2)[index2 - (num_total_len - pointNum)];
195
+ let num = index2 > num_total_len - pointNum - 1 ? idx1 ? idx1 : 0 : index2 <= String(initDigit1).length - 1 ? String(initDigit1)[index2] : 0;
198
196
  return num;
199
197
  };
200
198
  const countChange = () => {
@@ -324,21 +322,21 @@ var _sfc_main = create({
324
322
  }, props.during);
325
323
  };
326
324
  const runStep = (el) => {
327
- let currentTurn = el.style.all;
325
+ let currentTurn = el.getAttribute("turn-number");
328
326
  let turningNum;
329
327
  if (data.sortFlag == "add") {
330
328
  turningNum = parseInt(String(currentTurn)) + 1;
331
329
  } else {
332
330
  turningNum = parseInt(String(currentTurn)) - 1 >= 0 ? parseInt(String(currentTurn)) - 1 : 9;
333
331
  }
334
- el.style.all = String(turningNum);
335
- if (el.style.transition == "none" || turningNum == 1 || !el.style.transition) {
332
+ el.setAttribute("turn-number", String(turningNum));
333
+ if (el.style.transition == "none 0s ease 0s" || turningNum == 1 || !el.style.transition) {
336
334
  el.style.transition = `all linear ${props.during}ms`;
337
335
  }
338
336
  if (turningNum == 10 || data.sortFlag == "reduce" && turningNum == 0) {
339
337
  var timeOut = null;
340
338
  el.style.top = `-${data.sortFlag == "add" ? turningNum * 100 : (10 - turningNum) * 100}%`;
341
- el.style.all = "0";
339
+ el.setAttribute("turn-number", "0");
342
340
  timeOut = setTimeout(() => {
343
341
  timeOut && clearTimeout(timeOut);
344
342
  el.style.transition = "none";
@@ -399,16 +397,16 @@ var _sfc_main = create({
399
397
  }
400
398
  };
401
399
  useExtend({ machineLuck });
402
- const scrollTime = (index, total, num) => {
400
+ const scrollTime = (index2, total, num) => {
403
401
  let t = setInterval(() => {
404
402
  if (num <= total) {
405
403
  num += 10;
406
- data.prizeY[index] = parseFloat(String(num));
404
+ data.prizeY[index2] = parseFloat(String(num));
407
405
  } else {
408
406
  clearInterval(t);
409
407
  t = null;
410
408
  data.finshMachine += 1;
411
- data.prizeY[index] = total;
409
+ data.prizeY[index2] = total;
412
410
  if (data.finshMachine == props.machineNum) {
413
411
  let distance = props.numHeight * props.machinePrizeNum;
414
412
  data.prizeYPrev = [];
@@ -460,16 +458,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
460
458
  class: "run-number-machine-img",
461
459
  style: normalizeStyle({ height: _ctx.numHeight + "px" })
462
460
  }, [
463
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.machineNum, (val, index) => {
461
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.machineNum, (val, index2) => {
464
462
  return openBlock(), createElementBlock("view", {
465
463
  class: "run-number-machine-img-li",
466
464
  ref: "run-number-machine-img-li",
467
- key: "mImg" + index,
465
+ key: "mImg" + index2,
468
466
  style: normalizeStyle({
469
467
  width: _ctx.numWidth + "px",
470
468
  height: _ctx.numHeight + "px",
471
- background: "url(" + _ctx.customBgImg + ") ",
472
- backgroundPosition: "0 " + _ctx.prizeY[index] + "px"
469
+ backgroundImage: "url(" + _ctx.customBgImg + ")",
470
+ backgroundPositionY: _ctx.prizeY[index2] + "px"
473
471
  })
474
472
  }, null, 4);
475
473
  }), 128))
@@ -478,16 +476,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
478
476
  class: "run-number-img",
479
477
  style: normalizeStyle({ height: _ctx.numHeight + "px" })
480
478
  }, [
481
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.num_total_len, (val, index) => {
479
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.num_total_len, (val, index2) => {
482
480
  return openBlock(), createElementBlock("view", {
483
481
  class: "run-number-img-li",
484
- key: "cImg" + index,
482
+ key: "cImg" + index2,
485
483
  style: normalizeStyle({
486
484
  width: _ctx.numWidth + "px",
487
485
  height: _ctx.numHeight + "px",
488
- left: _ctx.numWidth * (index > _ctx.num_total_len - _ctx.pointNum - 1 ? index == _ctx.num_total_len - _ctx.pointNum ? index * 1.5 : index * 1.3 : index) + "px",
486
+ left: _ctx.numWidth * (index2 > _ctx.num_total_len - _ctx.pointNum - 1 ? index2 == _ctx.num_total_len - _ctx.pointNum ? index2 * 1.5 : index2 * 1.3 : index2) + "px",
489
487
  backgroundImage: "url(" + _ctx.customBgImg + ")",
490
- backgroundPosition: "0 " + -(String(_ctx.relNum)[index] * _ctx.numHeight + _ctx.customSpacNum * String(_ctx.relNum)[index]) + "px",
488
+ backgroundPosition: "0 " + -(String(_ctx.relNum)[index2] * _ctx.numHeight + _ctx.customSpacNum * String(_ctx.relNum)[index2]) + "px",
491
489
  transition: "all linear " + _ctx.during / 10 + "ms"
492
490
  })
493
491
  }, null, 4);
@@ -513,17 +511,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
513
511
  lineHeight: _ctx.numHeight + "px"
514
512
  })
515
513
  }, [
516
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.num_total_len, (val, index) => {
514
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.num_total_len, (val, index2) => {
517
515
  return openBlock(), createElementBlock("view", {
518
516
  ref: "numberItem",
519
517
  class: "numberItem",
520
518
  key: val,
521
519
  style: normalizeStyle({
522
- all: _ctx.turnNumber(index),
523
- top: _ctx.topNumber(index),
524
- left: _ctx.numWidth * (index > _ctx.num_total_len - _ctx.pointNum - 1 ? index * 1.1 : index) + "px"
520
+ top: _ctx.topNumber(index2),
521
+ left: _ctx.numWidth * (index2 > _ctx.num_total_len - _ctx.pointNum - 1 ? index2 * 1.1 : index2) + "px"
525
522
  }),
526
- "turn-number": _ctx.turnNumber(index)
523
+ "turn-number": _ctx.turnNumber(index2)
527
524
  }, [
528
525
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.to0_10, (item, idx) => {
529
526
  return openBlock(), createElementBlock("view", {
@@ -555,5 +552,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
555
552
  ], 64))
556
553
  ]);
557
554
  }
558
- _sfc_main.render = _sfc_render;
559
- export { _sfc_main as default };
555
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
556
+ export { index as default };