@nutui/nutui 4.0.1 → 4.0.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 (75) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.umd.js +2 -2
  4. package/dist/packages/_es/Address.js +25 -6
  5. package/dist/packages/_es/Audio.js +0 -6
  6. package/dist/packages/_es/AudioOperate.js +0 -1
  7. package/dist/packages/_es/Avatar.js +0 -2
  8. package/dist/packages/_es/AvatarGroup.js +0 -1
  9. package/dist/packages/_es/Barrage.js +3 -3
  10. package/dist/packages/_es/Calendar.js +1 -1
  11. package/dist/packages/_es/CalendarItem.js +1 -1
  12. package/dist/packages/_es/Cascader.js +0 -2
  13. package/dist/packages/_es/Category.js +0 -2
  14. package/dist/packages/_es/CategoryPane.js +0 -3
  15. package/dist/packages/_es/Cell.js +0 -1
  16. package/dist/packages/_es/Checkbox.js +0 -1
  17. package/dist/packages/_es/CollapseItem.js +0 -1
  18. package/dist/packages/_es/Comment.js +0 -5
  19. package/dist/packages/_es/Countdown.js +0 -8
  20. package/dist/packages/_es/Countup.js +0 -10
  21. package/dist/packages/_es/DatePicker.js +0 -2
  22. package/dist/packages/_es/Dialog.js +0 -3
  23. package/dist/packages/_es/Ellipsis.js +0 -2
  24. package/dist/packages/_es/Empty.js +0 -3
  25. package/dist/packages/_es/Form.js +1 -1
  26. package/dist/packages/_es/Grid.js +1 -1
  27. package/dist/packages/_es/GridItem.js +1 -2
  28. package/dist/packages/_es/ImagePreview.js +0 -2
  29. package/dist/packages/_es/Input.js +5 -3
  30. package/dist/packages/_es/Invoice.js +3 -5
  31. package/dist/packages/_es/List.js +164 -26
  32. package/dist/packages/_es/Navbar.js +0 -6
  33. package/dist/packages/_es/Noticebar.js +1 -2
  34. package/dist/packages/_es/Notify.js +0 -3
  35. package/dist/packages/_es/Picker.js +0 -2
  36. package/dist/packages/_es/PullRefresh.js +0 -5
  37. package/dist/packages/_es/Radio.js +1 -1
  38. package/dist/packages/_es/RadioGroup.js +1 -1
  39. package/dist/packages/_es/Searchbar.js +0 -1
  40. package/dist/packages/_es/ShortPassword.js +0 -1
  41. package/dist/packages/_es/Signature.js +0 -1
  42. package/dist/packages/_es/Skeleton.js +0 -10
  43. package/dist/packages/_es/Sku.js +0 -14
  44. package/dist/packages/_es/Swiper.js +0 -1
  45. package/dist/packages/_es/TabbarItem.js +0 -5
  46. package/dist/packages/_es/Tabs.js +1 -3
  47. package/dist/packages/_es/Textarea.js +0 -1
  48. package/dist/packages/_es/Toast.js +0 -8
  49. package/dist/packages/_es/Tour.js +0 -1
  50. package/dist/packages/_es/Uploader.js +0 -2
  51. package/dist/packages/_es/Video.js +0 -18
  52. package/dist/packages/_es/{common-0c815463.js → common-05c67d9a.js} +0 -8
  53. package/dist/packages/_es/{index-0432a798.js → index-c4bbec14.js} +0 -37
  54. package/dist/packages/_es/{index.vue_vue_type_script_lang-9c679f64.js → index.vue_vue_type_script_lang-8b9f3de5.js} +0 -1
  55. package/dist/packages/_es/{index.vue_vue_type_script_lang-0725f0ae.js → index.vue_vue_type_script_lang-ee936659.js} +0 -1
  56. package/dist/packages/address/index.scss +1 -1
  57. package/dist/packages/input/index.scss +5 -3
  58. package/dist/packages/list/index.scss +8 -8
  59. package/dist/packages/menuitem/index.scss +2 -2
  60. package/dist/packages/noticebar/index.scss +8 -2
  61. package/dist/packages/shortpassword/index.scss +16 -0
  62. package/dist/smartips/web-types.json +43 -7
  63. package/dist/style.css +1 -1
  64. package/dist/styles/themes/default.scss +51 -51
  65. package/dist/styles/themes/jdb.scss +51 -51
  66. package/dist/styles/themes/jddkh.scss +51 -51
  67. package/dist/styles/themes/jdt.scss +51 -51
  68. package/dist/types/__VUE/address/index.vue.d.ts +1 -0
  69. package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
  70. package/dist/types/__VUE/input/index.vue.d.ts +9 -0
  71. package/dist/types/__VUE/list/index.vue.d.ts +42 -13
  72. package/dist/types/__VUE/list/type.d.ts +13 -0
  73. package/dist/types/__VUE/uploader/type.d.ts +2 -1
  74. package/dist/types/index.d.ts +1 -1
  75. package/package.json +1 -1
