@nutui/nutui 4.2.3 → 4.2.5

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 (84) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +5566 -5532
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/address/Address.js +0 -1
  6. package/dist/packages/calendar/Calendar.js +3 -4
  7. package/dist/packages/calendaritem/CalendarItem.js +1 -2
  8. package/dist/packages/cascader/Cascader.js +3 -3
  9. package/dist/packages/cascader/index.css +1 -1
  10. package/dist/packages/checkbox/Checkbox.js +148 -152
  11. package/dist/packages/checkboxgroup/CheckboxGroup.js +2 -3
  12. package/dist/packages/divider/Divider.js +2 -2
  13. package/dist/packages/elevator/Elevator.js +5 -6
  14. package/dist/packages/form/Form.js +9 -2
  15. package/dist/packages/formitem/FormItem.js +30 -3
  16. package/dist/packages/formitem/index.css +1 -1
  17. package/dist/packages/formitem/index.scss +25 -0
  18. package/dist/packages/imagepreview/ImagePreview.js +0 -1
  19. package/dist/packages/{index-cDNmNOtI.js → index-NLe0VBkN.js} +2 -3
  20. package/dist/packages/{index.vue_vue_type_script_lang-Lc2BXA17.js → index.vue_vue_type_script_lang-54PRh3YM.js} +0 -1
  21. package/dist/packages/{index.vue_vue_type_script_lang-KuoPcQZs.js → index.vue_vue_type_script_lang-MJYVRFbp.js} +10 -6
  22. package/dist/packages/inputnumber/InputNumber.js +1 -1
  23. package/dist/packages/invoice/Invoice.js +2 -2
  24. package/dist/packages/invoice/index.css +1 -1
  25. package/dist/packages/navbar/index.css +1 -1
  26. package/dist/packages/navbar/index.scss +5 -16
  27. package/dist/packages/popover/Popover.js +3 -2
  28. package/dist/packages/radio/Radio.js +1 -1
  29. package/dist/packages/radio/index.css +1 -1
  30. package/dist/packages/radio/index.scss +21 -0
  31. package/dist/packages/radiogroup/RadioGroup.js +1 -1
  32. package/dist/packages/radiogroup/index.scss +0 -5
  33. package/dist/packages/range/Range.js +0 -2
  34. package/dist/packages/swiper/Swiper.js +2 -3
  35. package/dist/packages/swiperitem/SwiperItem.js +7 -2
  36. package/dist/packages/tabs/Tabs.js +4 -6
  37. package/dist/packages/tabs/index.css +1 -1
  38. package/dist/packages/tabs/index.scss +116 -115
  39. package/dist/packages/textarea/index.css +1 -1
  40. package/dist/packages/textarea/index.scss +1 -0
  41. package/dist/packages/watermark/Watermark.js +8 -2
  42. package/dist/smartips/web-types.json +32 -5
  43. package/dist/style.css +1 -1
  44. package/dist/types/__VUE/address/index.vue.d.ts +3 -3
  45. package/dist/types/__VUE/avatargroup/index.vue.d.ts +1 -1
  46. package/dist/types/__VUE/cell/index.vue.d.ts +1 -1
  47. package/dist/types/__VUE/checkbox/index.vue.d.ts +72 -1
  48. package/dist/types/__VUE/collapse/index.vue.d.ts +3 -28
  49. package/dist/types/__VUE/collapseitem/index.vue.d.ts +1 -1
  50. package/dist/types/__VUE/countup/index.vue.d.ts +2 -2
  51. package/dist/types/__VUE/divider/index.vue.d.ts +15 -1
  52. package/dist/types/__VUE/drag/index.vue.d.ts +5 -3
  53. package/dist/types/__VUE/drag/types.d.ts +1 -0
  54. package/dist/types/__VUE/form/common.d.ts +9 -1
  55. package/dist/types/__VUE/form/index.vue.d.ts +18 -0
  56. package/dist/types/__VUE/form/types.d.ts +3 -1
  57. package/dist/types/__VUE/formitem/index.vue.d.ts +21 -1
  58. package/dist/types/__VUE/formitem/types.d.ts +2 -0
  59. package/dist/types/__VUE/image/index.vue.d.ts +1 -1
  60. package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
  61. package/dist/types/__VUE/pagination/index.vue.d.ts +6 -4
  62. package/dist/types/__VUE/pagination/types.d.ts +1 -0
  63. package/dist/types/__VUE/radio/index.vue.d.ts +14 -3
  64. package/dist/types/__VUE/radio/types.d.ts +4 -0
  65. package/dist/types/__VUE/radiogroup/index.vue.d.ts +8 -6
  66. package/dist/types/__VUE/searchbar/index.vue.d.ts +8 -7
  67. package/dist/types/__VUE/searchbar/types.d.ts +3 -0
  68. package/dist/types/__VUE/sku/components/SkuStepper.vue.d.ts +1 -1
  69. package/dist/types/__VUE/sku/index.vue.d.ts +1 -1
  70. package/dist/types/__VUE/steps/index.vue.d.ts +5 -3
  71. package/dist/types/__VUE/steps/types.d.ts +1 -0
  72. package/dist/types/__VUE/table/types.d.ts +2 -2
  73. package/dist/types/__VUE/tabs/index.vue.d.ts +11 -11
  74. package/dist/types/__VUE/tabs/types.d.ts +3 -0
  75. package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
  76. package/dist/types/__VUE/uploader/index.vue.d.ts +2 -28
  77. package/dist/types/__VUE/watermark/index.vue.d.ts +29 -3
  78. package/dist/types/index.d.ts +1 -1
  79. package/package.json +1 -1
  80. package/dist/packages/index-nRNEaTqA.js +0 -10
  81. package/dist/types/__VUE/checkbox/common.d.ts +0 -2
  82. package/dist/types/__VUE/picker/common.d.ts +0 -406
  83. package/dist/types/__VUE/searchbar/type.d.ts +0 -1
  84. package/dist/types/__VUE/table/common.d.ts +0 -125
