@nutui/nutui 3.1.12-beta.1 → 3.1.14

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 (131) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +139 -37
  3. package/dist/nutui.d.ts +9 -2
  4. package/dist/nutui.es.js +4830 -2950
  5. package/dist/nutui.umd.js +4910 -2953
  6. package/dist/packages/_es/ActionSheet.js +12 -13
  7. package/dist/packages/_es/Address.js +64 -77
  8. package/dist/packages/_es/Avatar.js +5 -4
  9. package/dist/packages/_es/BackTop.js +109 -72
  10. package/dist/packages/_es/Badge.js +5 -4
  11. package/dist/packages/_es/Barrage.js +57 -63
  12. package/dist/packages/_es/Button.js +6 -5
  13. package/dist/packages/_es/Calendar.js +18 -27
  14. package/dist/packages/_es/Card.js +8 -7
  15. package/dist/packages/_es/Cascader.js +547 -0
  16. package/dist/packages/_es/Cell.js +13 -5
  17. package/dist/packages/_es/CellGroup.js +14 -7
  18. package/dist/packages/_es/Checkbox.js +3 -3
  19. package/dist/packages/_es/CheckboxGroup.js +4 -9
  20. package/dist/packages/_es/CircleProgress.js +46 -142
  21. package/dist/packages/_es/Col.js +5 -4
  22. package/dist/packages/_es/Collapse.js +10 -35
  23. package/dist/packages/_es/CollapseItem.js +35 -80
  24. package/dist/packages/_es/CountDown.js +7 -10
  25. package/dist/packages/_es/CountUp.js +33 -34
  26. package/dist/packages/_es/DatePicker.js +219 -451
  27. package/dist/packages/_es/Dialog.js +98 -46
  28. package/dist/packages/_es/Divider.js +6 -5
  29. package/dist/packages/_es/Drag.js +50 -76
  30. package/dist/packages/_es/Elevator.js +53 -81
  31. package/dist/packages/_es/Empty.js +74 -0
  32. package/dist/packages/_es/FixedNav.js +9 -8
  33. package/dist/packages/_es/Form.js +23 -9
  34. package/dist/packages/_es/FormItem.js +5 -4
  35. package/dist/packages/_es/Grid.js +12 -0
  36. package/dist/packages/_es/GridItem.js +149 -0
  37. package/dist/packages/_es/Icon.js +40 -6
  38. package/dist/packages/_es/ImagePreview.js +158 -44
  39. package/dist/packages/_es/Indicator.js +66 -0
  40. package/dist/packages/_es/InfiniteLoading.js +109 -95
  41. package/dist/packages/_es/Input.js +21 -22
  42. package/dist/packages/_es/InputNumber.js +18 -24
  43. package/dist/packages/_es/Layout.js +2 -2
  44. package/dist/packages/_es/Menu.js +14 -16
  45. package/dist/packages/_es/MenuItem.js +11 -9
  46. package/dist/packages/_es/Navbar.js +7 -7
  47. package/dist/packages/_es/NoticeBar.js +31 -46
  48. package/dist/packages/_es/Notify.js +166 -30
  49. package/dist/packages/_es/NumberKeyboard.js +7 -9
  50. package/dist/packages/_es/OverLay.js +29 -22
  51. package/dist/packages/_es/Pagination.js +9 -8
  52. package/dist/packages/_es/Picker.js +447 -61
  53. package/dist/packages/_es/Popover.js +34 -161
  54. package/dist/packages/_es/Popup.js +77 -17
  55. package/dist/packages/_es/Price.js +7 -18
  56. package/dist/packages/_es/Progress.js +12 -23
  57. package/dist/packages/_es/Radio.js +3 -3
  58. package/dist/packages/_es/RadioGroup.js +2 -2
  59. package/dist/packages/_es/Range.js +31 -38
  60. package/dist/packages/_es/Rate.js +35 -17
  61. package/dist/packages/_es/Row.js +5 -4
  62. package/dist/packages/_es/SearchBar.js +5 -7
  63. package/dist/packages/_es/ShortPassword.js +59 -89
  64. package/dist/packages/_es/Signature.js +71 -70
  65. package/dist/packages/_es/Skeleton.js +138 -0
  66. package/dist/packages/_es/Sku.js +43 -53
  67. package/dist/packages/_es/Step.js +8 -10
  68. package/dist/packages/_es/Steps.js +2 -2
  69. package/dist/packages/_es/Swipe.js +28 -43
  70. package/dist/packages/_es/Swiper.js +418 -17
  71. package/dist/packages/_es/SwiperItem.js +39 -14
  72. package/dist/packages/_es/Switch.js +47 -16
  73. package/dist/packages/_es/TabPane.js +5 -4
  74. package/dist/packages/_es/Tabbar.js +5 -4
  75. package/dist/packages/_es/TabbarItem.js +9 -8
  76. package/dist/packages/_es/Table.js +191 -0
  77. package/dist/packages/_es/Tabs.js +21 -23
  78. package/dist/packages/_es/Tag.js +6 -5
  79. package/dist/packages/_es/TextArea.js +12 -16
  80. package/dist/packages/_es/TimeDetail.js +5 -7
  81. package/dist/packages/_es/TimePannel.js +5 -7
  82. package/dist/packages/_es/TimeSelect.js +7 -12
  83. package/dist/packages/_es/Toast.js +178 -46
  84. package/dist/packages/_es/Uploader.js +149 -109
  85. package/dist/packages/_es/Video.js +405 -0
  86. package/dist/packages/_es/common.js +136 -0
  87. package/dist/packages/_es/component.js +1 -1
  88. package/dist/packages/_es/index.js +7 -58
  89. package/dist/packages/_es/index2.js +58 -43
  90. package/dist/packages/_es/index3.js +28 -411
  91. package/dist/packages/_es/plugin-vue_export-helper.js +13 -0
  92. package/dist/packages/_es/pxCheck.js +1 -1
  93. package/dist/packages/_es/raf.js +1 -1
  94. package/dist/packages/_es/util.js +1 -1
  95. package/dist/packages/cascader/index.scss +81 -0
  96. package/dist/packages/cellgroup/index.scss +9 -0
  97. package/dist/packages/dialog/index.scss +17 -0
  98. package/dist/packages/drag/index.scss +4 -0
  99. package/dist/packages/empty/index.scss +33 -0
  100. package/dist/packages/fixednav/index.scss +6 -1
  101. package/dist/packages/formitem/index.scss +4 -1
  102. package/dist/packages/grid/index.scss +10 -0
  103. package/dist/packages/griditem/index.scss +92 -0
  104. package/dist/packages/icon/index.scss +2 -1
  105. package/dist/packages/indicator/index.scss +48 -0
  106. package/dist/packages/numberkeyboard/index.scss +1 -1
  107. package/dist/packages/popover/index.scss +2 -2
  108. package/dist/packages/rate/index.scss +1 -0
  109. package/dist/packages/skeleton/index.scss +57 -0
  110. package/dist/packages/table/index.scss +81 -0
  111. package/dist/packages/tabs/index.scss +16 -0
  112. package/dist/packages/textarea/index.scss +1 -0
  113. package/dist/packages/timedetail/index.scss +1 -2
  114. package/dist/packages/timeselect/index.scss +3 -0
  115. package/dist/packages/toast/index.scss +6 -0
  116. package/dist/style.css +1 -1
  117. package/dist/style.es.js +2 -1
  118. package/dist/styles/font/config.json +2 -1
  119. package/dist/styles/font/demo_index.html +26 -3
  120. package/dist/styles/font/iconfont.css +7 -3
  121. package/dist/styles/font/iconfont.js +31 -32
  122. package/dist/styles/font/iconfont.json +7 -0
  123. package/dist/styles/font/iconfont.ttf +0 -0
  124. package/dist/styles/font/iconfont.woff +0 -0
  125. package/dist/styles/font/iconfont.woff2 +0 -0
  126. package/dist/styles/themes/default.scss +40 -33
  127. package/dist/styles/variables.scss +54 -1
  128. package/package.json +2 -3
  129. package/dist/packages/_es/commonProps.js +0 -30
  130. package/dist/packages/_es/index.taro.vue_vue&type=script&lang.js +0 -44
  131. 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.14 Wed Dec 22 2021 20:49:10 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,17 @@ 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",
