vdesign-ui 0.2.16 → 0.2.17
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.
- package/dist/components/actionbar-cell/index.js +1 -1
- package/dist/components/actionbar-cell/index.vue +4 -0
- package/dist/components/actionbar-cell/style.less +0 -0
- package/dist/components/activityviews/index.vue +1 -1
- package/dist/components/activityviews/style.less +10 -0
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/checkbox-group/index.vue +4 -0
- package/dist/components/checkbox-group/style.less +0 -0
- package/dist/components/dialog/index.vue +1 -1
- package/dist/components/dialog/style.less +1 -1
- package/dist/components/footer/style.less +1 -1
- package/dist/components/form/index.vue +3 -1
- package/dist/components/form/style.less +0 -0
- package/dist/components/input/style.less +2 -1
- package/dist/components/overlay/style.less +2 -1
- package/dist/components/password/index.vue +4 -0
- package/dist/components/password/style.less +0 -0
- package/dist/components/popup/index.js +1 -1
- package/dist/components/popup/index.vue +2 -80
- package/dist/components/popup/style.less +79 -0
- package/dist/components/radio-group/index.js +1 -0
- package/dist/components/radio-group/index.vue +4 -0
- package/dist/components/radio-group/style.less +0 -0
- package/dist/components/search/index.vue +4 -0
- package/dist/components/search/style.less +0 -0
- package/dist/components/stepper/index.vue +4 -0
- package/dist/components/stepper/style.less +0 -0
- package/dist/components/tab/index.js +1 -1
- package/dist/components/tab/index.vue +4 -2
- package/dist/components/tab/style.less +0 -0
- package/dist/components/tabs/index.vue +23 -1
- package/dist/components/tabs/style.less +54 -3
- package/dist/components/title/style.less +1 -1
- package/dist/components/toast/style.less +1 -1
- package/dist/token.css +754 -715
- package/dist/vdesign-ui.common.js +338 -161
- package/dist/vdesign-ui.css +1 -1
- package/dist/vdesign-ui.umd.js +338 -161
- package/dist/vdesign-ui.umd.min.js +2 -2
- package/package.json +2 -2
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<div class="vd-
|
|
3
|
+
<div class="vd-activity-views__overlay" v-if="overlay && visible" @click="handleOverlayClick"></div>
|
|
4
4
|
<transition name="vd-activity-views-slide-up">
|
|
5
5
|
<div :class="['vd-activity-views',{'vd-activity-views--safe-area-inset-bottom':safeAreaInsetBottom}]" :style="transitionStyle" v-if="visible">
|
|
6
6
|
<div class="vd-activity-views__header" v-if="withHeader">
|
|
@@ -149,4 +149,14 @@
|
|
|
149
149
|
.vd-activity-views-slide-up-enter,
|
|
150
150
|
.vd-activity-views-slide-up-leave-to {
|
|
151
151
|
transform: translateY(100%);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.vd-activity-views__overlay{
|
|
155
|
+
position: fixed;
|
|
156
|
+
top: 0;
|
|
157
|
+
left: 0;
|
|
158
|
+
width: 100%;
|
|
159
|
+
height: 100%;
|
|
160
|
+
z-index: 2001;
|
|
161
|
+
background-color: var(--color-activityviews-mask-bg);
|
|
152
162
|
}
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="vd-dialog-wrap">
|
|
3
|
-
<div class="vd-
|
|
3
|
+
<div class="vd-dialog__overlay" v-if="visible && isOverlayVisible && overlay" :style="{ zIndex: overlayZIndex }"
|
|
4
4
|
@click="handleOverlayClick"></div>
|
|
5
5
|
<transition name="vd-dialog-fade">
|
|
6
6
|
<div class="vd-dialog" v-if="visible" :class="computedClassName" :style="{width : width, zIndex: overlayZIndex + 1}">
|
|
File without changes
|
|
@@ -237,6 +237,7 @@
|
|
|
237
237
|
height: var(--height-input-search_content);
|
|
238
238
|
padding-inline-start: var(--spacing-input-search_textarea-padding_y);
|
|
239
239
|
padding-inline-end: var(--spacing-input-search_textarea-padding_y);
|
|
240
|
+
background-color: var(--color-input-trade-bg);
|
|
240
241
|
|
|
241
242
|
.@{input-prefix-cls} {
|
|
242
243
|
&-search {
|
|
@@ -250,7 +251,7 @@
|
|
|
250
251
|
flex: 1;
|
|
251
252
|
display: flex;
|
|
252
253
|
align-items: center;
|
|
253
|
-
background-color:
|
|
254
|
+
background-color: var(--color-input-trade-bg);
|
|
254
255
|
padding-inline-start: var(--spacing-input-textarea-padding_y);
|
|
255
256
|
padding-inline-end: var(--spacing-input-textarea-padding_y);
|
|
256
257
|
border-radius: var(--radius-input-bg);
|
|
File without changes
|
|
@@ -160,84 +160,6 @@ export default {
|
|
|
160
160
|
};
|
|
161
161
|
</script>
|
|
162
162
|
|
|
163
|
-
<style
|
|
164
|
-
.
|
|
165
|
-
position: fixed;
|
|
166
|
-
top: 0;
|
|
167
|
-
left: 0;
|
|
168
|
-
width: 100%;
|
|
169
|
-
height: 100%;
|
|
170
|
-
z-index: 999;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.popup {
|
|
174
|
-
position: fixed;
|
|
175
|
-
z-index: 1000;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.popup-center {
|
|
179
|
-
top: 50%;
|
|
180
|
-
left: 50%;
|
|
181
|
-
transform: translate(-50%, -50%);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.popup-top {
|
|
185
|
-
top: 0;
|
|
186
|
-
left: 0;
|
|
187
|
-
width: 100%;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.popup-bottom {
|
|
191
|
-
bottom: 0;
|
|
192
|
-
left: 0;
|
|
193
|
-
width: 100%;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.popup-left {
|
|
197
|
-
top: 0;
|
|
198
|
-
left: 0;
|
|
199
|
-
height: 100%;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.popup-right {
|
|
203
|
-
top: 0;
|
|
204
|
-
right: 0;
|
|
205
|
-
height: 100%;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/* 过渡效果 */
|
|
209
|
-
.popup-slide-center-enter-active,
|
|
210
|
-
.popup-slide-center-leave-active,
|
|
211
|
-
.popup-slide-top-enter-active,
|
|
212
|
-
.popup-slide-top-leave-active,
|
|
213
|
-
.popup-slide-bottom-enter-active,
|
|
214
|
-
.popup-slide-bottom-leave-active,
|
|
215
|
-
.popup-slide-left-enter-active,
|
|
216
|
-
.popup-slide-left-leave-active,
|
|
217
|
-
.popup-slide-right-enter-active,
|
|
218
|
-
.popup-slide-right-leave-active {
|
|
219
|
-
transition-property: all;
|
|
220
|
-
transition-timing-function: ease;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.popup-slide-top-enter,
|
|
224
|
-
.popup-slide-top-leave-to {
|
|
225
|
-
transform: translateY(-100%);
|
|
226
|
-
}
|
|
227
|
-
.popup-slide-bottom-enter,
|
|
228
|
-
.popup-slide-bottom-leave-to {
|
|
229
|
-
transform: translateY(100%);
|
|
230
|
-
}
|
|
231
|
-
.popup-slide-left-enter,
|
|
232
|
-
.popup-slide-left-leave-to {
|
|
233
|
-
transform: translateX(-100%);
|
|
234
|
-
}
|
|
235
|
-
.popup-slide-right-enter,
|
|
236
|
-
.popup-slide-right-leave-to {
|
|
237
|
-
transform: translateX(100%);
|
|
238
|
-
}
|
|
239
|
-
.popup-slide-center-enter,
|
|
240
|
-
.popup-slide-center-leave-to {
|
|
241
|
-
opacity: 0;
|
|
242
|
-
}
|
|
163
|
+
<style lang="less">
|
|
164
|
+
@import './style.less';
|
|
243
165
|
</style>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
.popup-overlay {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
z-index: 999;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.popup {
|
|
11
|
+
position: fixed;
|
|
12
|
+
z-index: 1000;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.popup-center {
|
|
16
|
+
top: 50%;
|
|
17
|
+
left: 50%;
|
|
18
|
+
transform: translate(-50%, -50%);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.popup-top {
|
|
22
|
+
top: 0;
|
|
23
|
+
left: 0;
|
|
24
|
+
width: 100%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.popup-bottom {
|
|
28
|
+
bottom: 0;
|
|
29
|
+
left: 0;
|
|
30
|
+
width: 100%;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.popup-left {
|
|
34
|
+
top: 0;
|
|
35
|
+
left: 0;
|
|
36
|
+
height: 100%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.popup-right {
|
|
40
|
+
top: 0;
|
|
41
|
+
right: 0;
|
|
42
|
+
height: 100%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* 过渡效果 */
|
|
46
|
+
.popup-slide-center-enter-active,
|
|
47
|
+
.popup-slide-center-leave-active,
|
|
48
|
+
.popup-slide-top-enter-active,
|
|
49
|
+
.popup-slide-top-leave-active,
|
|
50
|
+
.popup-slide-bottom-enter-active,
|
|
51
|
+
.popup-slide-bottom-leave-active,
|
|
52
|
+
.popup-slide-left-enter-active,
|
|
53
|
+
.popup-slide-left-leave-active,
|
|
54
|
+
.popup-slide-right-enter-active,
|
|
55
|
+
.popup-slide-right-leave-active {
|
|
56
|
+
transition-property: all;
|
|
57
|
+
transition-timing-function: ease;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.popup-slide-top-enter,
|
|
61
|
+
.popup-slide-top-leave-to {
|
|
62
|
+
transform: translateY(-100%);
|
|
63
|
+
}
|
|
64
|
+
.popup-slide-bottom-enter,
|
|
65
|
+
.popup-slide-bottom-leave-to {
|
|
66
|
+
transform: translateY(100%);
|
|
67
|
+
}
|
|
68
|
+
.popup-slide-left-enter,
|
|
69
|
+
.popup-slide-left-leave-to {
|
|
70
|
+
transform: translateX(-100%);
|
|
71
|
+
}
|
|
72
|
+
.popup-slide-right-enter,
|
|
73
|
+
.popup-slide-right-leave-to {
|
|
74
|
+
transform: translateX(100%);
|
|
75
|
+
}
|
|
76
|
+
.popup-slide-center-enter,
|
|
77
|
+
.popup-slide-center-leave-to {
|
|
78
|
+
opacity: 0;
|
|
79
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -74,6 +74,7 @@ export default {
|
|
|
74
74
|
return {
|
|
75
75
|
tabs: [],
|
|
76
76
|
currentName: this.value !== undefined ? this.value : 0, // 默认为 0
|
|
77
|
+
firstTabOut: false, // 第一个标签是否超出
|
|
77
78
|
};
|
|
78
79
|
},
|
|
79
80
|
watch: {
|
|
@@ -129,6 +130,7 @@ export default {
|
|
|
129
130
|
[`${prefixCls}__menu`]: this.menu,
|
|
130
131
|
[`${prefixCls}__wrap--bg`]: this.backgroundColor,
|
|
131
132
|
"vd-hairline--bottom": this.divider,
|
|
133
|
+
"vd-tabs__scroll": this.firstTabOut, // 当第一个标签超出时,添加滚动类名
|
|
132
134
|
};
|
|
133
135
|
},
|
|
134
136
|
// 计算标签下方线条的类名
|
|
@@ -262,7 +264,19 @@ export default {
|
|
|
262
264
|
left: scrollLeft,
|
|
263
265
|
behavior: 'smooth'
|
|
264
266
|
});
|
|
265
|
-
}, 0);
|
|
267
|
+
}, 0);
|
|
268
|
+
},
|
|
269
|
+
checkFirstTabOverflow() {
|
|
270
|
+
const nav = this.$refs.nav;
|
|
271
|
+
if (nav) {
|
|
272
|
+
if (this.language === 'ar') {
|
|
273
|
+
// 在 RTL 模式下,scrollLeft 可能为负,判断是否滚出视口可以检测 scrollLeft 是否小于 0
|
|
274
|
+
this.firstTabOut = nav.scrollLeft < 0;
|
|
275
|
+
} else {
|
|
276
|
+
// LTR 模式下,滚出视口时 scrollLeft 大于 0
|
|
277
|
+
this.firstTabOut = nav.scrollLeft > 0;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
266
280
|
},
|
|
267
281
|
renderTitle(titleEl, tab) {
|
|
268
282
|
this.$nextTick(() => {
|
|
@@ -309,8 +323,16 @@ export default {
|
|
|
309
323
|
// 初始加载时,滚动到当前激活的标签
|
|
310
324
|
this.$nextTick(() => {
|
|
311
325
|
this.scrollToActiveTab();
|
|
326
|
+
if (this.$refs.nav) {
|
|
327
|
+
this.$refs.nav.addEventListener('scroll', this.checkFirstTabOverflow);
|
|
328
|
+
}
|
|
312
329
|
});
|
|
313
330
|
},
|
|
331
|
+
beforeDestroy() {
|
|
332
|
+
if (this.$refs.nav) {
|
|
333
|
+
this.$refs.nav.removeEventListener('scroll', this.checkFirstTabOverflow);
|
|
334
|
+
}
|
|
335
|
+
},
|
|
314
336
|
};
|
|
315
337
|
</script>
|
|
316
338
|
<style lang="less">
|
|
@@ -312,6 +312,29 @@
|
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
+
&__scroll {
|
|
316
|
+
&::before {
|
|
317
|
+
content: '';
|
|
318
|
+
position: absolute;
|
|
319
|
+
z-index: 1;
|
|
320
|
+
top: 0;
|
|
321
|
+
left: 0;
|
|
322
|
+
width: 20px;
|
|
323
|
+
height: 48px;
|
|
324
|
+
background-color: var(--bg-color-1);
|
|
325
|
+
}
|
|
326
|
+
&::after {
|
|
327
|
+
content: '';
|
|
328
|
+
box-shadow: 4px 0 6px rgba(0, 0, 0, 0.05);
|
|
329
|
+
position: absolute;
|
|
330
|
+
top: 50%;
|
|
331
|
+
transform: translateY(-50%);
|
|
332
|
+
left: 0;
|
|
333
|
+
width: 20px;
|
|
334
|
+
height: 30px;
|
|
335
|
+
background-color: transparent;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
315
338
|
|
|
316
339
|
&__menu {
|
|
317
340
|
display: flex;
|
|
@@ -353,7 +376,6 @@
|
|
|
353
376
|
overflow-y: hidden;
|
|
354
377
|
-webkit-overflow-scrolling: touch;
|
|
355
378
|
padding-inline-end: var(--spacing-tab-primary_icon-margin_right);
|
|
356
|
-
|
|
357
379
|
&::-webkit-scrollbar {
|
|
358
380
|
display: none;
|
|
359
381
|
}
|
|
@@ -403,6 +425,35 @@
|
|
|
403
425
|
|
|
404
426
|
|
|
405
427
|
|
|
406
|
-
[lang='ar']
|
|
407
|
-
|
|
428
|
+
[lang='ar'] {
|
|
429
|
+
.@{tabs-prefix-cls}__scroll {
|
|
430
|
+
&::before {
|
|
431
|
+
right: 0;
|
|
432
|
+
left: auto;
|
|
433
|
+
}
|
|
434
|
+
&::after {
|
|
435
|
+
right: 0;
|
|
436
|
+
left: auto;
|
|
437
|
+
box-shadow: -4px 0 6px rgba(0, 0, 0, 0.05);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
.@{tabs-prefix-cls}__menu--right::before {
|
|
441
|
+
transform: scaleX(-1);
|
|
442
|
+
}
|
|
408
443
|
}
|
|
444
|
+
|
|
445
|
+
[theme='dark'] {
|
|
446
|
+
.@{tabs-prefix-cls}__scroll {
|
|
447
|
+
&::after {
|
|
448
|
+
box-shadow: 4px 0 6px rgba(0, 0, 0, 0.35);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
[theme='dark'][lang='ar']{
|
|
454
|
+
.@{tabs-prefix-cls}__scroll {
|
|
455
|
+
&::after {
|
|
456
|
+
box-shadow: -4px 0 6px rgba(0, 0, 0, 0.35);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
justify-content: space-between;
|
|
8
8
|
padding-inline-start: var(--spacing-title-padding_left);
|
|
9
9
|
padding-inline-end: var(--spacing-title-padding_right);
|
|
10
|
-
background-color: var(--bg-color-1);
|
|
10
|
+
// background-color: var(--bg-color-1);
|
|
11
11
|
|
|
12
12
|
&--sticky {
|
|
13
13
|
position: sticky;
|