@nutui/nutui 3.1.12 → 3.1.15-beta.0

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 (108) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +139 -37
  3. package/dist/nutui.d.ts +8 -1
  4. package/dist/nutui.es.js +2143 -826
  5. package/dist/nutui.umd.js +2155 -831
  6. package/dist/packages/_es/ActionSheet.js +1 -1
  7. package/dist/packages/_es/Address.js +18 -17
  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 +1 -1
  13. package/dist/packages/_es/Calendar.js +1 -1
  14. package/dist/packages/_es/Card.js +1 -1
  15. package/dist/packages/_es/Cascader.js +547 -0
  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 +1 -1
  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 +3 -4
  25. package/dist/packages/_es/CountUp.js +3 -1
  26. package/dist/packages/_es/DatePicker.js +1 -1
  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 +3 -2
  31. package/dist/packages/_es/Empty.js +74 -0
  32. package/dist/packages/_es/FixedNav.js +1 -1
  33. package/dist/packages/_es/Form.js +18 -5
  34. package/dist/packages/_es/FormItem.js +1 -1
  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 +1 -1
  38. package/dist/packages/_es/ImagePreview.js +104 -10
  39. package/dist/packages/_es/Indicator.js +66 -0
  40. package/dist/packages/_es/InfiniteLoading.js +1 -1
  41. package/dist/packages/_es/Input.js +1 -1
  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 +1 -1
  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 +6 -8
  48. package/dist/packages/_es/Notify.js +1 -1
  49. package/dist/packages/_es/NumberKeyboard.js +1 -1
  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 +1 -1
  56. package/dist/packages/_es/Progress.js +1 -1
  57. package/dist/packages/_es/Radio.js +1 -1
  58. package/dist/packages/_es/RadioGroup.js +1 -1
  59. package/dist/packages/_es/Range.js +1 -1
  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 +1 -1
  64. package/dist/packages/_es/Signature.js +1 -1
  65. package/dist/packages/_es/Skeleton.js +138 -0
  66. package/dist/packages/_es/Sku.js +1 -1
  67. package/dist/packages/_es/Step.js +1 -1
  68. package/dist/packages/_es/Steps.js +1 -1
  69. package/dist/packages/_es/Swipe.js +1 -1
  70. package/dist/packages/_es/Swiper.js +1 -1
  71. package/dist/packages/_es/SwiperItem.js +1 -1
  72. package/dist/packages/_es/Switch.js +16 -6
  73. package/dist/packages/_es/TabPane.js +1 -1
  74. package/dist/packages/_es/Tabbar.js +1 -1
  75. package/dist/packages/_es/TabbarItem.js +1 -1
  76. package/dist/packages/_es/Table.js +191 -0
  77. package/dist/packages/_es/Tabs.js +6 -2
  78. package/dist/packages/_es/Tag.js +1 -1
  79. package/dist/packages/_es/TextArea.js +1 -1
  80. package/dist/packages/_es/TimeDetail.js +1 -1
  81. package/dist/packages/_es/TimePannel.js +1 -1
  82. package/dist/packages/_es/TimeSelect.js +1 -1
  83. package/dist/packages/_es/Toast.js +1 -1
  84. package/dist/packages/_es/Uploader.js +1 -1
  85. package/dist/packages/_es/Video.js +1 -1
  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 +1 -1
  89. package/dist/packages/_es/index2.js +1 -1
  90. package/dist/packages/_es/index3.js +1 -1
  91. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  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/empty/index.scss +33 -0
  97. package/dist/packages/formitem/index.scss +1 -1
  98. package/dist/packages/grid/index.scss +10 -0
  99. package/dist/packages/griditem/index.scss +92 -0
  100. package/dist/packages/imagepreview/index.scss +1 -0
  101. package/dist/packages/indicator/index.scss +48 -0
  102. package/dist/packages/skeleton/index.scss +57 -0
  103. package/dist/packages/table/index.scss +81 -0
  104. package/dist/packages/tabs/index.scss +16 -0
  105. package/dist/style.css +1 -1
  106. package/dist/styles/themes/default.scss +45 -38
  107. package/dist/styles/variables.scss +49 -0
  108. package/package.json +2 -3
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.15-beta.0 Thu Dec 23 2021 17:12:09 GMT+0800 (中国标准时间)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -15,11 +15,11 @@ var __spreadValues = (a, b) => {
15
15
  return a;
16
16
  };
17
17
  /*!
18
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
18
+ * @nutui/nutui v3.1.15-beta.0 Thu Dec 23 2021 17:12:09 GMT+0800 (中国标准时间)
19
19
  * (c) 2021 @jdf2e.
20
20
  * Released under the MIT License.
21
21
  */
22
- import { ref, reactive, computed, watch, toRefs, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, withDirectives, createVNode, vShow, toDisplayString, createCommentVNode, createElementBlock, Fragment, renderList, normalizeClass, normalizeStyle, createTextVNode, nextTick } from "vue";
22
+ import { ref, computed, reactive, watch, toRefs, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, withDirectives, createVNode, vShow, toDisplayString, createCommentVNode, createElementBlock, Fragment, renderList, normalizeClass, normalizeStyle, createTextVNode, nextTick } from "vue";
23
23
  import { c as createComponent } from "./component.js";
24
24
  import { _ as _export_sfc } from "./plugin-vue_export-helper.js";
25
25
  const { componentName, create } = createComponent("address");
