@nutui/nutui 4.0.4 → 4.0.5-beta.2

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 (78) hide show
  1. package/dist/nutui.es.js +1 -1
  2. package/dist/nutui.umd.js +2 -2
  3. package/dist/packages/_es/Address.js +3 -0
  4. package/dist/packages/_es/AddressList.js +2 -2
  5. package/dist/packages/_es/Audio.js +6 -0
  6. package/dist/packages/_es/AudioOperate.js +1 -0
  7. package/dist/packages/_es/Avatar.js +2 -0
  8. package/dist/packages/_es/AvatarGroup.js +1 -0
  9. package/dist/packages/_es/Backtop.js +2 -2
  10. package/dist/packages/_es/Barrage.js +1 -1
  11. package/dist/packages/_es/Button.js +1 -1
  12. package/dist/packages/_es/Calendar.js +1 -1
  13. package/dist/packages/_es/CalendarItem.js +1 -1
  14. package/dist/packages/_es/Cascader.js +2 -0
  15. package/dist/packages/_es/Category.js +2 -0
  16. package/dist/packages/_es/CategoryPane.js +3 -0
  17. package/dist/packages/_es/Cell.js +1 -0
  18. package/dist/packages/_es/CellGroup.js +1 -1
  19. package/dist/packages/_es/Checkbox.js +5 -1
  20. package/dist/packages/_es/CheckboxGroup.js +15 -2
  21. package/dist/packages/_es/CollapseItem.js +1 -0
  22. package/dist/packages/_es/Comment.js +5 -0
  23. package/dist/packages/_es/Countdown.js +8 -0
  24. package/dist/packages/_es/Countup.js +10 -0
  25. package/dist/packages/_es/DatePicker.js +16 -20
  26. package/dist/packages/_es/Dialog.js +6 -3
  27. package/dist/packages/_es/Ellipsis.js +2 -0
  28. package/dist/packages/_es/Empty.js +3 -0
  29. package/dist/packages/_es/Grid.js +1 -1
  30. package/dist/packages/_es/GridItem.js +2 -1
  31. package/dist/packages/_es/ImagePreview.js +2 -1
  32. package/dist/packages/_es/Input.js +9 -2
  33. package/dist/packages/_es/Invoice.js +5 -3
  34. package/dist/packages/_es/Navbar.js +6 -0
  35. package/dist/packages/_es/Noticebar.js +1 -0
  36. package/dist/packages/_es/Notify.js +4 -1
  37. package/dist/packages/_es/Picker.js +2 -0
  38. package/dist/packages/_es/PullRefresh.js +4 -0
  39. package/dist/packages/_es/Radio.js +1 -1
  40. package/dist/packages/_es/RadioGroup.js +1 -1
  41. package/dist/packages/_es/Searchbar.js +1 -0
  42. package/dist/packages/_es/ShortPassword.js +1 -0
  43. package/dist/packages/_es/Skeleton.js +10 -0
  44. package/dist/packages/_es/Sku.js +14 -0
  45. package/dist/packages/_es/Swiper.js +1 -0
  46. package/dist/packages/_es/TabbarItem.js +5 -0
  47. package/dist/packages/_es/Tabs.js +22 -6
  48. package/dist/packages/_es/Textarea.js +1 -0
  49. package/dist/packages/_es/Toast.js +10 -2
  50. package/dist/packages/_es/Tour.js +1 -0
  51. package/dist/packages/_es/Uploader.js +3 -1
  52. package/dist/packages/_es/Video.js +18 -0
  53. package/dist/packages/_es/{common-ceb98554.js → common-b9a5e726.js} +8 -0
  54. package/dist/packages/_es/{index-2a2f92bd.js → index-f933fcf6.js} +41 -4
  55. package/dist/packages/_es/{index.vue_vue_type_script_lang-1291fceb.js → index.vue_vue_type_script_lang-22dfc112.js} +1 -0
  56. package/dist/packages/_es/{index.vue_vue_type_script_lang-d4c88f85.js → index.vue_vue_type_script_lang-442e4704.js} +1 -0
  57. package/dist/packages/_es/{mountComponent-1ece4110.js → mountComponent-8b24c346.js} +7 -7
  58. package/dist/packages/button/index.scss +1 -1
  59. package/dist/packages/cellgroup/index.scss +1 -1
  60. package/dist/packages/tabs/index.scss +8 -1
  61. package/dist/smartips/web-types.json +4 -4
  62. package/dist/style.css +1 -1
  63. package/dist/styles/themes/default.scss +52 -52
  64. package/dist/styles/themes/jdb.scss +52 -52
  65. package/dist/styles/themes/jddkh.scss +52 -52
  66. package/dist/styles/themes/jdt.scss +52 -52
  67. package/dist/types/__VUE/cell/index.vue.d.ts +1 -1
  68. package/dist/types/__VUE/countup/index.vue.d.ts +2 -2
  69. package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
  70. package/dist/types/__VUE/input/index.vue.d.ts +4 -2
  71. package/dist/types/__VUE/inputnumber/index.vue.d.ts +1 -1
  72. package/dist/types/__VUE/rate/index.vue.d.ts +1 -1
  73. package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
  74. package/dist/types/__VUE/skeleton/index.vue.d.ts +1 -1
  75. package/dist/types/__VUE/tabs/index.vue.d.ts +1 -0
  76. package/dist/types/__VUE/textarea/index.vue.d.ts +1 -1
  77. package/dist/types/index.d.ts +1 -1
  78. package/package.json +1 -1
