@nutui/nutui 3.1.10 → 3.1.12-beta.1

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