@@ -29,17 +29,13 @@ const _sfc_main = create({
29
29
  type: Object,
30
30
  default: {
31
31
  autoplay: false,
32
- //是否自动播放
33
32
  volume: 0.5,
34
33
  poster: "",
35
34
  loop: false,
36
35
  controls: true,
37
36
  muted: false,
38
- //是否静音
39
37
  disabled: false,
40
- //禁止操作
41
38
  playsinline: false,
42
- //行内展示
43
39
  touchPlay: false,
44
40
  preload: ""
45
41
  },
@@ -56,44 +52,30 @@ const _sfc_main = create({
56
52
  const state = reactive({
57
53
  videoElm: null,
58
54
  initial: true,
59
- //控制封面的显示
60
55
  showToolbox: false,
61
- //控制控制器和标题的显示
62
- // 视频容器元素
63
56
  player: {
64
57
  $player: null,
65
58
  pos: null
66
59
  },
67
- // progress进度条元素
68
60
  progressBar: {
69
61
  progressElm: null,
70
- // 进度条DOM对象
71
62
  pos: null
72
63
  },
73
- // video控制显示设置
74
64
  videoSet: {
75
65
  loaded: 0,
76
- // 缓存长度
77
66
  displayTime: "00:00",
78
- // 进度时间
79
67
  totalTime: "00:00",
80
- // 总时间
81
68
  progress: {
82
69
  width: 0,
83
- // 进度条长度
84
70
  current: 0
85
- // 进度条当前位置
86
71
  }
87
72
  },
88
73
  state: {
89
74
  controlShow: true,
90
75
  vol: 0.5,
91
- //音量
92
76
  currentTime: 0,
93
- //当前时间
94
77
  fullScreen: false,
95
78
  playing: false,
96
- //是否正在播放
97
79
  isLoading: false,
98
80
  isEnd: false,
99
81
  isError: false,
@@ -68,41 +68,33 @@ function useProvide(key, childName) {
68
68
  const { componentName } = createComponent("grid");
69
69
  const GRID_KEY = Symbol("grid");
70
70
  const gridProps = {
71
- // 列数
72
71
  columnNum: {
73
72
  type: [Number, String],
74
73
  default: 4
75
74
  },
76
- // 是否显示边框
77
75
  border: {
78
76
  type: Boolean,
79
77
  default: true
80
78
  },
81
- // 格子之间间隔距离
82
79
  gutter: {
83
80
  type: [Number, String],
84
81
  default: 0
85
82
  },
86
- // 是否内容居中
87
83
  center: {
88
84
  type: Boolean,
89
85
  default: true
90
86
  },
91
- // 是否固定正方形
92
87
  square: {
93
88
  type: Boolean,
94
89
  default: false
95
90
  },
96
- // 内容与文字翻转
97
91
  reverse: {
98
92
  type: Boolean,
99
93
  default: false
100
94
  },
101
- // 内容排列方向
102
95
  direction: {
103
96
  type: String
104
97
  },
105
- // 是否开启点击反馈
106
98
  clickable: {
107
99
  type: Boolean,
108
100
  default: false
@@ -4,27 +4,15 @@ 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
- */
11
7
  isLeapYear: function(y) {
12
8
  return y % 4 == 0 && y % 100 != 0 || y % 400 == 0;
13
9
  },
14
- /**
15
- * 返回星期数
16
- * @return {String}
17
- */
18
10
  getWhatDay: function(year, month, day) {
19
11
  const date = new Date(year + "/" + month + "/" + day);
20
12
  const index = date.getDay();
21
13
  const dayNames = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
22
14
  return dayNames[index];
23
15
  },
24
- /**
25
- * 返回星期数
26
- * @return {Number}
27
- */
28
16
  getMonthPreDay: function(year, month) {
29
17
  const date = new Date(year + "/" + month + "/01");
30
18
  let day = date.getDay();
@@ -33,28 +21,16 @@ const Utils = {
33
21
  }
34
22
  return day;
35
23
  },
36
- /**
37
- * 返回月份天数
38
- * @return {Number}
39
- */
40
24
  getMonthDays: function(year, month) {
41
25
  if (/^0/.test(month)) {
42
26
  month = month.split("")[1];
43
27
  }
44
28
  return [0, 31, this.isLeapYear(Number(year)) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
45
29
  },
46
- /**
47
- * 补齐数字位数
48
- * @return {string}
49
- */
50
30
  getNumTwoBit: function(n) {
51
31
  n = Number(n);
52
32
  return (n > 9 ? "" : "0") + n;
53
33
  },
54
- /**
55
- * 日期对象转成字符串
56
- * @return {string}
57
- */
58
34
  date2Str: function(date, split) {
59
35
  split = split || "-";
60
36
  const y = date.getFullYear();
@@ -62,11 +38,6 @@ const Utils = {
62
38
  const d = this.getNumTwoBit(date.getDate());
63
39
  return [y, m, d].join(split);
64
40
  },
65
- /**
66
- * 返回日期格式字符串
67
- * @param {Number} 0返回今天的日期、1返回明天的日期,2返回后天得日期,依次类推
68
- * @return {string} '2014-12-31'
69
- */
70
41
  getDay: function(i) {
71
42
  i = i || 0;
72
43
  let date = new Date();
@@ -74,10 +45,6 @@ const Utils = {
74
45
  date = new Date(date.getTime() + diff);
75
46
  return this.date2Str(date);
76
47
  },
77
- /**
78
- * 时间比较
79
- * @return {Boolean}
80
- */
81
48
  compareDate: function(date1, date2) {
82
49
  const startTime = new Date(date1.replace("-", "/").replace("-", "/"));
83
50
  const endTime = new Date(date2.replace("-", "/").replace("-", "/"));
@@ -86,10 +53,6 @@ const Utils = {
86
53
  }
87
54
  return true;
88
55
  },
89
- /**
90
- * 时间是否相等
91
- * @return {Boolean}
92
- */
93
56
  isEqual: function(date1, date2) {
94
57
  const startTime = new Date(date1).getTime();
95
58
  const endTime = new Date(date2).getTime();
@@ -16,7 +16,6 @@ const _sfc_main = create({
16
16
  shape: {
17
17
  type: String,
18
18
  default: "round"
19
- // button
20
19
  },
21
20
  label: {
22
21
  type: [String, Number, Boolean],
@@ -10,7 +10,6 @@ const _sfc_main = create({
10
10
  direction: {
11
11
  type: String,
12
12
  default: "vertical"
13
- //horizontal
14
13
  },
15
14
  textPosition: {
16
15
  type: String,
@@ -132,7 +132,7 @@
132
132
  .nut-address__detail-list {
133
133
  padding-top: 15px;
134
134
  height: 270px;
135
- overflow-y: auto;
135
+ // overflow-y: auto;
136
136
  box-sizing: border-box;
137
137
  padding: 0;
138
138
  .nut-address__detail-item {
@@ -110,9 +110,11 @@ textarea {
110
110
  }
111
111
  &-clear-box {
112
112
  height: 100%;
113
- .nut-input-clear {
114
- vertical-align: -2px;
115
- }
113
+ display: flex;
114
+ align-items: center;
115
+ // .nut-input-clear {
116
+ // vertical-align: -2px;
117
+ // }
116
118
  }
117
119
  &-clear {
118
120
  width: 16px;
@@ -1,23 +1,23 @@
1
1
  .nut-list {
2
2
  width: 100%;
3
- overflow: scroll;
4
3
  position: relative;
4
+ overflow-x: hidden;
5
+ overflow-y: auto;
5
6
  -webkit-overflow-scrolling: touch;
7
+
6
8
  &-phantom {
7
- position: absolute;
8
- left: 0;
9
- top: 0;
10
- right: 0;
9
+ position: relative;
11
10
  z-index: -1;
12
11
  }
12
+
13
13
  &-container {
14
+ position: absolute;
15
+ top: 0;
14
16
  left: 0;
15
17
  right: 0;
16
- top: 0;
17
- position: absolute;
18
18
  }
19
+
19
20
  &-item {
20
21
  overflow: hidden;
21
- margin: $list-item-margin;
22
22
  }
23
23
  }
@@ -39,8 +39,8 @@
39
39
  }
40
40
 
41
41
  .nut-menu__pop {
42
- transition: all 0 ease 0;
43
- transform: none;
42
+ transition: height linear 3s;
43
+ // transform: none;
44
44
  }
45
45
 
46
46
  .nut-menu-item-placeholder-element {
@@ -110,14 +110,20 @@
110
110
  color: $noticebar-color;
111
111
 
112
112
  .nut-noticebar__vertical-list {
113
+ width: 100%;
113
114
  margin: 0;
114
115
  padding: 0;
115
116
  display: block;
116
117
  flex: 1;
118
+ overflow: hidden;
117
119
  .nut-noticebar__vertical-item {
118
- display: flex;
119
- align-items: center;
120
+ // display: flex;
121
+ // align-items: center;
120
122
  height: $noticebar-across-height;
123
+ width: 100%;
124
+ text-overflow: ellipsis;
125
+ white-space: nowrap;
126
+ overflow: hidden;
121
127
  }
122
128
  }
123
129
 
@@ -2,14 +2,30 @@
2
2
  .nut-short-password-title {
3
3
  color: $dark-color;
4
4
  }
5
+
5
6
  .nut-short-password-wrapper {
6
7
  .nut-short-password__list {
7
8
  border: none;
8
9
  background: $dark-background3;
10
+
9
11
  .nut-short-password__item {
12
+ position: relative;
10
13
  .nut-short-password__item-icon {
11
14
  background: $dark-color;
12
15
  }
16
+
17
+ &::after {
18
+ position: absolute;
19
+ box-sizing: border-box;
20
+ content: ' ';
21
+ pointer-events: none;
22
+ top: -50%;
23
+ right: -50%;
24
+ bottom: -50%;
25
+ left: -50%;
26
+ outline: 1px solid #3a3a3c;
27
+ transform: scale(0.5);
28
+ }
13
29
  }
14
30
  }
15
31
  }
@@ -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.1",
5
+ "version": "4.0.2",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "tags": [
@@ -3074,6 +3074,15 @@
3074
3074
  "kind": "expression"
3075
3075
  }
3076
3076
  },
3077
+ {
3078
+ "name": "showClearIcon ",
3079
+ "default": "`false`",
3080
+ "description": "是否在失去焦点后,继续展示清除按钮,在设置 `clearable` 时生效",
3081
+ "value": {
3082
+ "type": "boolean",
3083
+ "kind": "expression"
3084
+ }
3085
+ },
3077
3086
  {
3078
3087
  "name": "clear-size",
3079
3088
  "default": "`14`",
@@ -3311,8 +3320,8 @@
3311
3320
  "attributes": [
3312
3321
  {
3313
3322
  "name": "height",
3314
- "default": "`50`",
3315
- "description": "列表项的高度",
3323
+ "default": "`80`",
3324
+ "description": "列表项的高度/预估高度,支持不固定高度",
3316
3325
  "value": {
3317
3326
  "type": "number",
3318
3327
  "kind": "expression"
@@ -3335,6 +3344,24 @@
3335
3344
  "type": "number",
3336
3345
  "kind": "expression"
3337
3346
  }
3347
+ },
3348
+ {
3349
+ "name": "buffer-size",
3350
+ "default": "`5`",
3351
+ "description": "数据缓冲区长度",
3352
+ "value": {
3353
+ "type": "number",
3354
+ "kind": "expression"
3355
+ }
3356
+ },
3357
+ {
3358
+ "name": "margin",
3359
+ "default": "`10`",
3360
+ "description": "列表之间的间隙,和自定义样式保持一致",
3361
+ "value": {
3362
+ "type": "number",
3363
+ "kind": "expression"
3364
+ }
3338
3365
  }
3339
3366
  ]
3340
3367
  },
@@ -3592,21 +3619,30 @@
3592
3619
  {
3593
3620
  "name": "type",
3594
3621
  "default": "`danger`",
3595
- "description": "提示的信息类型,可选值为`primary` `success` `danger` `warning`",
3622
+ "description": "提示的信息类型,可选值为`primary`、`success`、`danger`、`warning`",
3596
3623
  "value": {
3597
3624
  "type": "string",
3598
3625
  "kind": "expression"
3599
3626
  }
3600
3627
  },
3601
3628
  {
3602
- "name": "message",
3629
+ "name": "visible",
3603
3630
  "default": "`false`",
3604
- "description": "展示文案,支持通过\\n换行",
3631
+ "description": "显示与否",
3605
3632
  "value": {
3606
3633
  "type": "boolean",
3607
3634
  "kind": "expression"
3608
3635
  }
3609
3636
  },
3637
+ {
3638
+ "name": "msg",
3639
+ "default": "`''`",
3640
+ "description": "展示文案,支持通过`\\n`换行",
3641
+ "value": {
3642
+ "type": "string",
3643
+ "kind": "expression"
3644
+ }
3645
+ },
3610
3646
  {
3611
3647
  "name": "duration",
3612
3648
  "default": "`3000`",
@@ -3628,7 +3664,7 @@
3628
3664
  {
3629
3665
  "name": "background",
3630
3666
  "default": "`''`",
3631
- "description": "背景颜色",
3667
+ "description": "背景样式",
3632
3668
  "value": {
3633
3669
  "type": "string",
3634
3670
  "kind": "expression"