vdesign-ui 0.2.20 → 0.3.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.
- package/README.md +58 -58
- package/dist/components/actionbar/index.js +8 -8
- package/dist/components/actionbar/index.vue +39 -39
- package/dist/components/actionbar/style.less +44 -44
- package/dist/components/actionbar-cell/index.js +7 -7
- package/dist/components/actionbar-cell/index.vue +42 -42
- package/dist/components/actions/index.js +6 -6
- package/dist/components/actions/index.vue +77 -77
- package/dist/components/actions/style.less +109 -109
- package/dist/components/actions-cell/index.js +6 -6
- package/dist/components/actions-cell/index.vue +94 -94
- package/dist/components/actions-cell/style.less +38 -38
- package/dist/components/activityviews/index.js +8 -8
- package/dist/components/activityviews/index.vue +192 -192
- package/dist/components/activityviews/style.less +161 -161
- package/dist/components/badge/index.js +8 -8
- package/dist/components/badge/index.vue +49 -49
- package/dist/components/badge/style.less +54 -54
- package/dist/components/button/index.js +8 -8
- package/dist/components/button/index.vue +93 -93
- package/dist/components/button/style.less +558 -558
- package/dist/components/calendar/index-element.vue +84 -84
- package/dist/components/calendar/index.js +7 -7
- package/dist/components/calendar/index.vue +53 -53
- package/dist/components/calendar/style.less +138 -138
- package/dist/components/checkbox/index.js +8 -8
- package/dist/components/checkbox/index.vue +161 -161
- package/dist/components/checkbox/style.less +288 -288
- package/dist/components/checkbox-group/index.js +7 -7
- package/dist/components/checkbox-group/index.vue +73 -73
- package/dist/components/common/state/index.vue +33 -33
- package/dist/components/common/state/style.less +47 -47
- package/dist/components/data-list/index.js +10 -10
- package/dist/components/data-list/index.vue +19 -19
- package/dist/components/data-list/style.less +623 -623
- package/dist/components/datetime-picker/index.js +7 -7
- package/dist/components/datetime-picker/index.vue +39 -39
- package/dist/components/datetime-picker/style.less +23 -23
- package/dist/components/dialog/index.js +8 -8
- package/dist/components/dialog/index.vue +164 -164
- package/dist/components/dialog/overlay-manager.js +18 -18
- package/dist/components/dialog/style.less +138 -138
- package/dist/components/divider/index.js +8 -8
- package/dist/components/divider/index.vue +54 -54
- package/dist/components/divider/style.less +92 -92
- package/dist/components/dropdown/index.js +8 -8
- package/dist/components/dropdown/index.vue +218 -218
- package/dist/components/dropdown/style.less +432 -432
- package/dist/components/empty/index.js +8 -8
- package/dist/components/empty/index.vue +138 -138
- package/dist/components/empty/style.less +60 -60
- package/dist/components/footer/index.js +6 -6
- package/dist/components/footer/index.vue +33 -33
- package/dist/components/footer/style.less +20 -20
- package/dist/components/footnav/index.js +6 -6
- package/dist/components/footnav/index.vue +93 -93
- package/dist/components/footnav/style.less +22 -22
- package/dist/components/footnav-item/index.js +6 -6
- package/dist/components/footnav-item/index.vue +50 -50
- package/dist/components/footnav-item/style.less +39 -39
- package/dist/components/form/index.js +6 -6
- package/dist/components/form/index.vue +14 -14
- package/dist/components/headnav/index.js +6 -6
- package/dist/components/headnav/index.vue +185 -185
- package/dist/components/headnav/style.less +231 -231
- package/dist/components/icon/font/iconfont.css +163 -163
- package/dist/components/icon/font/iconfont.js +5 -5
- package/dist/components/icon/index.js +9 -9
- package/dist/components/icon/index.vue +96 -96
- package/dist/components/icon/style.less +44 -44
- package/dist/components/input/calcTextareaHeight.js +162 -162
- package/dist/components/input/index.js +8 -8
- package/dist/components/input/index.vue +345 -345
- package/dist/components/input/style.less +471 -471
- package/dist/components/list/index.js +8 -8
- package/dist/components/list/index.vue +152 -152
- package/dist/components/list/style.less +213 -213
- package/dist/components/loading/index.js +6 -6
- package/dist/components/loading/index.vue +68 -68
- package/dist/components/loading/style.less +53 -53
- package/dist/components/mixins/clickoutside.js +81 -81
- package/dist/components/mixins/dom.js +41 -41
- package/dist/components/mixins/languageMixin.js +43 -43
- package/dist/components/mixins/outlineConfigPlugin.js +45 -45
- package/dist/components/mixins/router-link.js +22 -22
- package/dist/components/mixins/themeMixin.js +43 -43
- package/dist/components/noticebar/index.js +8 -8
- package/dist/components/noticebar/index.vue +258 -258
- package/dist/components/noticebar/style.less +333 -333
- package/dist/components/overlay/index.js +8 -8
- package/dist/components/overlay/index.vue +184 -184
- package/dist/components/overlay/style.less +24 -24
- package/dist/components/pagebreak/index.js +6 -6
- package/dist/components/pagebreak/index.vue +67 -67
- package/dist/components/pagebreak/style.less +41 -41
- package/dist/components/password/index.js +8 -8
- package/dist/components/password/index.vue +64 -64
- package/dist/components/popover/index.js +8 -8
- package/dist/components/popover/index.vue +100 -100
- package/dist/components/popover/style.less +346 -346
- package/dist/components/popover/vue-popover.vue +314 -314
- package/dist/components/popup/index.js +7 -7
- package/dist/components/popup/index.vue +165 -165
- package/dist/components/popup/style.less +78 -78
- package/dist/components/radio/index.js +8 -8
- package/dist/components/radio/index.vue +184 -184
- package/dist/components/radio/style.less +300 -300
- package/dist/components/radio-group/index.js +7 -7
- package/dist/components/radio-group/index.vue +62 -62
- package/dist/components/result/index.js +8 -8
- package/dist/components/result/index.vue +73 -73
- package/dist/components/result/style.less +43 -43
- package/dist/components/search/index.js +8 -8
- package/dist/components/search/index.vue +70 -70
- package/dist/components/selector/index.js +8 -8
- package/dist/components/selector/index.vue +161 -161
- package/dist/components/selector/style.less +484 -484
- package/dist/components/skeleton/index.js +6 -6
- package/dist/components/skeleton/index.vue +207 -207
- package/dist/components/skeleton/style.less +196 -196
- package/dist/components/slider/draggable.js +49 -49
- package/dist/components/slider/index.js +6 -6
- package/dist/components/slider/index.vue +167 -167
- package/dist/components/slider/style.less +99 -99
- package/dist/components/slider/utils.js +59 -59
- package/dist/components/step/index.js +7 -7
- package/dist/components/step/index.vue +48 -48
- package/dist/components/step/style.less +66 -66
- package/dist/components/step-item/index.js +7 -7
- package/dist/components/step-item/index.vue +126 -126
- package/dist/components/step-item/style.less +399 -399
- package/dist/components/stepper/index.js +8 -8
- package/dist/components/stepper/index.vue +150 -150
- package/dist/components/style/index.vue +42 -42
- package/dist/components/switch/index.js +8 -8
- package/dist/components/switch/index.vue +72 -72
- package/dist/components/switch/style.less +56 -56
- package/dist/components/tab/index.js +7 -7
- package/dist/components/tab/index.vue +97 -97
- package/dist/components/tabs/index.js +8 -8
- package/dist/components/tabs/index.vue +356 -356
- package/dist/components/tabs/style.less +504 -504
- package/dist/components/tag/index.js +6 -6
- package/dist/components/tag/index.vue +64 -64
- package/dist/components/tag/style.less +210 -210
- package/dist/components/title/index.js +8 -8
- package/dist/components/title/index.vue +99 -99
- package/dist/components/title/style.less +187 -187
- package/dist/components/toast/index.js +139 -139
- package/dist/components/toast/index.vue +50 -50
- package/dist/components/toast/style.less +58 -58
- package/dist/components/transition/index.js +8 -8
- package/dist/components/transition/index.vue +13 -13
- package/dist/components/transition/style.less +208 -208
- package/dist/components/upload/index.js +6 -6
- package/dist/components/upload/index.vue +106 -106
- package/dist/components/upload/style.less +147 -147
- package/dist/components/utils/assist.js +34 -34
- package/dist/components/utils/env.js +21 -21
- package/dist/locale/ar.js +97 -97
- package/dist/locale/en.js +97 -97
- package/dist/locale/zh.js +97 -97
- package/dist/token.css +9 -9
- package/dist/vdesign-ui.common.js +83 -83
- package/dist/vdesign-ui.umd.js +83 -83
- package/package.json +113 -113
|
@@ -1,162 +1,162 @@
|
|
|
1
|
-
@activityviews-prefix-cls: vd-activity-views;
|
|
2
|
-
|
|
3
|
-
.@{activityviews-prefix-cls} {
|
|
4
|
-
|
|
5
|
-
&--safe-area-inset-bottom{
|
|
6
|
-
padding-bottom: constant(safe-area-inset-bottom);
|
|
7
|
-
padding-bottom: env(safe-area-inset-bottom);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
::-webkit-scrollbar { width: 3px; }
|
|
11
|
-
position: fixed;
|
|
12
|
-
left: 0;
|
|
13
|
-
right: 0;
|
|
14
|
-
bottom: 0;
|
|
15
|
-
z-index: 2011;
|
|
16
|
-
width: 100%;
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
max-height: 80%;
|
|
20
|
-
overflow: auto;
|
|
21
|
-
transition: transform .3s;
|
|
22
|
-
background-color: var(--color-activityviews-bg);
|
|
23
|
-
border-radius: var(--radius-activityviews-title) var(--radius-activityviews-title) 0 0;
|
|
24
|
-
|
|
25
|
-
&__close {
|
|
26
|
-
font-size: var(--icon-activityviews-close);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&__header {
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: column;
|
|
32
|
-
padding-block-start: var(--spacing-activityviews-head-padding_top);
|
|
33
|
-
padding-block-end: var(--spacing-activityviews-head-padding_bottom);
|
|
34
|
-
padding-inline-start: var(--spacing-activityviews-padding_left);
|
|
35
|
-
padding-inline-end: var(--spacing-activityviews-padding_right);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&__bar {
|
|
39
|
-
position: relative;
|
|
40
|
-
width: 100%;
|
|
41
|
-
height: 16px;
|
|
42
|
-
&::after {
|
|
43
|
-
content: '';
|
|
44
|
-
position: absolute;
|
|
45
|
-
left: 50%;
|
|
46
|
-
top: var(--spacing-activityviews-title-margin_right);
|
|
47
|
-
transform: translate(-50%, 0);
|
|
48
|
-
width: var(--width-activityviews-bar);
|
|
49
|
-
height: var(--height-activityviews-bar);
|
|
50
|
-
border-radius: var(--radius-activityviews-bar);
|
|
51
|
-
background-color: var(--color-activityviews-bar);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&__wrapper {
|
|
56
|
-
display: flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&__title {
|
|
61
|
-
text-align: center;
|
|
62
|
-
margin-inline-end: auto;
|
|
63
|
-
padding-inline-end: var(--spacing-activityviews-title-margin_right);
|
|
64
|
-
font-size: var(--en-single-f-e-s-fontSize);
|
|
65
|
-
font-weight: var(--en-single-f-e-s-fontWeight);
|
|
66
|
-
color: var(--color-activityviews-title);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&__description {
|
|
70
|
-
color: var(--color-activityviews-text_describe);
|
|
71
|
-
margin-block-start: var(--spacing-activityviews-describe-margin_top);
|
|
72
|
-
font-size: var(--en-single-f-c-r-fontSize);
|
|
73
|
-
font-weight: var(--en-single-f-c-r-fontWeight);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&__done {
|
|
77
|
-
height: 24px;
|
|
78
|
-
line-height: 24px;
|
|
79
|
-
padding-right: 0;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
&__body {
|
|
83
|
-
background-color: var(--color-activityviews-bg);
|
|
84
|
-
height: 80%;
|
|
85
|
-
overflow-y: auto;
|
|
86
|
-
|
|
87
|
-
&--action {
|
|
88
|
-
overflow: hidden;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&__action {
|
|
93
|
-
padding: 0;
|
|
94
|
-
height: 80%;
|
|
95
|
-
overflow: hidden;
|
|
96
|
-
display: flex;
|
|
97
|
-
-webkit-box-orient: vertical;
|
|
98
|
-
-webkit-box-direction: normal;
|
|
99
|
-
flex-direction: column;
|
|
100
|
-
|
|
101
|
-
&-title {
|
|
102
|
-
flex-shrink: 0;
|
|
103
|
-
font-size: 14px;
|
|
104
|
-
text-align: center;
|
|
105
|
-
padding-block-start: var(--spacing-activityviews-actionsheet_title-padding_y);
|
|
106
|
-
padding-block-end: var(--spacing-activityviews-actionsheet_title-padding_y);
|
|
107
|
-
color: var(--color-activityviews-actionsheet_title);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
&__actions {
|
|
112
|
-
flex: 1;
|
|
113
|
-
overflow: auto;
|
|
114
|
-
-webkit-overflow-scrolling: touch;
|
|
115
|
-
|
|
116
|
-
.vd-btn {
|
|
117
|
-
border-radius: 0;
|
|
118
|
-
background-color: var(--color-activityviews-bg);
|
|
119
|
-
height: var(--height-activityviews-actionsheet);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
&__gap {
|
|
124
|
-
display: block;
|
|
125
|
-
height: var(--height-activityviews-actionsheet_divider);
|
|
126
|
-
background-color: var(--color-activityviews-actionsheet_divider);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
&__cancel {
|
|
130
|
-
flex-shrink: 0;
|
|
131
|
-
|
|
132
|
-
.vd-btn {
|
|
133
|
-
position: relative;
|
|
134
|
-
border: none;
|
|
135
|
-
background-color: var(--color-activityviews-bg);
|
|
136
|
-
height: var(--height-activityviews-actionsheet);
|
|
137
|
-
border-radius: 0;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
.vd-activity-views-slide-up-enter-active,
|
|
144
|
-
.vd-activity-views-slide-up-leave-active {
|
|
145
|
-
transition-property: transform;
|
|
146
|
-
transition-timing-function: ease;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.vd-activity-views-slide-up-enter,
|
|
150
|
-
.vd-activity-views-slide-up-leave-to {
|
|
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);
|
|
1
|
+
@activityviews-prefix-cls: vd-activity-views;
|
|
2
|
+
|
|
3
|
+
.@{activityviews-prefix-cls} {
|
|
4
|
+
|
|
5
|
+
&--safe-area-inset-bottom{
|
|
6
|
+
padding-bottom: constant(safe-area-inset-bottom);
|
|
7
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
::-webkit-scrollbar { width: 3px; }
|
|
11
|
+
position: fixed;
|
|
12
|
+
left: 0;
|
|
13
|
+
right: 0;
|
|
14
|
+
bottom: 0;
|
|
15
|
+
z-index: 2011;
|
|
16
|
+
width: 100%;
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
max-height: 80%;
|
|
20
|
+
overflow: auto;
|
|
21
|
+
transition: transform .3s;
|
|
22
|
+
background-color: var(--color-activityviews-bg);
|
|
23
|
+
border-radius: var(--radius-activityviews-title) var(--radius-activityviews-title) 0 0;
|
|
24
|
+
|
|
25
|
+
&__close {
|
|
26
|
+
font-size: var(--icon-activityviews-close);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&__header {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
padding-block-start: var(--spacing-activityviews-head-padding_top);
|
|
33
|
+
padding-block-end: var(--spacing-activityviews-head-padding_bottom);
|
|
34
|
+
padding-inline-start: var(--spacing-activityviews-padding_left);
|
|
35
|
+
padding-inline-end: var(--spacing-activityviews-padding_right);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&__bar {
|
|
39
|
+
position: relative;
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 16px;
|
|
42
|
+
&::after {
|
|
43
|
+
content: '';
|
|
44
|
+
position: absolute;
|
|
45
|
+
left: 50%;
|
|
46
|
+
top: var(--spacing-activityviews-title-margin_right);
|
|
47
|
+
transform: translate(-50%, 0);
|
|
48
|
+
width: var(--width-activityviews-bar);
|
|
49
|
+
height: var(--height-activityviews-bar);
|
|
50
|
+
border-radius: var(--radius-activityviews-bar);
|
|
51
|
+
background-color: var(--color-activityviews-bar);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&__wrapper {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&__title {
|
|
61
|
+
text-align: center;
|
|
62
|
+
margin-inline-end: auto;
|
|
63
|
+
padding-inline-end: var(--spacing-activityviews-title-margin_right);
|
|
64
|
+
font-size: var(--en-single-f-e-s-fontSize);
|
|
65
|
+
font-weight: var(--en-single-f-e-s-fontWeight);
|
|
66
|
+
color: var(--color-activityviews-title);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&__description {
|
|
70
|
+
color: var(--color-activityviews-text_describe);
|
|
71
|
+
margin-block-start: var(--spacing-activityviews-describe-margin_top);
|
|
72
|
+
font-size: var(--en-single-f-c-r-fontSize);
|
|
73
|
+
font-weight: var(--en-single-f-c-r-fontWeight);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&__done {
|
|
77
|
+
height: 24px;
|
|
78
|
+
line-height: 24px;
|
|
79
|
+
padding-right: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&__body {
|
|
83
|
+
background-color: var(--color-activityviews-bg);
|
|
84
|
+
height: 80%;
|
|
85
|
+
overflow-y: auto;
|
|
86
|
+
|
|
87
|
+
&--action {
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&__action {
|
|
93
|
+
padding: 0;
|
|
94
|
+
height: 80%;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
display: flex;
|
|
97
|
+
-webkit-box-orient: vertical;
|
|
98
|
+
-webkit-box-direction: normal;
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
|
|
101
|
+
&-title {
|
|
102
|
+
flex-shrink: 0;
|
|
103
|
+
font-size: 14px;
|
|
104
|
+
text-align: center;
|
|
105
|
+
padding-block-start: var(--spacing-activityviews-actionsheet_title-padding_y);
|
|
106
|
+
padding-block-end: var(--spacing-activityviews-actionsheet_title-padding_y);
|
|
107
|
+
color: var(--color-activityviews-actionsheet_title);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&__actions {
|
|
112
|
+
flex: 1;
|
|
113
|
+
overflow: auto;
|
|
114
|
+
-webkit-overflow-scrolling: touch;
|
|
115
|
+
|
|
116
|
+
.vd-btn {
|
|
117
|
+
border-radius: 0;
|
|
118
|
+
background-color: var(--color-activityviews-bg);
|
|
119
|
+
height: var(--height-activityviews-actionsheet);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&__gap {
|
|
124
|
+
display: block;
|
|
125
|
+
height: var(--height-activityviews-actionsheet_divider);
|
|
126
|
+
background-color: var(--color-activityviews-actionsheet_divider);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&__cancel {
|
|
130
|
+
flex-shrink: 0;
|
|
131
|
+
|
|
132
|
+
.vd-btn {
|
|
133
|
+
position: relative;
|
|
134
|
+
border: none;
|
|
135
|
+
background-color: var(--color-activityviews-bg);
|
|
136
|
+
height: var(--height-activityviews-actionsheet);
|
|
137
|
+
border-radius: 0;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
.vd-activity-views-slide-up-enter-active,
|
|
144
|
+
.vd-activity-views-slide-up-leave-active {
|
|
145
|
+
transition-property: transform;
|
|
146
|
+
transition-timing-function: ease;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.vd-activity-views-slide-up-enter,
|
|
150
|
+
.vd-activity-views-slide-up-leave-to {
|
|
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);
|
|
162
162
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import Badge from './index.vue';
|
|
2
|
-
import './style.less';
|
|
3
|
-
|
|
4
|
-
Badge.install = function (Vue) {
|
|
5
|
-
Vue.component(Badge.name, Badge);
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export default Badge;
|
|
1
|
+
import Badge from './index.vue';
|
|
2
|
+
import './style.less';
|
|
3
|
+
|
|
4
|
+
Badge.install = function (Vue) {
|
|
5
|
+
Vue.component(Badge.name, Badge);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default Badge;
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="vd-badge">
|
|
3
|
-
<slot></slot>
|
|
4
|
-
<span v-show="!hidden && (content || content === 0 || isDot)" v-text="content" class="vd-badge__content" :class="[
|
|
5
|
-
{
|
|
6
|
-
'vd-is-fixed': $slots.default,
|
|
7
|
-
'vd-is-dot': isDot,
|
|
8
|
-
'vd-ltr': direction
|
|
9
|
-
}
|
|
10
|
-
]">
|
|
11
|
-
</span>
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script>
|
|
16
|
-
|
|
17
|
-
export default {
|
|
18
|
-
name: 'vd-badge',
|
|
19
|
-
props: {
|
|
20
|
-
value: [String, Number],
|
|
21
|
-
max: Number,
|
|
22
|
-
isDot: Boolean,
|
|
23
|
-
hidden: Boolean,
|
|
24
|
-
},
|
|
25
|
-
computed: {
|
|
26
|
-
content() {
|
|
27
|
-
if (this.isDot) return;
|
|
28
|
-
|
|
29
|
-
const value = this.value;
|
|
30
|
-
const max = this.max;
|
|
31
|
-
|
|
32
|
-
if (typeof value === 'number' && typeof max === 'number') {
|
|
33
|
-
return max < value ? `${max}+` : value;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return value;
|
|
37
|
-
},
|
|
38
|
-
direction() {
|
|
39
|
-
return {
|
|
40
|
-
'ltr': this.max
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
</script>
|
|
46
|
-
|
|
47
|
-
<style lang="less">
|
|
48
|
-
@import './style.less';
|
|
49
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vd-badge">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
<span v-show="!hidden && (content || content === 0 || isDot)" v-text="content" class="vd-badge__content" :class="[
|
|
5
|
+
{
|
|
6
|
+
'vd-is-fixed': $slots.default,
|
|
7
|
+
'vd-is-dot': isDot,
|
|
8
|
+
'vd-ltr': direction
|
|
9
|
+
}
|
|
10
|
+
]">
|
|
11
|
+
</span>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
name: 'vd-badge',
|
|
19
|
+
props: {
|
|
20
|
+
value: [String, Number],
|
|
21
|
+
max: Number,
|
|
22
|
+
isDot: Boolean,
|
|
23
|
+
hidden: Boolean,
|
|
24
|
+
},
|
|
25
|
+
computed: {
|
|
26
|
+
content() {
|
|
27
|
+
if (this.isDot) return;
|
|
28
|
+
|
|
29
|
+
const value = this.value;
|
|
30
|
+
const max = this.max;
|
|
31
|
+
|
|
32
|
+
if (typeof value === 'number' && typeof max === 'number') {
|
|
33
|
+
return max < value ? `${max}+` : value;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return value;
|
|
37
|
+
},
|
|
38
|
+
direction() {
|
|
39
|
+
return {
|
|
40
|
+
'ltr': this.max
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<style lang="less">
|
|
48
|
+
@import './style.less';
|
|
49
|
+
</style>
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
@badge-prefix-cls: vd-badge;
|
|
2
|
-
|
|
3
|
-
.@{badge-prefix-cls} {
|
|
4
|
-
position: relative;
|
|
5
|
-
display: inline-flex;
|
|
6
|
-
line-height: 1;
|
|
7
|
-
|
|
8
|
-
&__content {
|
|
9
|
-
text-align: center;
|
|
10
|
-
white-space: nowrap;
|
|
11
|
-
background-color: var(--color-badge-bg);
|
|
12
|
-
border-radius: var(--radius-badge-count);
|
|
13
|
-
color: var(--color-badge-text);
|
|
14
|
-
display: inline-block;
|
|
15
|
-
font-size: var(--en-single-f-b-r-fontSize);
|
|
16
|
-
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
17
|
-
min-width: var(--height-badge-count);
|
|
18
|
-
height: var(--height-badge-count);
|
|
19
|
-
padding: var(--spacing-badge-count-padding_x) var(--spacing-badge-count-padding_y);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.vd-is-dot {
|
|
23
|
-
background-color: transparent;
|
|
24
|
-
&::before {
|
|
25
|
-
content: '';
|
|
26
|
-
display: inline-block;
|
|
27
|
-
width: var(--width-badge-dot);
|
|
28
|
-
height: var(--height-badge-dot);
|
|
29
|
-
background-color: var(--color-badge-bg);
|
|
30
|
-
border-radius: var(--radius-badge-count);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.vd-is-fixed {
|
|
35
|
-
position: absolute;
|
|
36
|
-
top: 0;
|
|
37
|
-
right: 0;
|
|
38
|
-
transform: translate(50%, -50%);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.vd-ltr {
|
|
42
|
-
direction: ltr;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
[lang|='ar'], [dir='rtl'] {
|
|
47
|
-
.@{badge-prefix-cls} {
|
|
48
|
-
.vd-is-fixed {
|
|
49
|
-
left: 0;
|
|
50
|
-
right: auto;
|
|
51
|
-
transform: translate(-50%, -50%);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
1
|
+
@badge-prefix-cls: vd-badge;
|
|
2
|
+
|
|
3
|
+
.@{badge-prefix-cls} {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
line-height: 1;
|
|
7
|
+
|
|
8
|
+
&__content {
|
|
9
|
+
text-align: center;
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
background-color: var(--color-badge-bg);
|
|
12
|
+
border-radius: var(--radius-badge-count);
|
|
13
|
+
color: var(--color-badge-text);
|
|
14
|
+
display: inline-block;
|
|
15
|
+
font-size: var(--en-single-f-b-r-fontSize);
|
|
16
|
+
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
17
|
+
min-width: var(--height-badge-count);
|
|
18
|
+
height: var(--height-badge-count);
|
|
19
|
+
padding: var(--spacing-badge-count-padding_x) var(--spacing-badge-count-padding_y);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.vd-is-dot {
|
|
23
|
+
background-color: transparent;
|
|
24
|
+
&::before {
|
|
25
|
+
content: '';
|
|
26
|
+
display: inline-block;
|
|
27
|
+
width: var(--width-badge-dot);
|
|
28
|
+
height: var(--height-badge-dot);
|
|
29
|
+
background-color: var(--color-badge-bg);
|
|
30
|
+
border-radius: var(--radius-badge-count);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.vd-is-fixed {
|
|
35
|
+
position: absolute;
|
|
36
|
+
top: 0;
|
|
37
|
+
right: 0;
|
|
38
|
+
transform: translate(50%, -50%);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.vd-ltr {
|
|
42
|
+
direction: ltr;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[lang|='ar'], [dir='rtl'] {
|
|
47
|
+
.@{badge-prefix-cls} {
|
|
48
|
+
.vd-is-fixed {
|
|
49
|
+
left: 0;
|
|
50
|
+
right: auto;
|
|
51
|
+
transform: translate(-50%, -50%);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import HButton from './index.vue';
|
|
2
|
-
import './style.less';
|
|
3
|
-
|
|
4
|
-
HButton.install = function (Vue) {
|
|
5
|
-
Vue.component(HButton.name, HButton);
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export default HButton;
|
|
1
|
+
import HButton from './index.vue';
|
|
2
|
+
import './style.less';
|
|
3
|
+
|
|
4
|
+
HButton.install = function (Vue) {
|
|
5
|
+
Vue.component(HButton.name, HButton);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default HButton;
|