@@ -94,12 +94,7 @@ const _sfc_main = create({
94
94
  emits: ["update:visible", "type", "change", "selected", "close", "close-mask", "switch-module"],
95
95
  setup(props, { emit }) {
96
96
  const regionLine = ref(null);
97
- const tabItemRef = reactive({
98
- province: ref(null),
99
- city: ref(null),
100
- country: ref(null),
101
- town: ref(null)
102
- });
97
+ const tabRegion = ref(null);
103
98
  const showPopup = ref(props.visible);
104
99
  const privateType = ref(props.type);
105
100
  const tabIndex = ref(0);
@@ -170,8 +165,9 @@ const _sfc_main = create({
170
165
  closeWay.value = "mask";
171
166
  };
172
167
  const lineAnimation = () => {
173
- const name = tabItemRef[tabName.value[tabIndex.value]];
168
+ console.log("\u6ED1\u52A8\u7EA2\u7EBF");
174
169
  nextTick(() => {
170
+ const name = tabRegion.value && tabRegion.value.getElementsByClassName("active")[0];
175
171
  if (name) {
176
172
  const distance = name.offsetLeft;
177
173
  lineDistance.value = distance ? distance : 20;
@@ -299,7 +295,7 @@ const _sfc_main = create({
299
295
  }
300
296
  });
301
297
  });
302
- return __spreadValues(__spreadValues({
298
+ return __spreadValues({
303
299
  showPopup,
304
300
  privateType,
305
301
  tabIndex,
@@ -313,13 +309,14 @@ const _sfc_main = create({
313
309
  getTabName,
314
310
  nextAreaList,
315
311
  regionLine,
312
+ tabRegion,
316
313
  lineDistance,
317
314
  changeRegionTab,
318
315
  selectedExist,
319
316
  clickOverlay,
320
317
  handClose,
321
318
  handleElevatorItem
322
- }, toRefs(props)), toRefs(tabItemRef));
319
+ }, toRefs(props));
323
320
  }
324
321
  });
325
322
  const _hoisted_1 = { class: "nut-address" };
@@ -329,7 +326,10 @@ const _hoisted_4 = {
329
326
  key: 0,
330
327
  class: "custom-address"
331
328
  };
332
- const _hoisted_5 = { class: "region-tab" };
329
+ const _hoisted_5 = {
330
+ class: "region-tab",
331
+ ref: "tabRegion"
332
+ };
333
333
  const _hoisted_6 = ["onClick"];
334
334
  const _hoisted_7 = { class: "region-con" };
335
335
  const _hoisted_8 = { class: "region-group" };
@@ -338,7 +338,10 @@ const _hoisted_10 = {
338
338
  key: 1,
339
339
  class: "custom-address"
340
340
  };
341
- const _hoisted_11 = { class: "region-tab" };
341
+ const _hoisted_11 = {
342
+ class: "region-tab",
343
+ ref: "tabRegion"
344
+ };
342
345
  const _hoisted_12 = ["onClick"];
343
346
  const _hoisted_13 = { class: "elevator-group" };
344
347
  const _hoisted_14 = {
@@ -402,7 +405,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
402
405
  return openBlock(), createElementBlock("view", {
403
406
  class: normalizeClass(["tab-item", [index2 == _ctx.tabIndex ? "active" : ""]]),
404
407
  key: index2,
405
- ref: key,
406
408
  onClick: ($event) => _ctx.changeRegionTab(item, key, index2)
407
409
  }, [
408
410
  createElementVNode("view", null, toDisplayString(_ctx.getTabName(item, index2)), 1)
@@ -413,7 +415,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
413
415
  ref: "regionLine",
414
416
  style: normalizeStyle({ left: _ctx.lineDistance + "px" })
415
417
  }, null, 4)
416
- ]),
418
+ ], 512),
417
419
  createElementVNode("view", _hoisted_7, [
418
420
  createElementVNode("ul", _hoisted_8, [
419
421
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.regionList[_ctx.tabName[_ctx.tabIndex]], (item, index2) => {
@@ -441,7 +443,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
441
443
  return openBlock(), createElementBlock("view", {
442
444
  class: normalizeClass(["tab-item", [index2 == _ctx.tabIndex ? "active" : ""]]),
443
445
  key: index2,
444
- ref: key,
445
446
  onClick: ($event) => _ctx.changeRegionTab(item, key, index2)
446
447
  }, [
447
448
  createElementVNode("view", null, toDisplayString(_ctx.getTabName(item, index2)), 1)
@@ -452,7 +453,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
452
453
  ref: "regionLine",
453
454
  style: normalizeStyle({ left: _ctx.lineDistance + "px" })
454
455
  }, null, 4)
455
- ]),
456
+ ], 512),
456
457
  createElementVNode("view", _hoisted_13, [
457
458
  createVNode(_component_nut_elevator, {
458
459
  height: _ctx.height,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.15-beta.0 Thu Dec 23 2021 17:12:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.15-beta.0 Thu Dec 23 2021 17:12:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.15-beta.0 Thu Dec 23 2021 17:12:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.15-beta.0 Thu Dec 23 2021 17:12:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.15-beta.0 Thu Dec 23 2021 17:12:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -15,7 +15,7 @@ var __spreadValues = (a, b) => {
15
15
  return a;
16
16
  };
17
17
  /*!
18
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
18
+ * @nutui/nutui v3.1.15-beta.0 Thu Dec 23 2021 17:12:09 GMT+0800 (中国标准时间)
19
19
  * (c) 2021 @jdf2e.
20
20
  * Released under the MIT License.
21
21
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.15-beta.0 Thu Dec 23 2021 17:12:09 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */