kui-vue 3.6.7 → 3.6.9
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/components/alert/demo/basic.md +2 -2
- package/components/alert/demo/close.md +2 -2
- package/components/alert/demo/customIcon.md +2 -2
- package/components/alert/styles/index.less +0 -1
- package/components/avatar/styles/index.less +1 -1
- package/components/datePicker/datepicker.jsx +0 -5
- package/components/form/demo/valid.md +8 -7
- package/components/image/demo/group.md +1 -1
- package/components/image/group.jsx +10 -4
- package/components/image/image.jsx +47 -99
- package/components/image/preview.jsx +130 -116
- package/components/image/styles/index.less +219 -224
- package/components/image/utils.js +31 -0
- package/components/input/demo/event.md +0 -1
- package/components/input/inputBox.jsx +1 -1
- package/components/inputNumber/styles/index.less +2 -2
- package/components/layout/demo/layout5.md +0 -1
- package/components/loading/loading.jsx +5 -21
- package/components/modal/styles/index.less +1 -0
- package/components/page/demo/basic.md +3 -3
- package/components/page/demo/size.md +4 -4
- package/components/page/demo/sizer-elevator.md +6 -6
- package/components/page/index.md +1 -1
- package/components/page/page.jsx +8 -8
- package/components/progress/progress.jsx +23 -5
- package/components/progress/styles/index.less +7 -6
- package/components/select/demo/theme.md +2 -1
- package/components/select/select.jsx +1 -1
- package/components/select/styles/index.less +1 -1
- package/components/slider/demo/formatter.md +8 -9
- package/components/slider/slider.jsx +3 -4
- package/components/slider/thumb.jsx +4 -3
- package/components/space/demo/compact.md +9 -9
- package/components/statCard/countup.jsx +8 -0
- package/components/statCard/demo/card.md +2 -2
- package/components/statCard/index.md +12 -7
- package/components/statCard/statCard.jsx +12 -0
- package/components/styles/less-css-var.less +4 -0
- package/components/styles/less-var.less +1 -1
- package/components/table/table.jsx +1 -1
- package/components/tabs/styles/index.less +2 -2
- package/dist/k-ui.cjs.js +2 -2
- package/dist/k-ui.css +2 -2
- package/dist/k-ui.d.ts +183 -179
- package/dist/k-ui.esm.js +2 -2
- package/dist/k-ui.umd.js +2 -2
- package/dist/locale/de.js +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/ua.js +2 -2
- package/dist/locale/uk.js +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/zh-CN.js +1 -1
- package/dist/locale/zh-TW.js +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +16 -16
- package/types/page/Page.d.ts +1 -1
- package/types/slider/Slider.d.ts +1 -0
- package/types/statCard/StatCard.d.ts +3 -0
- package/types/table/Table.d.ts +1 -1
|
@@ -39,29 +39,8 @@
|
|
|
39
39
|
background-color: var(--kui-color-bg-component);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.k-image-preview-mask {
|
|
43
|
-
opacity: 0;
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
justify-content: center;
|
|
47
|
-
position: absolute;
|
|
48
|
-
width: 100%;
|
|
49
|
-
height: 100%;
|
|
50
|
-
left: 0;
|
|
51
|
-
top: 0;
|
|
52
|
-
font-size: 14px;
|
|
53
|
-
background-color: var(--kui-color-mask);
|
|
54
|
-
gap: 10px;
|
|
55
|
-
cursor: pointer;
|
|
56
|
-
transition: opacity 0.3s cubic-bezier(0.39, 0.575, 0.565, 1);
|
|
57
|
-
color: #fff;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
42
|
&:hover {
|
|
61
|
-
|
|
62
|
-
opacity: 1;
|
|
63
|
-
cursor: zoom-in;
|
|
64
|
-
}
|
|
43
|
+
cursor: zoom-in;
|
|
65
44
|
}
|
|
66
45
|
}
|
|
67
46
|
|
|
@@ -73,216 +52,233 @@
|
|
|
73
52
|
left: 0;
|
|
74
53
|
z-index: 1001;
|
|
75
54
|
display: flex;
|
|
55
|
+
}
|
|
76
56
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
57
|
+
.k-image-preview-mask {
|
|
58
|
+
position: fixed;
|
|
59
|
+
top: 0;
|
|
60
|
+
right: 0;
|
|
61
|
+
bottom: 0;
|
|
62
|
+
left: 0;
|
|
63
|
+
z-index: 1001;
|
|
64
|
+
height: 100%;
|
|
65
|
+
background-color: var(--kui-color-mask);
|
|
66
|
+
}
|
|
87
67
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
.k-image-preview-control {
|
|
102
|
-
position: absolute;
|
|
103
|
-
background-color: var(--kui-color-bg-pop);
|
|
104
|
-
border: 1px solid var(--kui-color-pop-border);
|
|
105
|
-
box-shadow: var(--kui-pop-shadow);
|
|
106
|
-
|
|
107
|
-
display: flex;
|
|
108
|
-
padding: 10px;
|
|
109
|
-
position: absolute;
|
|
110
|
-
left: 50%;
|
|
111
|
-
transform: translate(-50%);
|
|
112
|
-
bottom: 20px;
|
|
113
|
-
pointer-events: auto;
|
|
114
|
-
z-index: 1;
|
|
115
|
-
flex-direction: row-reverse;
|
|
116
|
-
list-style: none;
|
|
117
|
-
align-items: center;
|
|
118
|
-
justify-content: center;
|
|
119
|
-
margin: 0;
|
|
120
|
-
gap: 5px 10px;
|
|
121
|
-
border-radius: 12px;
|
|
122
|
-
line-height: 1;
|
|
123
|
-
.k-image-preview-action {
|
|
124
|
-
line-height: 1;
|
|
125
|
-
display: flex;
|
|
126
|
-
font-size: 20px;
|
|
127
|
-
color: var(--kui-color-text);
|
|
128
|
-
padding: 5px;
|
|
129
|
-
&:not(.k-image-preview-action-disabled, .k-image-preview-action-scale) {
|
|
130
|
-
&:hover {
|
|
131
|
-
color: var(--kui-color-primary);
|
|
132
|
-
background-color: var(--kui-color-bg-component-hover);
|
|
133
|
-
border-radius: 5px;
|
|
134
|
-
}
|
|
135
|
-
&:active {
|
|
136
|
-
background-color: var(--kui-color-bg-component-active);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
path {
|
|
141
|
-
stroke-width: 40px !important;
|
|
142
|
-
}
|
|
143
|
-
.k-image-preview-action-scale {
|
|
144
|
-
width: 150px;
|
|
145
|
-
padding: 0;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.k-image-preview-action-divider {
|
|
149
|
-
width: 1px;
|
|
150
|
-
height: 0.9em;
|
|
151
|
-
vertical-align: middle;
|
|
152
|
-
border-width: 1px 0 0;
|
|
153
|
-
background-color: var(--kui-color-border);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.k-image-preview-action-rotate-left .k-icon {
|
|
157
|
-
transform: rotateY(-180deg) rotate(45deg);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.k-image-preview-action-rotate-right .k-icon {
|
|
161
|
-
transform: rotate(45deg);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.k-image-preview-action-disabled {
|
|
165
|
-
opacity: 0.6;
|
|
166
|
-
cursor: not-allowed;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
68
|
+
.k-image-preview-wrap {
|
|
69
|
+
position: absolute;
|
|
70
|
+
top: 0;
|
|
71
|
+
right: 0;
|
|
72
|
+
bottom: 0;
|
|
73
|
+
left: 0;
|
|
74
|
+
flex: 1;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
outline: 0;
|
|
77
|
+
z-index: 1002;
|
|
78
|
+
pointer-events: none;
|
|
79
|
+
transition: all 0.3s;
|
|
80
|
+
}
|
|
169
81
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
color: var(--kui-color-text);
|
|
176
|
-
font-size: 25px;
|
|
177
|
-
border-radius: 50%;
|
|
178
|
-
background-color: var(--kui-color-bg);
|
|
179
|
-
display: flex;
|
|
180
|
-
align-items: center;
|
|
181
|
-
justify-content: center;
|
|
182
|
-
z-index: 1;
|
|
183
|
-
top: 50%;
|
|
184
|
-
pointer-events: auto;
|
|
185
|
-
cursor: pointer;
|
|
186
|
-
}
|
|
82
|
+
.k-image-preview-control {
|
|
83
|
+
position: absolute;
|
|
84
|
+
background-color: var(--kui-color-bg-pop);
|
|
85
|
+
border: 1px solid var(--kui-color-pop-border);
|
|
86
|
+
box-shadow: var(--kui-pop-shadow);
|
|
187
87
|
|
|
188
|
-
|
|
189
|
-
|
|
88
|
+
display: flex;
|
|
89
|
+
padding: 10px;
|
|
90
|
+
position: absolute;
|
|
91
|
+
left: 50%;
|
|
92
|
+
transform: translate(-50%);
|
|
93
|
+
bottom: 20px;
|
|
94
|
+
pointer-events: auto;
|
|
95
|
+
z-index: 1;
|
|
96
|
+
flex-direction: row;
|
|
97
|
+
list-style: none;
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
margin: 0;
|
|
101
|
+
gap: 5px 10px;
|
|
102
|
+
border-radius: 12px;
|
|
103
|
+
line-height: 1;
|
|
104
|
+
path {
|
|
105
|
+
stroke-width: 40px !important;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
.k-image-preview-action {
|
|
109
|
+
line-height: 1;
|
|
110
|
+
display: flex;
|
|
111
|
+
font-size: 20px;
|
|
112
|
+
color: var(--kui-color-text);
|
|
113
|
+
padding: 5px;
|
|
114
|
+
&:not(.k-image-preview-action-disabled, .k-image-preview-action-scale) {
|
|
115
|
+
&:hover {
|
|
116
|
+
color: var(--kui-color-primary);
|
|
117
|
+
background-color: var(--kui-color-bg-component-hover);
|
|
118
|
+
border-radius: 5px;
|
|
190
119
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
right: 10px;
|
|
120
|
+
&:active {
|
|
121
|
+
background-color: var(--kui-color-bg-component-active);
|
|
194
122
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
.k-image-preview-action-nav {
|
|
126
|
+
display: inline-flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
gap: 5px;
|
|
129
|
+
.k-btn {
|
|
130
|
+
width: 20px;
|
|
131
|
+
.k-icon {
|
|
132
|
+
font-size: 20px;
|
|
199
133
|
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
200
136
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
137
|
+
.k-image-preview-action-scale {
|
|
138
|
+
width: 150px;
|
|
139
|
+
padding: 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.k-image-preview-action-divider {
|
|
143
|
+
width: 1px;
|
|
144
|
+
height: 0.9em;
|
|
145
|
+
vertical-align: middle;
|
|
146
|
+
border-width: 1px 0 0;
|
|
147
|
+
background-color: var(--kui-color-border);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.k-image-preview-action-rotate-left .k-icon {
|
|
151
|
+
transform: rotateY(-180deg) rotate(45deg);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.k-image-preview-action-rotate-right .k-icon {
|
|
155
|
+
transform: rotate(45deg);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.k-image-preview-action-disabled {
|
|
159
|
+
opacity: 0.6;
|
|
160
|
+
cursor: not-allowed;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.k-image-preview-switch-left,
|
|
164
|
+
.k-image-preview-switch-right {
|
|
165
|
+
position: absolute;
|
|
166
|
+
width: 44px;
|
|
167
|
+
height: 44px;
|
|
168
|
+
color: var(--kui-color-text);
|
|
169
|
+
font-size: 25px;
|
|
170
|
+
border-radius: 50%;
|
|
171
|
+
background-color: var(--kui-color-bg);
|
|
172
|
+
display: flex;
|
|
173
|
+
align-items: center;
|
|
174
|
+
justify-content: center;
|
|
175
|
+
z-index: 1;
|
|
176
|
+
top: 50%;
|
|
177
|
+
pointer-events: auto;
|
|
178
|
+
cursor: pointer;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.k-image-preview-switch-left {
|
|
182
|
+
left: 10px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.k-image-preview-switch-right {
|
|
186
|
+
right: 10px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.k-image-preview-switch-disabled {
|
|
190
|
+
cursor: not-allowed;
|
|
191
|
+
opacity: 0.6;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.k-image-preview-img-wrap {
|
|
195
|
+
position: absolute;
|
|
196
|
+
top: 0;
|
|
197
|
+
right: 0;
|
|
198
|
+
bottom: 0;
|
|
199
|
+
left: 0;
|
|
200
|
+
transition: transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1) 0s;
|
|
201
|
+
text-align: center;
|
|
202
|
+
pointer-events: none;
|
|
203
|
+
|
|
204
|
+
&::before {
|
|
205
|
+
display: inline-block;
|
|
206
|
+
width: 0;
|
|
207
|
+
height: 50%;
|
|
208
|
+
content: "";
|
|
250
209
|
}
|
|
251
210
|
|
|
252
|
-
.k-image-preview-
|
|
253
|
-
|
|
211
|
+
.k-image-preview-img {
|
|
212
|
+
vertical-align: middle;
|
|
213
|
+
-webkit-user-select: none;
|
|
214
|
+
user-select: none;
|
|
215
|
+
pointer-events: auto;
|
|
216
|
+
cursor: grab;
|
|
217
|
+
transition: transform 0.3s ease-in-out;
|
|
218
|
+
max-width: 100%;
|
|
219
|
+
max-height: 100%;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
video.k-image-preview-img {
|
|
223
|
+
max-height: calc(100vh - 130px);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.k-image-preview-img-error {
|
|
227
|
+
pointer-events: auto;
|
|
228
|
+
width: 60%;
|
|
229
|
+
height: 50%;
|
|
254
230
|
position: absolute;
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
.k-image-preview-panel-action {
|
|
267
|
-
position: absolute;
|
|
268
|
-
left: 0;
|
|
269
|
-
top: 50%;
|
|
270
|
-
background-color: var(--kui-color-mask);
|
|
271
|
-
border-radius: 0 5px 5px 0;
|
|
272
|
-
padding: 15px 0;
|
|
273
|
-
color: #fff;
|
|
274
|
-
cursor: pointer;
|
|
275
|
-
|
|
276
|
-
.k-icon {
|
|
277
|
-
transform: rotate(90deg);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
231
|
+
top: 50%;
|
|
232
|
+
left: 50%;
|
|
233
|
+
transform: translateX(-50%) translateY(-50%);
|
|
234
|
+
color: var(--kui-color-text-disabled);
|
|
235
|
+
font-size: 50px;
|
|
236
|
+
text-align: center;
|
|
237
|
+
display: flex;
|
|
238
|
+
justify-content: center;
|
|
239
|
+
border-radius: var(--kui-border-radius);
|
|
240
|
+
align-items: center;
|
|
280
241
|
}
|
|
242
|
+
}
|
|
281
243
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
244
|
+
.k-image-preview-panel {
|
|
245
|
+
background-color: var(--kui-color-bg-layout);
|
|
246
|
+
position: absolute;
|
|
247
|
+
max-width: 512px;
|
|
248
|
+
top: 0;
|
|
249
|
+
right: 0;
|
|
250
|
+
bottom: 0;
|
|
251
|
+
padding: 20px;
|
|
252
|
+
z-index: 1002;
|
|
253
|
+
transform: translateX(0);
|
|
254
|
+
opacity: 1;
|
|
255
|
+
transition: all 0.3s;
|
|
256
|
+
color: var(--kui-color-text);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.k-image-preview-panel-action {
|
|
260
|
+
position: absolute;
|
|
261
|
+
left: 0;
|
|
262
|
+
top: 50%;
|
|
263
|
+
background-color: var(--kui-color-bg-component);
|
|
264
|
+
border-radius: 0 5px 5px 0;
|
|
265
|
+
padding: 15px 0;
|
|
266
|
+
cursor: pointer;
|
|
267
|
+
&:hover {
|
|
268
|
+
background-color: var(--kui-color-bg-component-hover);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
&:active {
|
|
272
|
+
background-color: var(--kui-color-bg-component-active);
|
|
285
273
|
}
|
|
274
|
+
.k-icon {
|
|
275
|
+
transform: rotate(90deg);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.k-image-preview-panel-hidden {
|
|
280
|
+
transform: translateX(100%);
|
|
281
|
+
opacity: 0;
|
|
286
282
|
}
|
|
287
283
|
|
|
288
284
|
.k-image-panel-enter-active,
|
|
@@ -296,10 +292,9 @@
|
|
|
296
292
|
flex-wrap: wrap;
|
|
297
293
|
}
|
|
298
294
|
|
|
299
|
-
@keyframes k-image-
|
|
295
|
+
@keyframes k-image-fade {
|
|
300
296
|
from {
|
|
301
297
|
opacity: 0;
|
|
302
|
-
transform: scale3d(0.3, 0.3, 0) translateZ(0);
|
|
303
298
|
}
|
|
304
299
|
|
|
305
300
|
to {
|
|
@@ -307,12 +302,12 @@
|
|
|
307
302
|
}
|
|
308
303
|
}
|
|
309
304
|
|
|
310
|
-
.k-image-
|
|
311
|
-
animation: k-image-
|
|
305
|
+
.k-image-fade-enter-active {
|
|
306
|
+
animation: k-image-fade 0.4s linear;
|
|
312
307
|
}
|
|
313
308
|
|
|
314
|
-
.k-image-
|
|
315
|
-
animation: k-image-
|
|
309
|
+
.k-image-fade-leave-active {
|
|
310
|
+
animation: k-image-fade 0.4s linear reverse;
|
|
316
311
|
}
|
|
317
312
|
|
|
318
313
|
.k-image-preview-loading {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const loadImage = (src, callback, err) => {
|
|
2
|
+
if (!src) return;
|
|
3
|
+
|
|
4
|
+
let image = new Image();
|
|
5
|
+
let isCompleted = false;
|
|
6
|
+
|
|
7
|
+
const cleanup = () => {
|
|
8
|
+
if (isCompleted) return;
|
|
9
|
+
isCompleted = true;
|
|
10
|
+
image.onload = null;
|
|
11
|
+
image.onerror = null;
|
|
12
|
+
image = null;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
image.onload = () => {
|
|
16
|
+
if (!isCompleted) {
|
|
17
|
+
const { width, height } = image;
|
|
18
|
+
callback && callback({ width, height });
|
|
19
|
+
}
|
|
20
|
+
cleanup();
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
image.onerror = () => {
|
|
24
|
+
if (!isCompleted) {
|
|
25
|
+
err && err();
|
|
26
|
+
}
|
|
27
|
+
cleanup();
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
image.src = src;
|
|
31
|
+
};
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
&:first-child {
|
|
73
|
-
border-top-right-radius: var(--kui-border-radius);
|
|
73
|
+
// border-top-right-radius: var(--kui-border-radius);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
&:last-child {
|
|
77
77
|
border-top: 1px solid var(--kui-color-border);
|
|
78
|
-
border-bottom-right-radius: var(--kui-border-radius);
|
|
78
|
+
// border-bottom-right-radius: var(--kui-border-radius);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -92,11 +92,12 @@ const loading = defineComponent({
|
|
|
92
92
|
},
|
|
93
93
|
});
|
|
94
94
|
const createInstance = (props = {}, context) => {
|
|
95
|
-
const container = document.createElement("div");
|
|
96
|
-
|
|
95
|
+
// const container = document.createElement("div");
|
|
96
|
+
// container.id = `k-loading-box`;
|
|
97
|
+
// document.body.appendChild(container);
|
|
97
98
|
|
|
98
99
|
const vm = createVNode(loading, props, context);
|
|
99
|
-
render(vm,
|
|
100
|
+
render(vm, document.body);
|
|
100
101
|
return vm;
|
|
101
102
|
// return vm.component?.exposed; //for 3
|
|
102
103
|
};
|
|
@@ -125,10 +126,8 @@ let Loading = {
|
|
|
125
126
|
destroy() {
|
|
126
127
|
if (loadInstance) {
|
|
127
128
|
loadInstance.destroy();
|
|
129
|
+
document.body.removeChild(loadInstance.$el);
|
|
128
130
|
loadInstance = null;
|
|
129
|
-
document.body.removeChild(
|
|
130
|
-
document.querySelector(".k-loading-wrap")?.parentNode
|
|
131
|
-
);
|
|
132
131
|
}
|
|
133
132
|
},
|
|
134
133
|
install(app) {
|
|
@@ -137,20 +136,5 @@ let Loading = {
|
|
|
137
136
|
// app.config.globalProperties.$loading = Loading; //for 3
|
|
138
137
|
app.prototype.$loading = Loading;
|
|
139
138
|
},
|
|
140
|
-
useLoading() {
|
|
141
|
-
const instance = getCurrentInstance();
|
|
142
|
-
const proxy = instance ? instance.proxy : null;
|
|
143
|
-
const loadingWrapper = {};
|
|
144
|
-
|
|
145
|
-
["start", "finish", "error", "update"].forEach((type) => {
|
|
146
|
-
loadingWrapper[type] = (props = {}) => {
|
|
147
|
-
return getInstance(null, proxy);
|
|
148
|
-
};
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
loadingWrapper.destroy = Loading.destroy;
|
|
152
|
-
|
|
153
|
-
return loadingWrapper;
|
|
154
|
-
},
|
|
155
139
|
};
|
|
156
140
|
export default withInstall(Loading);
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
<template>
|
|
8
8
|
<Space vertical>
|
|
9
9
|
<Page
|
|
10
|
-
v-model:
|
|
10
|
+
v-model:page="page"
|
|
11
11
|
v-model:pageSize="size"
|
|
12
12
|
:total="50"
|
|
13
13
|
@change="onChange"
|
|
14
14
|
/>
|
|
15
15
|
<Page
|
|
16
|
-
v-model:
|
|
16
|
+
v-model:page="page"
|
|
17
17
|
v-model:pageSize="size"
|
|
18
18
|
:total="50"
|
|
19
19
|
@change="onChange"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<script setup>
|
|
25
25
|
import { ref } from "vue";
|
|
26
26
|
import { message } from "kui-vue";
|
|
27
|
-
const
|
|
27
|
+
const page = ref(1);
|
|
28
28
|
const size = ref(15);
|
|
29
29
|
const onChange = (page, pageSize) => {
|
|
30
30
|
console.log(page, pageSize);
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
8
|
<Space vertical>
|
|
9
|
-
<Page :
|
|
10
|
-
<Page :
|
|
9
|
+
<Page :page="page" :total="50" size="small" />
|
|
10
|
+
<Page :page="page" :total="50" size="small" show-sizer />
|
|
11
11
|
<Page
|
|
12
|
-
:
|
|
12
|
+
:page="page"
|
|
13
13
|
:total="50"
|
|
14
14
|
size="small"
|
|
15
15
|
show-elevator
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
</template>
|
|
20
20
|
<script setup>
|
|
21
21
|
import { ref } from "vue";
|
|
22
|
-
const
|
|
22
|
+
const page = ref(1);
|
|
23
23
|
</script>
|
|
24
24
|
```
|