464
+ ref_for: true,
466
465
  ref: "run-number-machine-img-li",
467
- key: "mImg" + index,
466
+ key: "mImg" + index2,
468
467
  style: normalizeStyle({
469
468
  width: _ctx.numWidth + "px",
470
469
  height: _ctx.numHeight + "px",
471
- background: "url(" + _ctx.customBgImg + ") ",
472
- backgroundPosition: "0 " + _ctx.prizeY[index] + "px"
470
+ backgroundImage: "url(" + _ctx.customBgImg + ")",
471
+ backgroundPositionY: _ctx.prizeY[index2] + "px"
473
472
  })
474
473
  }, null, 4);
475
474
  }), 128))
@@ -478,16 +477,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
478
477
  class: "run-number-img",
479
478
  style: normalizeStyle({ height: _ctx.numHeight + "px" })
480
479
  }, [
481
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.num_total_len, (val, index) => {
480
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.num_total_len, (val, index2) => {
482
481
  return openBlock(), createElementBlock("view", {
483
482
  class: "run-number-img-li",
484
- key: "cImg" + index,
483
+ key: "cImg" + index2,
485
484
  style: normalizeStyle({
486
485
  width: _ctx.numWidth + "px",
487
486
  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",
487
+ 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
488
  backgroundImage: "url(" + _ctx.customBgImg + ")",
490
- backgroundPosition: "0 " + -(String(_ctx.relNum)[index] * _ctx.numHeight + _ctx.customSpacNum * String(_ctx.relNum)[index]) + "px",
489
+ backgroundPosition: "0 " + -(String(_ctx.relNum)[index2] * _ctx.numHeight + _ctx.customSpacNum * String(_ctx.relNum)[index2]) + "px",
491
490
  transition: "all linear " + _ctx.during / 10 + "ms"
492
491
  })
493
492
  }, null, 4);
@@ -513,17 +512,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
513
512
  lineHeight: _ctx.numHeight + "px"
514
513
  })
515
514
  }, [
516
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.num_total_len, (val, index) => {
515
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.num_total_len, (val, index2) => {
517
516
  return openBlock(), createElementBlock("view", {
517
+ ref_for: true,
518
518
  ref: "numberItem",
519
519
  class: "numberItem",
520
520
  key: val,
521
521
  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"
522
+ top: _ctx.topNumber(index2),
523
+ left: _ctx.numWidth * (index2 > _ctx.num_total_len - _ctx.pointNum - 1 ? index2 * 1.1 : index2) + "px"
525
524
  }),
526
- "turn-number": _ctx.turnNumber(index)
525
+ "turn-number": _ctx.turnNumber(index2)
527
526
  }, [
528
527
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.to0_10, (item, idx) => {
529
528
  return openBlock(), createElementBlock("view", {
@@ -555,5 +554,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
555
554
  ], 64))
556
555
  ]);
557
556
  }
558
- _sfc_main.render = _sfc_render;
559
- export { _sfc_main as default };
557
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
558
+ export { index as default };