@@ -4,33 +4,57 @@ import { r as requestAniFrame } from "./raf-729dad54.js";
4
4
  import { u as useExpose } from "./index-79c5dc33.js";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-cc2b3d55.js";
6
6
  const Utils = {
7
+ /**
8
+ * 是否为闫年
9
+ * @return {Boolse} true|false
10
+ */
7
11
  isLeapYear: function(y) {
8
12
  return y % 4 == 0 && y % 100 != 0 || y % 400 == 0;
9
13
  },
14
+ /**
15
+ * 返回星期数
16
+ * @return {String}
17
+ */
10
18
  getWhatDay: function(year, month, day) {
11
- const date = new Date(year + "/" + month + "/" + day);
19
+ const date = /* @__PURE__ */ new Date(year + "/" + month + "/" + day);
12
20
  const index = date.getDay();
13
21
  const dayNames = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
14
22
  return dayNames[index];
15
23
  },
24
+ /**
25
+ * 返回星期数
26
+ * @return {Number}
27
+ */
16
28
  getMonthPreDay: function(year, month) {
17
- const date = new Date(year + "/" + month + "/01");
29
+ const date = /* @__PURE__ */ new Date(year + "/" + month + "/01");
18
30
  let day = date.getDay();
19
31
  if (day == 0) {
20
32
  day = 7;
21
33
  }
22
34
  return day;
23
35
  },
36
+ /**
37
+ * 返回月份天数
38
+ * @return {Number}
39
+ */
24
40
  getMonthDays: function(year, month) {
25
41
  if (/^0/.test(month)) {
26
42
  month = month.split("")[1];
27
43
  }
28
44
  return [0, 31, this.isLeapYear(Number(year)) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
29
45
  },
46
+ /**
47
+ * 补齐数字位数
48
+ * @return {string}
49
+ */
30
50
  getNumTwoBit: function(n) {
31
51
  n = Number(n);
32
52
  return (n > 9 ? "" : "0") + n;
33
53
  },
54
+ /**
55
+ * 日期对象转成字符串
56
+ * @return {string}
57
+ */
34
58
  date2Str: function(date, split) {
35
59
  split = split || "-";
36
60
  const y = date.getFullYear();
@@ -38,13 +62,22 @@ const Utils = {
38
62
  const d = this.getNumTwoBit(date.getDate());
39
63
  return [y, m, d].join(split);
40
64
  },
65
+ /**
66
+ * 返回日期格式字符串
67
+ * @param {Number} 0返回今天的日期、1返回明天的日期,2返回后天得日期,依次类推
68
+ * @return {string} '2014-12-31'
69
+ */
41
70
  getDay: function(i) {
42
71
  i = i || 0;
43
- let date = new Date();
72
+ let date = /* @__PURE__ */ new Date();
44
73
  const diff = i * (1e3 * 60 * 60 * 24);
45
74
  date = new Date(date.getTime() + diff);
46
75
  return this.date2Str(date);
47
76
  },
77
+ /**
78
+ * 时间比较
79
+ * @return {Boolean}
80
+ */
48
81
  compareDate: function(date1, date2) {
49
82
  const startTime = new Date(date1.replace("-", "/").replace("-", "/"));
50
83
  const endTime = new Date(date2.replace("-", "/").replace("-", "/"));
@@ -53,6 +86,10 @@ const Utils = {
53
86
  }
54
87
  return true;
55
88
  },
89
+ /**
90
+ * 时间是否相等
91
+ * @return {Boolean}
92
+ */
56
93
  isEqual: function(date1, date2) {
57
94
  const startTime = new Date(date1).getTime();
58
95
  const endTime = new Date(date2).getTime();
@@ -669,7 +706,7 @@ const _sfc_main = create({
669
706
  };
670
707
  const isCurrDay = (dateInfo) => {
671
708
  const date = `${dateInfo.year}-${dateInfo.month}-${Number(dateInfo.day) < 10 ? "0" + dateInfo.day : dateInfo.day}`;
672
- return Utils.isEqual(date, Utils.date2Str(new Date()));
709
+ return Utils.isEqual(date, Utils.date2Str(/* @__PURE__ */ new Date()));
673
710
  };
674
711
  const mothsViewScroll = (e) => {
675
712
  if (state.monthsData.length <= 1) {
@@ -10,6 +10,7 @@ const _sfc_main = create({
10
10
  direction: {
11
11
  type: String,
12
12
  default: "vertical"
13
+ //horizontal
13
14
  },
14
15
  textPosition: {
15
16
  type: String,
@@ -16,6 +16,7 @@ const _sfc_main = create({
16
16
  shape: {
17
17
  type: String,
18
18
  default: "round"
19
+ // button
19
20
  },
20
21
  label: {
21
22
  type: [String, Number, Boolean],
@@ -1,22 +1,22 @@
1
1
  import { createApp } from "vue";
2
2
  import { j as isString, k as isFunction } from "./component-81a4c1d0.js";
3
3
  const CreateComponent = (options, component) => {
4
- let elWarp = document.body;
4
+ let elWrap = document.body;
5
5
  const teleport = options.teleport || "body";
6
6
  if (teleport != "body") {
7
7
  if (isString(teleport)) {
8
- elWarp = document.querySelector(teleport);
8
+ elWrap = document.querySelector(teleport);
9
9
  } else {
10
- elWarp = options.teleport;
10
+ elWrap = options.teleport;
11
11
  }
12
12
  }
13
13
  const root = document.createElement("view");
14
14
  const name = component.name ? component.name + "-" : "";
15
- const id1 = options.id || new Date().getTime();
15
+ const id1 = options.id || (/* @__PURE__ */ new Date()).getTime();
16
16
  root.id = name + id1;
17
17
  let Wrapper = {};
18
18
  if (isFunction(component.wrapper)) {
19
- Wrapper = component.wrapper(elWarp, root);
19
+ Wrapper = component.wrapper(elWrap, root);
20
20
  } else {
21
21
  Wrapper = component.wrapper;
22
22
  }
@@ -25,12 +25,12 @@ const CreateComponent = (options, component) => {
25
25
  componens && componens.forEach((comp) => {
26
26
  instance.use(comp);
27
27
  });
28
- elWarp.appendChild(root);
28
+ elWrap.appendChild(root);
29
29
  return {
30
30
  instance: instance.mount(root),
31
31
  unmount: () => {
32
32
  instance.unmount();
33
- elWarp.removeChild(root);
33
+ elWrap.removeChild(root);
34
34
  }
35
35
  };
36
36
  };
@@ -42,7 +42,7 @@
42
42
  &:active::before {
43
43
  opacity: 0.1;
44
44
  }
45
- &__warp {
45
+ &__wrap {
46
46
  height: 100%;
47
47
  width: 100%;
48
48
  display: flex;
@@ -18,7 +18,7 @@
18
18
  margin-top: 10px;
19
19
  margin-bottom: 10px;
20
20
  }
21
- &__warp {
21
+ &__wrap {
22
22
  display: inherit;
23
23
  border-radius: $cell-border-radius;
24
24
  overflow: hidden;
@@ -48,6 +48,13 @@
48
48
  padding: 0 10px 0 15px;
49
49
  }
50
50
  }
51
+ &.scroll-vertical {
52
+ overflow-y: scroll;
53
+ height: auto;
54
+ .nut-tabs__titles-placeholder {
55
+ height: 22px;
56
+ }
57
+ }
51
58
  &-item {
52
59
  height: $tabs-vertical-titles-item-height;
53
60
  flex: none;
@@ -92,7 +99,7 @@
92
99
 
93
100
  &__titles {
94
101
  height: $tabs-horizontal-titles-height;
95
- padding: 0 10px;
102
+ // padding: 0 10px;
96
103
  display: flex;
97
104
  user-select: none;
98
105
  background: $tabs-titles-background-color;
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
4
  "name": "NutUI",
5
- "version": "4.0.4",
5
+ "version": "4.0.5-beta.2",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "tags": [
@@ -1686,8 +1686,8 @@
1686
1686
  },
1687
1687
  {
1688
1688
  "name": "type",
1689
- "default": "`'date'`",
1690
- "description": "时间类型,可选值 `date` `time` `year-month` `month-day` `datehour`",
1689
+ "default": "`date`",
1690
+ "description": "时间类型,可选值 `date`(年月日) `time`(时分秒) `year-month`(年月) `month-day`(月日) `datehour`(年月日时) `hour-minute`(时分)",
1691
1691
  "value": {
1692
1692
  "type": "string",
1693
1693
  "kind": "expression"
@@ -2182,7 +2182,7 @@
2182
2182
  },
2183
2183
  {
2184
2184
  "name": "card-buy-min",
2185
- "default": "`9999`",
2185
+ "default": "`1`",
2186
2186
  "description": "购买数量最小值",
2187
2187
  "value": {
2188
2188
  "type": "number",