@@ -25,44 +25,123 @@
25
25
  .nut-tabs {
26
26
  display: flex;
27
27
  overflow: hidden;
28
+ .nut-tabs__titles {
29
+ display: flex;
30
+ user-select: none;
31
+ white-space: nowrap;
32
+ flex-shrink: 0;
33
+ background: $tabs-titles-background-color;
34
+ border-radius: $tabs-titles-border-radius;
35
+ .nut-tabs__list {
36
+ width: 100%;
37
+ display: flex;
38
+ flex-shrink: 0;
39
+ }
40
+ .nut-tabs__titles-item {
41
+ position: relative;
42
+ font-size: $tabs-titles-item-font-size;
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ color: $tabs-titles-item-color;
47
+ &__text {
48
+ &.ellipsis {
49
+ @include oneline-ellipsis();
50
+ }
51
+ text-align: center;
52
+ }
53
+ &__smile {
54
+ .nut-icon {
55
+ position: absolute;
56
+ font-size: 12px;
57
+ width: 100%;
58
+ height: 100%;
59
+ color: $tabs-tab-smile-color;
60
+ }
61
+ }
62
+ &__smile,
63
+ &__line {
64
+ position: absolute;
65
+ transition: width 0.3s ease;
66
+ width: 0;
67
+ height: 0;
68
+ content: ' ';
69
+ bottom: 15%;
70
+ left: 50%;
71
+ transform: translate(-50%, 0);
72
+ overflow: hidden;
73
+ border-radius: $tabs-titles-item-line-border-radius;
74
+ opacity: $tabs-titles-item-line-opacity;
75
+ }
76
+ &.active {
77
+ font-weight: bold;
78
+ color: $tabs-titles-item-active-color;
79
+ .nut-tabs__titles-item__line {
80
+ content: ' ';
81
+ width: $tabs-horizontal-titles-item-active-line-width;
82
+ height: 3px;
83
+ background: $tabs-horizontal-tab-line-color;
84
+ }
85
+ }
86
+ &.disabled {
87
+ color: $disable-color;
88
+ }
89
+ }
90
+ }
28
91
  &.horizontal {
29
92
  flex-direction: column;
93
+ .nut-sticky__box > .nut-tabs__titles,
94
+ > .nut-tabs__titles {
95
+ flex-direction: row;
96
+ height: $tabs-horizontal-titles-height;
97
+ .nut-tabs__list {
98
+ height: 100%;
99
+ }
100
+ &.scrollable {
101
+ overflow-x: auto;
102
+ overflow-y: hidden;
103
+ }
104
+ .nut-tabs__titles-item {
105
+ flex: 1 0 auto;
106
+ min-width: $tabs-horizontal-titles-item-min-width;
107
+ width: 0;
108
+
109
+ &__smile {
110
+ .nut-icon {
111
+ position: absolute;
112
+ font-size: 12px;
113
+ width: 100%;
114
+ height: 100%;
115
+ color: $tabs-tab-smile-color;
116
+ }
117
+ }
118
+ }
119
+ }
30
120
  }
31
121
  &.vertical {
32
122
  flex-direction: row;
33
123
  width: 100%;
34
- .nut-tabs__titles {
124
+ > .nut-tabs__titles {
35
125
  flex-direction: column;
36
- height: 100%;
37
- padding: 10px 0 !important;
126
+ height: auto;
127
+ padding: 10px 0;
38
128
  width: $tabs-vertical-titles-width;
39
- flex-shrink: 0;
40
129
  .nut-tabs__list {
41
- width: 100%;
42
- display: flex;
43
130
  flex-direction: column;
44
- flex-shrink: 0;
45
131
  }
46
132
  &.scrollable {
47
133
  overflow-x: hidden;
48
134
  overflow-y: auto;
49
- .nut-tabs__titles-item {
50
- padding: 0 10px 0 15px;
51
- }
52
- }
53
- &.scroll-vertical {
54
- overflow-y: scroll;
55
135
  height: auto;
56
136
  .nut-tabs__titles-placeholder {
57
137
  height: 22px;
58
138
  }
59
139
  }
60
- &-item {
140
+ .nut-tabs__titles-item {
141
+ min-width: $tabs-horizontal-titles-item-min-width;
142
+ width: 100%;
61
143
  height: $tabs-vertical-titles-item-height;
62
144
  flex: none;
63
- &__smile {
64
- transition: width 0.3s ease;
65
- }
66
145
  &__line {
67
146
  bottom: none;
68
147
  transform: translate(0, -50%);
@@ -72,7 +151,6 @@
72
151
  }
73
152
  &.active {
74
153
  background-color: #fff;
75
-
76
154
  .nut-tabs__titles-item__line {
77
155
  left: 10px;
78
156
  width: 3px;
@@ -80,10 +158,11 @@
80
158
  height: $tabs-vertical-titles-item-active-line-height;
81
159
  }
82
160
  .nut-tabs__titles-item__smile {
161
+ position: absolute;
83
162
  right: -8px;
84
163
  bottom: 2px;
85
164
  left: auto;
86
- width: 3px;
165
+ width: 36px;
87
166
  transform: rotate(320deg);
88
167
  height: $tabs-vertical-titles-item-active-line-height;
89
168
  }
@@ -100,33 +179,14 @@
100
179
  }
101
180
 
102
181
  &__titles {
103
- height: $tabs-horizontal-titles-height;
104
- // padding: 0 10px;
105
- display: flex;
106
- user-select: none;
107
- background: $tabs-titles-background-color;
108
- border-radius: $tabs-titles-border-radius;
109
- flex-shrink: 0;
110
- .nut-tabs__list {
111
- width: 100%;
112
- height: $tabs-horizontal-titles-height;
113
- display: flex;
114
- flex-shrink: 0;
115
- }
116
- &.large {
117
- .nut-tabs__titles-item {
118
- font-size: $tabs-titles-item-large-font-size;
119
- }
182
+ &.large .nut-tabs__titles-item {
183
+ font-size: $tabs-titles-item-large-font-size;
120
184
  }
121
- &.normal {
122
- .nut-tabs__titles-item {
123
- font-size: $tabs-titles-item-font-size;
124
- }
185
+ &.normal .nut-tabs__titles-item {
186
+ font-size: $tabs-titles-item-font-size;
125
187
  }
126
- &.small {
127
- .nut-tabs__titles-item {
128
- font-size: $tabs-titles-item-small-font-size;
129
- }
188
+ &.small .nut-tabs__titles-item {
189
+ font-size: $tabs-titles-item-small-font-size;
130
190
  }
131
191
  &::-webkit-scrollbar {
132
192
  display: none;
@@ -136,92 +196,33 @@
136
196
 
137
197
  &.smile {
138
198
  .nut-tabs__titles-item {
199
+ .nut-tabs__titles-item__smile {
200
+ display: none;
201
+ }
139
202
  &.active {
140
203
  .nut-tabs__titles-item__smile {
141
204
  width: 36px;
142
205
  height: 10px;
206
+ display: block;
143
207
  }
144
208
  }
145
209
  }
146
210
  }
147
- &.scrollable {
148
- overflow-x: auto;
149
- overflow-y: hidden;
150
- .nut-tabs__titles-item {
151
- width: auto;
152
- }
153
- }
154
- &-item {
155
- position: relative;
156
- font-size: $tabs-titles-item-font-size;
157
- flex: 1 0 auto;
158
- min-width: $tabs-horizontal-titles-item-min-width;
159
- width: 0;
160
- display: flex;
161
- align-items: center;
162
- justify-content: center;
163
- color: $tabs-titles-item-color;
164
- &__text {
165
- &.ellipsis {
166
- @include oneline-ellipsis();
167
- }
168
- text-align: center;
169
- }
170
- &__smile,
171
- &__line {
172
- position: absolute;
173
- transition: width 0.3s ease;
174
- width: 0;
175
- height: 0;
176
- content: ' ';
177
- bottom: 15%;
178
- left: 50%;
179
- transform: translate(-50%, 0);
180
- overflow: hidden;
181
- border-radius: $tabs-titles-item-line-border-radius;
182
- opacity: $tabs-titles-item-line-opacity;
183
- }
184
-
185
- &__smile {
186
- .nut-icon {
187
- position: absolute;
188
- font-size: 12px;
189
- width: 100%;
190
- height: 100%;
191
- color: $tabs-tab-smile-color;
192
- }
193
- }
194
-
195
- &.disabled {
196
- color: $disable-color;
197
- }
198
- &.active {
199
- font-weight: bold;
200
- color: $tabs-titles-item-active-color;
201
- .nut-tabs__titles-item__line {
202
- content: ' ';
203
- width: $tabs-horizontal-titles-item-active-line-width;
204
- height: 3px;
205
- background: $tabs-horizontal-tab-line-color;
206
- }
207
- }
208
- }
209
211
  }
210
212
  &__content {
211
213
  display: flex;
212
214
  box-sizing: border-box;
213
215
  }
214
216
  }
215
- .tabs-scrollview {
216
- white-space: nowrap;
217
- }
218
- .nut-tabs__titles-item {
219
- &.nut-tabs__titles-placeholder {
217
+ .nut-tabs {
218
+ .nut-tabs__titles-item {
219
+ .taro {
220
+ height: 46px;
221
+ line-height: 46px;
222
+ }
223
+ }
224
+ .nut-tabs__titles-placeholder {
220
225
  width: auto;
221
226
  min-width: 10px;
222
227
  }
223
- .taro {
224
- height: 46px;
225
- line-height: 46px;
226
- }
227
228
  }
@@ -1 +1 @@
1
- .nut-theme-dark .nut-textarea{background:var(--nut-dark-background, #131313)}.nut-theme-dark .nut-textarea__textarea{color:var(--nut-dark-color, var(--nut-white, #fff))}.nut-textarea{position:relative;width:100%;box-sizing:border-box;display:flex;background:var(--nut-white, #fff);font-size:var(--nut-textarea-font, var(--nut-font-size-2, 14px));padding:10px 25px}.nut-textarea--disabled .nut-textarea__textarea,.nut-textarea--disabled .nut-textarea__limit{cursor:not-allowed;color:var(--nut-textarea-disabled-color, var(--nut-disable-color, #cccccc)) !important}.nut-textarea__limit{position:absolute;right:15px;bottom:12px;font-size:var(--nut-textarea-font, var(--nut-font-size-2, 14px));color:var(--nut-textarea-limit-color, var(--nut-text-color, #808080))}.nut-textarea__textarea{outline:none;display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;font-size:var(--nut-textarea-font, var(--nut-font-size-2, 14px));color:var(--nut-textarea-text-color, var(--nut-title-color, #1a1a1a));text-align:left;background-color:rgba(0,0,0,0);border:none;resize:none;line-height:20px}.nut-textarea__textarea .taro-textarea{font-size:14px}.nut-textarea__textarea__readonly{padding:5px 10px}.nut-textarea__ali{line-height:17px}.nut-textarea .nut-textarea__cpoyText{position:absolute;top:-999999px;left:-999999px;font-size:14px;line-height:1.5;font-family:monospace}
1
+ .nut-theme-dark .nut-textarea{background:var(--nut-dark-background, #131313)}.nut-theme-dark .nut-textarea__textarea{color:var(--nut-dark-color, var(--nut-white, #fff))}.nut-textarea{position:relative;width:100%;box-sizing:border-box;display:flex;background:var(--nut-white, #fff);font-size:var(--nut-textarea-font, var(--nut-font-size-2, 14px));padding:10px 25px}.nut-textarea--disabled .nut-textarea__textarea,.nut-textarea--disabled .nut-textarea__limit{cursor:not-allowed;color:var(--nut-textarea-disabled-color, var(--nut-disable-color, #cccccc)) !important}.nut-textarea__limit{position:absolute;right:15px;bottom:12px;font-size:var(--nut-textarea-font, var(--nut-font-size-2, 14px));color:var(--nut-textarea-limit-color, var(--nut-text-color, #808080))}.nut-textarea__textarea{outline:none;display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;font-size:var(--nut-textarea-font, var(--nut-font-size-2, 14px));color:var(--nut-textarea-text-color, var(--nut-title-color, #1a1a1a));text-align:left;background-color:rgba(0,0,0,0);border:none;resize:none;line-height:20px}.nut-textarea__textarea .taro-textarea{font-size:14px;resize:none}.nut-textarea__textarea__readonly{padding:5px 10px}.nut-textarea__ali{line-height:17px}.nut-textarea .nut-textarea__cpoyText{position:absolute;top:-999999px;left:-999999px;font-size:14px;line-height:1.5;font-family:monospace}
@@ -46,6 +46,7 @@
46
46
  line-height: 20px;
47
47
  .taro-textarea {
48
48
  font-size: 14px;
49
+ resize: none;
49
50
  }
50
51
  }
51
52
  &__textarea__readonly {
@@ -64,7 +64,7 @@ const _sfc_main = create({
64
64
  default: 64
65
65
  },
66
66
  content: {
67
- type: String,
67
+ type: [String, Array],
68
68
  default: ""
69
69
  },
70
70
  fontColor: {
@@ -151,7 +151,13 @@ const _sfc_main = create({
151
151
  const markSize = Number(fontSize) * ratio;
152
152
  ctx.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
153
153
  ctx.fillStyle = fontColor;
154
- ctx.fillText(content, 0, 0);
154
+ if (Array.isArray(content)) {
155
+ content.map((item, index2) => {
156
+ ctx.fillText(item, 0, (index2 - 1) * markSize);
157
+ });
158
+ } else {
159
+ ctx.fillText(content, 0, 0);
160
+ }
155
161
  ctx.restore();
156
162
  state.base64Url = canvas.toDataURL();
157
163
  }
@@ -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.2.3",
5
+ "version": "4.2.5",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "tags": [
@@ -2200,8 +2200,8 @@
2200
2200
  },
2201
2201
  {
2202
2202
  "name": "direction",
2203
- "default": "`'all'`",
2204
- "description": "拖拽元素的拖拽方向限制,**x**/**y**/**all**三选一",
2203
+ "default": "`all`",
2204
+ "description": "拖拽元素的拖拽方向限制,`x`、`y`、`all`",
2205
2205
  "value": {
2206
2206
  "type": "string",
2207
2207
  "kind": "expression"
@@ -2224,7 +2224,7 @@
2224
2224
  "events": [],
2225
2225
  "attributes": [
2226
2226
  {
2227
- "name": "modelValue",
2227
+ "name": "model-value",
2228
2228
  "default": "`0`",
2229
2229
  "description": "购买电子卡所需价钱",
2230
2230
  "value": {
@@ -2581,6 +2581,24 @@
2581
2581
  "type": "{ prop: formitemrule[] }",
2582
2582
  "kind": "expression"
2583
2583
  }
2584
+ },
2585
+ {
2586
+ "name": "label-position",
2587
+ "default": "`left`",
2588
+ "description": "表单项 label 的位置",
2589
+ "value": {
2590
+ "type": "`top` | `left` | `right`",
2591
+ "kind": "expression"
2592
+ }
2593
+ },
2594
+ {
2595
+ "name": "star-position",
2596
+ "default": "`left`",
2597
+ "description": "必填表单项 label 的红色星标位置",
2598
+ "value": {
2599
+ "type": "`left` | `right`",
2600
+ "kind": "expression"
2601
+ }
2584
2602
  }
2585
2603
  ]
2586
2604
  },
@@ -4808,6 +4826,15 @@
4808
4826
  "type": "string",
4809
4827
  "kind": "expression"
4810
4828
  }
4829
+ },
4830
+ {
4831
+ "name": "size",
4832
+ "default": "`normal`",
4833
+ "description": "尺寸,可选值为 `small` `mini` `normal`,仅在 shape 为 `button` 时生效",
4834
+ "value": {
4835
+ "type": "string",
4836
+ "kind": "expression"
4837
+ }
4811
4838
  }
4812
4839
  ]
4813
4840
  },
@@ -7098,7 +7125,7 @@
7098
7125
  "default": "-",
7099
7126
  "description": "水印文字内容",
7100
7127
  "value": {
7101
- "type": "string",
7128
+ "type": "string | string[]",
7102
7129
  "kind": "expression"
7103
7130
  }
7104
7131
  },