vdesign-ui 0.2.1 → 0.2.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.
- package/dist/components/actionbar/style.less +8 -12
- package/dist/components/actionbar-cell/index.js +7 -0
- package/dist/components/{actionbar/actionbar-cell → actionbar-cell}/index.vue +4 -0
- package/dist/components/{actions-cell/actions → actions}/index.vue +6 -6
- package/dist/components/{actions-cell/actions → actions}/style.less +38 -41
- package/dist/components/activityviews/index.vue +7 -1
- package/dist/components/activityviews/style.less +42 -46
- package/dist/components/badge/style.less +22 -34
- package/dist/components/button/index.vue +4 -0
- package/dist/components/button/style.less +82 -87
- package/dist/components/calendar/index.vue +1 -1
- package/dist/components/calendar/style.less +24 -53
- package/dist/components/checkbox/index.vue +5 -1
- package/dist/components/checkbox/style.less +30 -32
- package/dist/components/checkbox-group/index.js +7 -0
- package/dist/components/{checkbox/checkbox-group → checkbox-group}/index.vue +1 -2
- package/dist/components/common/state/index.vue +1 -48
- package/dist/components/common/state/style.less +48 -0
- package/dist/components/data-list/style.less +81 -82
- package/dist/components/datetime-picker/style.less +12 -12
- package/dist/components/dialog/index.vue +4 -0
- package/dist/components/dialog/style.less +27 -31
- package/dist/components/divider/style.less +1 -1
- package/dist/components/dropdown/index.vue +6 -1
- package/dist/components/dropdown/style.less +117 -125
- package/dist/components/empty/index.vue +10 -8
- package/dist/components/empty/style.less +34 -26
- package/dist/components/footer/style.less +6 -7
- package/dist/components/footnav/index.vue +1 -1
- package/dist/components/footnav/style.less +5 -5
- package/dist/components/{footnav/footnav-item → footnav-item}/index.vue +7 -1
- package/dist/components/{footnav/footnav-item → footnav-item}/style.less +2 -2
- package/dist/components/headnav/index.vue +5 -1
- package/dist/components/headnav/style.less +54 -58
- package/dist/components/icon/style.less +4 -4
- package/dist/components/input/index.vue +4 -0
- package/dist/components/input/style.less +88 -101
- package/dist/components/list/index.vue +5 -0
- package/dist/components/list/style.less +45 -52
- package/dist/components/loading/style.less +25 -27
- package/dist/components/mixins/languageMixin.js +7 -3
- package/dist/components/mixins/outlineConfigPlugin.js +1 -1
- package/dist/components/mixins/themeMixin.js +29 -15
- package/dist/components/noticebar/index.vue +7 -1
- package/dist/components/noticebar/style.less +125 -129
- package/dist/components/overlay/index.vue +34 -11
- package/dist/components/pagebreak/style.less +18 -19
- package/dist/components/popover/index.vue +2 -1
- package/dist/components/popover/style.less +39 -39
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio/index.vue +1 -1
- package/dist/components/radio/style.less +35 -43
- package/dist/components/radio-group/index.js +6 -0
- package/dist/components/{radio/radio-group → radio-group}/index.vue +1 -1
- package/dist/components/result/completed-dark.png +0 -0
- package/dist/components/result/completed.png +0 -0
- package/dist/components/result/error-dark.png +0 -0
- package/dist/components/result/error.png +0 -0
- package/dist/components/result/index.vue +1 -2
- package/dist/components/result/style.less +22 -20
- package/dist/components/result/wait-dark.png +0 -0
- package/dist/components/result/wait.png +0 -0
- package/dist/components/{input/search → search}/index.vue +4 -0
- package/dist/components/selector/index.vue +4 -0
- package/dist/components/selector/style.less +96 -100
- package/dist/components/skeleton/style.less +112 -107
- package/dist/components/slider/index.vue +1 -1
- package/dist/components/slider/style.less +41 -37
- package/dist/components/step/style.less +3 -4
- package/dist/components/step-item/index.vue +12 -3
- package/dist/components/step-item/style.less +61 -60
- package/dist/components/{input/stepper → stepper}/index.vue +5 -1
- package/dist/components/switch/style.less +8 -8
- package/dist/components/tab/index.js +7 -0
- package/dist/components/tabs/index.vue +4 -0
- package/dist/components/tabs/style.less +97 -105
- package/dist/components/tag/style.less +35 -35
- package/dist/components/title/index.vue +4 -0
- package/dist/components/title/style.less +164 -170
- package/dist/components/toast/index.js +9 -3
- package/dist/components/toast/style.less +8 -8
- package/dist/components/upload/index.vue +4 -0
- package/dist/components/upload/style.less +22 -31
- package/dist/components/utils/env.js +2 -0
- package/dist/token.css +1278 -1278
- package/dist/vdesign-ui.common.js +1112 -948
- package/dist/vdesign-ui.css +1 -1
- package/dist/vdesign-ui.umd.js +1112 -948
- package/dist/vdesign-ui.umd.min.js +3 -3
- package/package.json +1 -1
- package/dist/components/checkbox/checkbox-group/index.js +0 -8
- package/dist/components/radio/assist.js +0 -34
- package/dist/components/radio/style.css +0 -213
- package/dist/img/completed-dark.4183a8a8.png +0 -0
- package/dist/img/error-dark.b80857da.png +0 -0
- package/dist/img/wait-dark.6aa28731.png +0 -0
- /package/dist/components/{actions-cell/actions → actions}/index.js +0 -0
- /package/dist/components/{footnav/footnav-item → footnav-item}/index.js +0 -0
- /package/dist/components/{input/password → password}/index.js +0 -0
- /package/dist/components/{input/password → password}/index.vue +0 -0
- /package/dist/components/{input/search → search}/index.js +0 -0
- /package/dist/components/{input/stepper → stepper}/index.js +0 -0
- /package/dist/components/{tabs/tab → tab}/index.vue +0 -0
- /package/dist/components/{checkbox → utils}/assist.js +0 -0
|
@@ -5,192 +5,189 @@
|
|
|
5
5
|
position: relative;
|
|
6
6
|
width: 100%;
|
|
7
7
|
display: flex;
|
|
8
|
-
min-height:
|
|
9
|
-
padding-inline-start:
|
|
10
|
-
padding-inline-end:
|
|
11
|
-
border-radius:
|
|
8
|
+
min-height: var(--height-noticebar-snackbar);
|
|
9
|
+
padding-inline-start: var(--spacing-noticebar-snackbar-padding_left);
|
|
10
|
+
padding-inline-end: var(--spacing-noticebar-snackbar-padding_right);
|
|
11
|
+
border-radius: var(--radius-noticebar-snackbar);
|
|
12
12
|
background-color: var(--color-noticebar-snackbar_info-bg);
|
|
13
13
|
color: var(--color-noticebar-snackbar_info-text);
|
|
14
|
-
font-size:
|
|
14
|
+
font-size: var(--en-single-f-c-r-fontSize);
|
|
15
15
|
font-weight: var(--en-single-f-c-r-fontWeight);
|
|
16
16
|
line-height: 1.25;
|
|
17
17
|
z-index: 99;
|
|
18
18
|
|
|
19
19
|
.vd-iconfont {
|
|
20
|
-
|
|
20
|
+
font-size: var(--icon-noticebar-snackbar);
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
&+.vd-iconfont {
|
|
23
|
+
margin-inline-start: var(--spacing-noticebar-snackbar_icon-margin_right);
|
|
24
|
+
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
&.@{prefix}-info {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
background-color: var(--color-noticebar-snackbar_info-bg);
|
|
29
|
+
color: var(--color-noticebar-snackbar_info-text);
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
.vd-iconfont {
|
|
32
|
+
color: var(--color-noticebar-snackbar_info-icon);
|
|
33
|
+
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
&.@{prefix}-warning {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
background-color: var(--color-noticebar-snackbar_warning-bg);
|
|
38
|
+
color: var(--color-noticebar-snackbar_warning-text);
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
.vd-noticebar-snackbar__content {
|
|
41
|
+
&::after {
|
|
42
|
+
background-image: linear-gradient(270deg, rgba(0, 0, 0, 0), var(--color-noticebar-snackbar_warning-bg) 90%);
|
|
43
|
+
}
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
&::before {
|
|
46
|
+
background-image: linear-gradient(90deg, rgba(0, 0, 0, 0), var(--color-noticebar-snackbar_warning-bg) 90%);
|
|
47
|
+
}
|
|
47
48
|
}
|
|
48
|
-
}
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
.vd-iconfont {
|
|
51
|
+
color: var(--color-noticebar-snackbar_warning-icon);
|
|
52
|
+
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
&.@{prefix}-tips {
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
background-color: var(--color-noticebar-snackbar_tips-bg);
|
|
57
|
+
color: var(--color-noticebar-snackbar_tips-text);
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
.vd-noticebar-snackbar__content {
|
|
60
|
+
&::after {
|
|
61
|
+
background-image: linear-gradient(270deg, rgba(0, 0, 0, 0), var(--color-noticebar-snackbar_tips-bg) 90%);
|
|
62
|
+
}
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
&::before {
|
|
65
|
+
background-image: linear-gradient(90deg, rgba(0, 0, 0, 0), var(--color-noticebar-snackbar_tips-bg) 90%);
|
|
66
|
+
}
|
|
66
67
|
}
|
|
67
|
-
}
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
.vd-iconfont {
|
|
70
|
+
color: var(--color-noticebar-snackbar_tips-icon);
|
|
71
|
+
}
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
&__left,
|
|
75
75
|
&__right {
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
&__content {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
overflow: hidden;
|
|
89
|
-
margin-inline-end: calc(var(--spacing-noticebar-snackbar_text-margin_right) * 1px);
|
|
81
|
+
position: relative;
|
|
82
|
+
flex: 1;
|
|
83
|
+
margin: auto;
|
|
84
|
+
width: auto;
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
margin-inline-end: var(--spacing-noticebar-snackbar_text-margin_right);
|
|
90
88
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
89
|
+
&::after {
|
|
90
|
+
content: "";
|
|
91
|
+
width: var(--spacing-noticebar-snackbar-padding_left);
|
|
92
|
+
position: absolute;
|
|
93
|
+
inset-block: 0;
|
|
94
|
+
inset-inline-start: 0;
|
|
95
|
+
background-image: linear-gradient(270deg, rgba(0, 0, 0, 0), var(--color-noticebar-snackbar_info-bg) 90%);
|
|
96
|
+
z-index: 1;
|
|
97
|
+
}
|
|
100
98
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
99
|
+
&::before {
|
|
100
|
+
content: "";
|
|
101
|
+
width: var(--spacing-noticebar-snackbar-padding_right);
|
|
102
|
+
position: absolute;
|
|
103
|
+
inset-block: 0;
|
|
104
|
+
inset-inline-end: 0;
|
|
105
|
+
z-index: 1;
|
|
106
|
+
background-image: linear-gradient(90deg, rgba(0, 0, 0, 0), var(--color-noticebar-snackbar_info-bg) 90%);
|
|
107
|
+
}
|
|
110
108
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
109
|
+
&--animate {
|
|
110
|
+
display: inline-block;
|
|
111
|
+
transition-timing-function: linear;
|
|
112
|
+
}
|
|
115
113
|
}
|
|
116
114
|
|
|
117
115
|
&__multi {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
116
|
+
white-space: normal;
|
|
117
|
+
padding-top: var(--spacing-noticebar-snackbar_text-margin_right);
|
|
118
|
+
padding-bottom: var(--spacing-noticebar-snackbar_text-margin_right);
|
|
119
|
+
overflow: hidden;
|
|
120
|
+
display: -webkit-box;
|
|
121
|
+
-webkit-box-orient: vertical;
|
|
122
|
+
-webkit-line-clamp: 3;
|
|
125
123
|
}
|
|
126
|
-
|
|
127
124
|
}
|
|
128
125
|
|
|
126
|
+
|
|
129
127
|
.@{prefix}-toast {
|
|
130
128
|
box-sizing: border-box;
|
|
131
129
|
position: relative;
|
|
132
130
|
display: inline-flex;
|
|
133
131
|
max-width: 100%;
|
|
134
|
-
min-height:
|
|
135
|
-
padding-inline-start:
|
|
136
|
-
padding-inline-end:
|
|
137
|
-
border-radius:
|
|
132
|
+
min-height: var(--height-noticebar-snackbar);
|
|
133
|
+
padding-inline-start: var(--spacing-noticebar-toast-padding_left);
|
|
134
|
+
padding-inline-end: var(--spacing-noticebar-toast-padding_right);
|
|
135
|
+
border-radius: var(--radius-noticebar-toast);
|
|
138
136
|
background-color: var(--color-noticebar-toast_info-bg);
|
|
139
137
|
color: var(--color-noticebar-toast_info-text);
|
|
140
|
-
font-size:
|
|
138
|
+
font-size: var(--en-single-f-c-r-fontSize);
|
|
141
139
|
font-weight: var(--en-single-f-c-r-fontWeight);
|
|
142
140
|
line-height: 1.25;
|
|
143
141
|
z-index: 99;
|
|
144
142
|
|
|
145
143
|
.vd-iconfont {
|
|
146
|
-
|
|
147
|
-
|
|
144
|
+
font-size: var(--icon-noticebar-toast);
|
|
145
|
+
margin-inline-end: var(--spacing-noticebar-toast_icon-margin_right);
|
|
148
146
|
}
|
|
149
147
|
|
|
150
148
|
[lang='ar'] & .vd-iconfont {
|
|
151
|
-
|
|
149
|
+
transform: scaleX(1);
|
|
152
150
|
}
|
|
153
151
|
|
|
154
152
|
&.@{prefix}-info {
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
background-color: var(--color-noticebar-toast_info-bg);
|
|
154
|
+
color: var(--color-noticebar-toast_info-text);
|
|
157
155
|
}
|
|
158
156
|
|
|
159
157
|
&.@{prefix}-warning {
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
background-color: var(--color-noticebar-snackbar_warning-bg);
|
|
159
|
+
color: var(--color-noticebar-snackbar_warning-text);
|
|
162
160
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
161
|
+
.vd-iconfont {
|
|
162
|
+
color: var(--color-noticebar-toast_warning-icon);
|
|
163
|
+
}
|
|
166
164
|
}
|
|
167
165
|
|
|
168
166
|
&__left,
|
|
169
167
|
&__right {
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
display: flex;
|
|
169
|
+
align-items: center;
|
|
172
170
|
}
|
|
173
171
|
|
|
174
172
|
&__content {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
173
|
+
flex: 1;
|
|
174
|
+
margin: auto;
|
|
175
|
+
width: auto;
|
|
176
|
+
white-space: nowrap;
|
|
177
|
+
overflow: hidden;
|
|
178
|
+
text-overflow: ellipsis;
|
|
179
|
+
margin-inline-end: var(--spacing-noticebar-snackbar_text-margin_right);
|
|
182
180
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
181
|
+
&--animate {
|
|
182
|
+
display: inline-block;
|
|
183
|
+
transition-timing-function: linear;
|
|
184
|
+
}
|
|
188
185
|
}
|
|
189
186
|
|
|
190
187
|
&__multi {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
188
|
+
white-space: normal;
|
|
189
|
+
padding-top: var(--spacing-noticebar-snackbar_text-margin_right);
|
|
190
|
+
padding-bottom: var(--spacing-noticebar-snackbar_text-margin_right);
|
|
194
191
|
}
|
|
195
192
|
}
|
|
196
193
|
|
|
@@ -199,22 +196,22 @@
|
|
|
199
196
|
position: relative;
|
|
200
197
|
width: 100%;
|
|
201
198
|
display: flex;
|
|
202
|
-
font-size:
|
|
199
|
+
font-size: var(--en-single-f-c-r-fontSize);
|
|
203
200
|
font-weight: var(--en-single-f-c-r-fontWeight);
|
|
204
201
|
line-height: 1.25;
|
|
205
202
|
z-index: 99;
|
|
206
203
|
|
|
207
|
-
border-radius:
|
|
204
|
+
border-radius: var(--radius-noticebar-notification);
|
|
208
205
|
background-color: var(--color-noticebar-notification-bg);
|
|
209
206
|
color: var(--color-noticebar-notification-text);
|
|
210
|
-
padding-inline-start:
|
|
211
|
-
padding-inline-end:
|
|
212
|
-
padding-top:
|
|
213
|
-
padding-bottom:
|
|
207
|
+
padding-inline-start: var(--spacing-noticebar-notification-padding_left);
|
|
208
|
+
padding-inline-end: var(--spacing-noticebar-notification-padding_right);
|
|
209
|
+
padding-top: var(--spacing-noticebar-notification-padding_top);
|
|
210
|
+
padding-bottom: var(--spacing-noticebar-notification-padding_bottom);
|
|
214
211
|
box-shadow: var(--shadow-s3);
|
|
215
212
|
|
|
216
213
|
&.@{prefix}-action {
|
|
217
|
-
padding-inline-end:
|
|
214
|
+
padding-inline-end: var(--spacing-noticebar-notification_button-padding_right);
|
|
218
215
|
}
|
|
219
216
|
|
|
220
217
|
&__content {
|
|
@@ -234,9 +231,9 @@
|
|
|
234
231
|
&__message {
|
|
235
232
|
display: flex;
|
|
236
233
|
justify-content: space-between;
|
|
237
|
-
font-size:
|
|
234
|
+
font-size: var(--en-single-f-d-s-fontSize);
|
|
238
235
|
font-weight: var(--en-single-f-d-s-fontWeight);
|
|
239
|
-
margin-bottom:
|
|
236
|
+
margin-bottom: var(--spacing-noticebar-notification_title-margin_bottom);
|
|
240
237
|
|
|
241
238
|
&--title {
|
|
242
239
|
flex: 1;
|
|
@@ -248,16 +245,15 @@
|
|
|
248
245
|
&--tag {
|
|
249
246
|
display: flex;
|
|
250
247
|
align-items: center;
|
|
251
|
-
margin-inline-start:
|
|
252
|
-
border-radius:
|
|
253
|
-
font-size:
|
|
248
|
+
margin-inline-start: var(--spacing-extra-tight);
|
|
249
|
+
border-radius: var(--radius-noticebar-notification_tag);
|
|
250
|
+
font-size: var(--en-single-f-a-r-fontSize);
|
|
254
251
|
font-weight: var(--en-single-f-a-r-fontWeight);
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
line-height: calc(var(--en-single-f-a-r-fontSize) * 1px);
|
|
252
|
+
padding: var(--spacing-extra-tight);
|
|
253
|
+
line-height: var(--en-single-f-a-r-fontSize);
|
|
258
254
|
|
|
259
255
|
.vd-iconfont {
|
|
260
|
-
margin-inline-end:
|
|
256
|
+
margin-inline-end: var(--spacing-extra-tight);
|
|
261
257
|
}
|
|
262
258
|
|
|
263
259
|
[lang='ar'] & .vd-iconfont {
|
|
@@ -299,11 +295,11 @@
|
|
|
299
295
|
}
|
|
300
296
|
|
|
301
297
|
&__button {
|
|
302
|
-
margin-inline-start:
|
|
298
|
+
margin-inline-start: var(--spacing-noticebar-notification-button-margin_left);
|
|
303
299
|
}
|
|
304
300
|
|
|
305
301
|
.vd-iconfont {
|
|
306
|
-
font-size:
|
|
302
|
+
font-size: var(--icon-noticebar-notification);
|
|
307
303
|
}
|
|
308
304
|
}
|
|
309
305
|
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script>
|
|
10
|
+
import { inBrowser } from '../utils/env';
|
|
11
|
+
|
|
10
12
|
export default {
|
|
11
13
|
name: "vd-overlay",
|
|
12
14
|
props: {
|
|
@@ -38,8 +40,9 @@ export default {
|
|
|
38
40
|
type: Boolean,
|
|
39
41
|
default: true
|
|
40
42
|
},
|
|
43
|
+
// 去掉了HTMLElement类型,改为Object类型
|
|
41
44
|
mountNode: {
|
|
42
|
-
type:
|
|
45
|
+
type: Object,
|
|
43
46
|
default: null
|
|
44
47
|
}
|
|
45
48
|
},
|
|
@@ -51,10 +54,16 @@ export default {
|
|
|
51
54
|
};
|
|
52
55
|
},
|
|
53
56
|
mounted() {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
this.
|
|
57
|
+
if (inBrowser) {
|
|
58
|
+
this.targetNode = this.getMountNode();
|
|
59
|
+
if (this.value) {
|
|
60
|
+
this.showOverlay();
|
|
61
|
+
}
|
|
57
62
|
}
|
|
63
|
+
// this.targetNode = this.getMountNode();
|
|
64
|
+
// if (this.value) {
|
|
65
|
+
// this.showOverlay();
|
|
66
|
+
// }
|
|
58
67
|
},
|
|
59
68
|
beforeUnmount() {
|
|
60
69
|
this.hideOverlay();
|
|
@@ -124,15 +133,29 @@ export default {
|
|
|
124
133
|
this.unlock();
|
|
125
134
|
});
|
|
126
135
|
},
|
|
136
|
+
// getMountNode() {
|
|
137
|
+
// if (this.mountNode instanceof HTMLElement) {
|
|
138
|
+
// return this.mountNode;
|
|
139
|
+
// } else if (typeof this.mountNode === 'object' && this.mountNode !== null && this.mountNode.$el instanceof HTMLElement) {
|
|
140
|
+
// return this.mountNode.$el;
|
|
141
|
+
// } else {
|
|
142
|
+
// // 返回当前组件的父节点,确保嵌套时能够正确挂载
|
|
143
|
+
// return this.$el.parentNode || document.body;
|
|
144
|
+
// }
|
|
145
|
+
// },
|
|
127
146
|
getMountNode() {
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
147
|
+
if (inBrowser) {
|
|
148
|
+
// 在客户端渲染时检查并返回 mountNode
|
|
149
|
+
if (this.mountNode instanceof HTMLElement) {
|
|
150
|
+
return this.mountNode;
|
|
151
|
+
} else if (typeof this.mountNode === 'object' && this.mountNode !== null && this.mountNode.$el instanceof HTMLElement) {
|
|
152
|
+
return this.mountNode.$el;
|
|
153
|
+
} else {
|
|
154
|
+
return document.body; // 默认挂载到 body
|
|
155
|
+
}
|
|
135
156
|
}
|
|
157
|
+
// 在服务端渲染时返回 null 或适当的替代值
|
|
158
|
+
return null;
|
|
136
159
|
},
|
|
137
160
|
lock() {
|
|
138
161
|
if (this.lockScroll) {
|
|
@@ -1,43 +1,42 @@
|
|
|
1
1
|
@pagebreak-prefix-cls: vd-page-break;
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
.@{pagebreak-prefix-cls}{
|
|
3
|
+
.@{pagebreak-prefix-cls} {
|
|
5
4
|
display: inline-flex;
|
|
6
|
-
gap:
|
|
7
|
-
|
|
5
|
+
gap: var(--spacing-pagebreak-drop-margin_right);
|
|
6
|
+
|
|
7
|
+
&__cell {
|
|
8
8
|
cursor: pointer;
|
|
9
|
-
width:
|
|
10
|
-
height:
|
|
9
|
+
width: var(--width-pagebreak-drop);
|
|
10
|
+
height: var(--height-pagebreak-drop);
|
|
11
11
|
background-color: var(--color-pagebreak-drop-default);
|
|
12
|
-
border-radius:
|
|
12
|
+
border-radius: var(--radius-pagebreak-drop);
|
|
13
13
|
|
|
14
|
-
&--active{
|
|
14
|
+
&--active {
|
|
15
15
|
background-color: var(--color-pagebreak-drop-active);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
&__number{
|
|
19
|
+
&__number {
|
|
21
20
|
display: flex;
|
|
22
21
|
align-items: center;
|
|
23
|
-
font-size:
|
|
22
|
+
font-size: var(--en-single-f-c-s-fontSize);
|
|
24
23
|
font-weight: var(--en-single-f-c-s-fontWeight);
|
|
25
|
-
padding:
|
|
26
|
-
border-radius:
|
|
24
|
+
padding: var(--spacing-pagebreak-number-padding_x) var(--spacing-pagebreak-number-padding_y);
|
|
25
|
+
border-radius: var(--radius-pagebreak-number_bg);
|
|
27
26
|
background-color: var(--color-pagebreak-number-bg);
|
|
28
27
|
|
|
29
|
-
&--total{
|
|
28
|
+
&--total {
|
|
30
29
|
color: var(--color-pagebreak-number-text-default);
|
|
31
30
|
}
|
|
32
31
|
|
|
33
|
-
&--active{
|
|
32
|
+
&--active {
|
|
34
33
|
color: var(--color-pagebreak-number-text-active);
|
|
35
34
|
}
|
|
36
35
|
|
|
37
|
-
&--line{
|
|
38
|
-
font-size:
|
|
36
|
+
&--line {
|
|
37
|
+
font-size: var(--en-single-f-b-r-fontSize);
|
|
39
38
|
font-weight: var(--en-single-f-b-r-fontWeight);
|
|
40
|
-
color: var(--color-pagebreak-number-text-default);
|
|
39
|
+
color: var(--color-pagebreak-number-text-default);
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
|
-
}
|
|
42
|
+
}
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
</template>
|
|
33
33
|
|
|
34
34
|
<script>
|
|
35
|
+
import VdIcon from '../icon';
|
|
35
36
|
import popper from "./vue-popover";
|
|
36
37
|
// 总共12个位置
|
|
37
38
|
const placementArr = [
|
|
@@ -50,7 +51,7 @@ const placementArr = [
|
|
|
50
51
|
];
|
|
51
52
|
export default {
|
|
52
53
|
name: "vd-popover",
|
|
53
|
-
components: { popper }, // 注册并使用 vue-popperjs 插件组件
|
|
54
|
+
components: { popper,VdIcon }, // 注册并使用 vue-popperjs 插件组件
|
|
54
55
|
props: {
|
|
55
56
|
// 12个位置
|
|
56
57
|
placement: {
|