@veltra/desktop 1.1.6 → 1.1.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/dist/components/action/action.vue.d.ts +1 -1
- package/dist/components/button/button.vue.d.ts +1 -1
- package/dist/components/button/style2.css +57 -45
- package/dist/components/cascade/cascade.vue.d.ts +4 -4
- package/dist/components/cascade/style2.css +2 -1
- package/dist/components/checkbox/checkbox-button.vue.d.ts +1 -1
- package/dist/components/checkbox/style2.css +2 -2
- package/dist/components/checkbox-group/checkbox-group.vue.d.ts +2 -2
- package/dist/components/collapse/collapse.vue.d.ts +1 -1
- package/dist/components/date-picker/date-picker.vue.d.ts +1 -1
- package/dist/components/date-range-picker/date-range-picker.vue.d.ts +1 -1
- package/dist/components/drawer/drawer.vue.d.ts +2 -2
- package/dist/components/expression-editor/style2.css +4 -4
- package/dist/components/file-viewer/file-viewer.vue.d.ts +1 -1
- package/dist/components/file-viewer/previewers/image-previewer.js +2 -2
- package/dist/components/file-viewer/previewers/image-previewer.js.map +1 -1
- package/dist/components/file-viewer/previewers/pdf-previewer.js +2 -2
- package/dist/components/file-viewer/previewers/pdf-previewer.js.map +1 -1
- package/dist/components/file-viewer/previewers/video-previewer.js +2 -2
- package/dist/components/file-viewer/previewers/video-previewer.js.map +1 -1
- package/dist/components/message-confirm/style2.css +3 -1
- package/dist/components/multi-select/multi-select.vue.d.ts +3 -3
- package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +3 -3
- package/dist/components/notification/style2.css +1 -1
- package/dist/components/paginator/style2.css +4 -3
- package/dist/components/progress-nodes/progress-nodes.vue.d.ts +2 -2
- package/dist/components/radio-group/radio-group.vue.d.ts +2 -2
- package/dist/components/select/select.vue.d.ts +2 -2
- package/dist/components/tabs/style2.css +3 -3
- package/dist/components/tabs/tabs-horizontal.vue.d.ts +4 -4
- package/dist/components/tabs/tabs-vertical.vue.d.ts +4 -4
- package/dist/components/tabs/tabs.vue.d.ts +4 -4
- package/dist/components/tag/style2.css +35 -35
- package/dist/components/tree/style2.css +2 -2
- package/dist/components/tree/tree.vue.d.ts +1 -1
- package/dist/components/tree-select/tree-select.vue.d.ts +3 -3
- package/package.json +11 -11
- package/src/components/auto-complete/style.scss +3 -1
- package/src/components/button/style.scss +37 -9
- package/src/components/cascade/style.scss +9 -2
- package/src/components/checkbox/style.scss +2 -2
- package/src/components/code-editor/style.scss +5 -2
- package/src/components/date-range-picker/style.scss +3 -1
- package/src/components/expression-editor/style.scss +12 -4
- package/src/components/file-viewer/previewers/image-previewer.vue +2 -2
- package/src/components/file-viewer/previewers/pdf-previewer.vue +2 -2
- package/src/components/file-viewer/previewers/video-previewer.vue +2 -2
- package/src/components/message-confirm/style.scss +3 -1
- package/src/components/multi-select/style.scss +3 -1
- package/src/components/multi-tree-select/style.scss +3 -1
- package/src/components/notification/style.scss +1 -1
- package/src/components/paginator/style.scss +12 -3
- package/src/components/tabs/style.scss +2 -2
- package/src/components/tag/style.scss +5 -5
- package/src/components/textarea/style.scss +3 -1
- package/src/components/tree/style.scss +6 -2
|
@@ -19,8 +19,8 @@ declare const __VLS_base: _$vue.DefineComponent<ActionProps, {}, {}, {}, {}, _$v
|
|
|
19
19
|
size: _$_veltra_utils0.ComponentSize;
|
|
20
20
|
text: boolean;
|
|
21
21
|
circle: boolean;
|
|
22
|
-
inDropdown: boolean;
|
|
23
22
|
loading: boolean;
|
|
23
|
+
inDropdown: boolean;
|
|
24
24
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
25
25
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
26
|
declare const _default: typeof __VLS_export;
|
|
@@ -12,8 +12,8 @@ declare const __VLS_base: _$vue.DefineComponent<ButtonProps, _ButtonExposed, {},
|
|
|
12
12
|
onClick?: ((e: MouseEvent) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
14
|
disabled: boolean;
|
|
15
|
-
iconPosition: "left" | "right";
|
|
16
15
|
loadingIcon: _$vue.Component;
|
|
16
|
+
iconPosition: "left" | "right";
|
|
17
17
|
propagate: boolean;
|
|
18
18
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
*/
|
|
17
17
|
/** 暗色:data-theme 与系统偏好,与 UITheme.injectBuiltInThemes 选择器策略一致 */
|
|
18
18
|
.u-button {
|
|
19
|
-
color: var(--u-text-color-main);
|
|
19
|
+
color: var(--u-button-default-color, var(--u-text-color-main));
|
|
20
|
+
box-sizing: border-box;
|
|
20
21
|
line-height: 1;
|
|
21
22
|
outline: none;
|
|
22
23
|
text-decoration: none;
|
|
@@ -26,8 +27,8 @@
|
|
|
26
27
|
cursor: pointer;
|
|
27
28
|
padding: 0 0.8em;
|
|
28
29
|
-webkit-appearance: none;
|
|
29
|
-
border:
|
|
30
|
-
background-color: var(--u-color-default);
|
|
30
|
+
border: 1px solid var(--u-button-default-border, transparent);
|
|
31
|
+
background-color: var(--u-button-default-bg, var(--u-color-default));
|
|
31
32
|
box-shadow: var(--u-shadow-emboss);
|
|
32
33
|
transition: background-color 0.25s, box-shadow 0.2s;
|
|
33
34
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
@@ -38,6 +39,10 @@
|
|
|
38
39
|
align-items: center;
|
|
39
40
|
flex-wrap: nowrap;
|
|
40
41
|
}
|
|
42
|
+
.u-button:hover {
|
|
43
|
+
background-color: var(--u-button-default-hover-bg, var(--u-color-default-dark-1));
|
|
44
|
+
border-color: var(--u-button-default-hover-border, transparent);
|
|
45
|
+
}
|
|
41
46
|
.u-button:active {
|
|
42
47
|
box-shadow: none;
|
|
43
48
|
}
|
|
@@ -104,10 +109,11 @@
|
|
|
104
109
|
}
|
|
105
110
|
.u-button--color-primary {
|
|
106
111
|
background-color: var(--u-color-primary);
|
|
107
|
-
color: var(--u-text-color-white);
|
|
112
|
+
color: var(--u-button-primary-text-color, var(--u-text-color-white));
|
|
108
113
|
}
|
|
109
114
|
.u-button--color-primary:hover {
|
|
110
|
-
background-color: var(--u-color-primary-dark-1);
|
|
115
|
+
background-color: var(--u-button-primary-hover-bg, var(--u-color-primary-dark-1));
|
|
116
|
+
color: var(--u-button-primary-hover-color, var(--u-button-primary-text-color, var(--u-text-color-white)));
|
|
111
117
|
}
|
|
112
118
|
.u-button--color-primary.is-disabled {
|
|
113
119
|
background-color: var(--u-color-primary-light-5);
|
|
@@ -129,7 +135,7 @@
|
|
|
129
135
|
box-shadow: 0px 0px 0px 1px var(--u-color-primary);
|
|
130
136
|
}
|
|
131
137
|
.u-button--color-primary.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-primary.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
132
|
-
background-color: var(--u-color-primary-light-9);
|
|
138
|
+
background-color: var(--u-button-primary-plain-bg, var(--u-color-primary-light-9));
|
|
133
139
|
}
|
|
134
140
|
.u-button--color-primary.is-text.is-disabled {
|
|
135
141
|
color: var(--u-color-primary-light-5);
|
|
@@ -138,9 +144,9 @@
|
|
|
138
144
|
color: var(--u-color-primary-light-5);
|
|
139
145
|
}
|
|
140
146
|
.u-button--color-primary.is-plain {
|
|
141
|
-
color: var(--u-color-primary);
|
|
142
|
-
background-color: var(--u-color-primary-light-9);
|
|
143
|
-
box-shadow: 0px 0px 2px 1px var(--u-color-primary-light-5);
|
|
147
|
+
color: var(--u-button-primary-plain-color, var(--u-color-primary));
|
|
148
|
+
background-color: var(--u-button-primary-plain-bg, var(--u-color-primary-light-9));
|
|
149
|
+
box-shadow: 0px 0px 2px 1px var(--u-button-primary-plain-shadow, var(--u-color-primary-light-5));
|
|
144
150
|
}
|
|
145
151
|
.u-button--color-primary.is-plain:active {
|
|
146
152
|
box-shadow: none;
|
|
@@ -154,10 +160,11 @@
|
|
|
154
160
|
}
|
|
155
161
|
.u-button--color-success {
|
|
156
162
|
background-color: var(--u-color-success);
|
|
157
|
-
color: var(--u-text-color-white);
|
|
163
|
+
color: var(--u-button-success-text-color, var(--u-text-color-white));
|
|
158
164
|
}
|
|
159
165
|
.u-button--color-success:hover {
|
|
160
|
-
background-color: var(--u-color-success-dark-1);
|
|
166
|
+
background-color: var(--u-button-success-hover-bg, var(--u-color-success-dark-1));
|
|
167
|
+
color: var(--u-button-success-hover-color, var(--u-button-success-text-color, var(--u-text-color-white)));
|
|
161
168
|
}
|
|
162
169
|
.u-button--color-success.is-disabled {
|
|
163
170
|
background-color: var(--u-color-success-light-5);
|
|
@@ -179,7 +186,7 @@
|
|
|
179
186
|
box-shadow: 0px 0px 0px 1px var(--u-color-success);
|
|
180
187
|
}
|
|
181
188
|
.u-button--color-success.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-success.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
182
|
-
background-color: var(--u-color-success-light-9);
|
|
189
|
+
background-color: var(--u-button-success-plain-bg, var(--u-color-success-light-9));
|
|
183
190
|
}
|
|
184
191
|
.u-button--color-success.is-text.is-disabled {
|
|
185
192
|
color: var(--u-color-success-light-5);
|
|
@@ -188,9 +195,9 @@
|
|
|
188
195
|
color: var(--u-color-success-light-5);
|
|
189
196
|
}
|
|
190
197
|
.u-button--color-success.is-plain {
|
|
191
|
-
color: var(--u-color-success);
|
|
192
|
-
background-color: var(--u-color-success-light-9);
|
|
193
|
-
box-shadow: 0px 0px 2px 1px var(--u-color-success-light-5);
|
|
198
|
+
color: var(--u-button-success-plain-color, var(--u-color-success));
|
|
199
|
+
background-color: var(--u-button-success-plain-bg, var(--u-color-success-light-9));
|
|
200
|
+
box-shadow: 0px 0px 2px 1px var(--u-button-success-plain-shadow, var(--u-color-success-light-5));
|
|
194
201
|
}
|
|
195
202
|
.u-button--color-success.is-plain:active {
|
|
196
203
|
box-shadow: none;
|
|
@@ -204,10 +211,11 @@
|
|
|
204
211
|
}
|
|
205
212
|
.u-button--color-warning {
|
|
206
213
|
background-color: var(--u-color-warning);
|
|
207
|
-
color: var(--u-text-color-white);
|
|
214
|
+
color: var(--u-button-warning-text-color, var(--u-text-color-white));
|
|
208
215
|
}
|
|
209
216
|
.u-button--color-warning:hover {
|
|
210
|
-
background-color: var(--u-color-warning-dark-1);
|
|
217
|
+
background-color: var(--u-button-warning-hover-bg, var(--u-color-warning-dark-1));
|
|
218
|
+
color: var(--u-button-warning-hover-color, var(--u-button-warning-text-color, var(--u-text-color-white)));
|
|
211
219
|
}
|
|
212
220
|
.u-button--color-warning.is-disabled {
|
|
213
221
|
background-color: var(--u-color-warning-light-5);
|
|
@@ -229,7 +237,7 @@
|
|
|
229
237
|
box-shadow: 0px 0px 0px 1px var(--u-color-warning);
|
|
230
238
|
}
|
|
231
239
|
.u-button--color-warning.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-warning.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
232
|
-
background-color: var(--u-color-warning-light-9);
|
|
240
|
+
background-color: var(--u-button-warning-plain-bg, var(--u-color-warning-light-9));
|
|
233
241
|
}
|
|
234
242
|
.u-button--color-warning.is-text.is-disabled {
|
|
235
243
|
color: var(--u-color-warning-light-5);
|
|
@@ -238,9 +246,9 @@
|
|
|
238
246
|
color: var(--u-color-warning-light-5);
|
|
239
247
|
}
|
|
240
248
|
.u-button--color-warning.is-plain {
|
|
241
|
-
color: var(--u-color-warning);
|
|
242
|
-
background-color: var(--u-color-warning-light-9);
|
|
243
|
-
box-shadow: 0px 0px 2px 1px var(--u-color-warning-light-5);
|
|
249
|
+
color: var(--u-button-warning-plain-color, var(--u-color-warning));
|
|
250
|
+
background-color: var(--u-button-warning-plain-bg, var(--u-color-warning-light-9));
|
|
251
|
+
box-shadow: 0px 0px 2px 1px var(--u-button-warning-plain-shadow, var(--u-color-warning-light-5));
|
|
244
252
|
}
|
|
245
253
|
.u-button--color-warning.is-plain:active {
|
|
246
254
|
box-shadow: none;
|
|
@@ -254,10 +262,11 @@
|
|
|
254
262
|
}
|
|
255
263
|
.u-button--color-danger {
|
|
256
264
|
background-color: var(--u-color-danger);
|
|
257
|
-
color: var(--u-text-color-white);
|
|
265
|
+
color: var(--u-button-danger-text-color, var(--u-text-color-white));
|
|
258
266
|
}
|
|
259
267
|
.u-button--color-danger:hover {
|
|
260
|
-
background-color: var(--u-color-danger-dark-1);
|
|
268
|
+
background-color: var(--u-button-danger-hover-bg, var(--u-color-danger-dark-1));
|
|
269
|
+
color: var(--u-button-danger-hover-color, var(--u-button-danger-text-color, var(--u-text-color-white)));
|
|
261
270
|
}
|
|
262
271
|
.u-button--color-danger.is-disabled {
|
|
263
272
|
background-color: var(--u-color-danger-light-5);
|
|
@@ -279,7 +288,7 @@
|
|
|
279
288
|
box-shadow: 0px 0px 0px 1px var(--u-color-danger);
|
|
280
289
|
}
|
|
281
290
|
.u-button--color-danger.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-danger.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
282
|
-
background-color: var(--u-color-danger-light-9);
|
|
291
|
+
background-color: var(--u-button-danger-plain-bg, var(--u-color-danger-light-9));
|
|
283
292
|
}
|
|
284
293
|
.u-button--color-danger.is-text.is-disabled {
|
|
285
294
|
color: var(--u-color-danger-light-5);
|
|
@@ -288,9 +297,9 @@
|
|
|
288
297
|
color: var(--u-color-danger-light-5);
|
|
289
298
|
}
|
|
290
299
|
.u-button--color-danger.is-plain {
|
|
291
|
-
color: var(--u-color-danger);
|
|
292
|
-
background-color: var(--u-color-danger-light-9);
|
|
293
|
-
box-shadow: 0px 0px 2px 1px var(--u-color-danger-light-5);
|
|
300
|
+
color: var(--u-button-danger-plain-color, var(--u-color-danger));
|
|
301
|
+
background-color: var(--u-button-danger-plain-bg, var(--u-color-danger-light-9));
|
|
302
|
+
box-shadow: 0px 0px 2px 1px var(--u-button-danger-plain-shadow, var(--u-color-danger-light-5));
|
|
294
303
|
}
|
|
295
304
|
.u-button--color-danger.is-plain:active {
|
|
296
305
|
box-shadow: none;
|
|
@@ -304,10 +313,11 @@
|
|
|
304
313
|
}
|
|
305
314
|
.u-button--color-info {
|
|
306
315
|
background-color: var(--u-color-info);
|
|
307
|
-
color: var(--u-text-color-white);
|
|
316
|
+
color: var(--u-button-info-text-color, var(--u-text-color-white));
|
|
308
317
|
}
|
|
309
318
|
.u-button--color-info:hover {
|
|
310
|
-
background-color: var(--u-color-info-dark-1);
|
|
319
|
+
background-color: var(--u-button-info-hover-bg, var(--u-color-info-dark-1));
|
|
320
|
+
color: var(--u-button-info-hover-color, var(--u-button-info-text-color, var(--u-text-color-white)));
|
|
311
321
|
}
|
|
312
322
|
.u-button--color-info.is-disabled {
|
|
313
323
|
background-color: var(--u-color-info-light-5);
|
|
@@ -329,7 +339,7 @@
|
|
|
329
339
|
box-shadow: 0px 0px 0px 1px var(--u-color-info);
|
|
330
340
|
}
|
|
331
341
|
.u-button--color-info.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-info.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
332
|
-
background-color: var(--u-color-info-light-9);
|
|
342
|
+
background-color: var(--u-button-info-plain-bg, var(--u-color-info-light-9));
|
|
333
343
|
}
|
|
334
344
|
.u-button--color-info.is-text.is-disabled {
|
|
335
345
|
color: var(--u-color-info-light-5);
|
|
@@ -338,9 +348,9 @@
|
|
|
338
348
|
color: var(--u-color-info-light-5);
|
|
339
349
|
}
|
|
340
350
|
.u-button--color-info.is-plain {
|
|
341
|
-
color: var(--u-color-info);
|
|
342
|
-
background-color: var(--u-color-info-light-9);
|
|
343
|
-
box-shadow: 0px 0px 2px 1px var(--u-color-info-light-5);
|
|
351
|
+
color: var(--u-button-info-plain-color, var(--u-color-info));
|
|
352
|
+
background-color: var(--u-button-info-plain-bg, var(--u-color-info-light-9));
|
|
353
|
+
box-shadow: 0px 0px 2px 1px var(--u-button-info-plain-shadow, var(--u-color-info-light-5));
|
|
344
354
|
}
|
|
345
355
|
.u-button--color-info.is-plain:active {
|
|
346
356
|
box-shadow: none;
|
|
@@ -354,10 +364,11 @@
|
|
|
354
364
|
}
|
|
355
365
|
.u-button--color-disabled {
|
|
356
366
|
background-color: var(--u-color-disabled);
|
|
357
|
-
color: var(--u-text-color-white);
|
|
367
|
+
color: var(--u-button-disabled-text-color, var(--u-text-color-white));
|
|
358
368
|
}
|
|
359
369
|
.u-button--color-disabled:hover {
|
|
360
|
-
background-color: var(--u-color-disabled-dark-1);
|
|
370
|
+
background-color: var(--u-button-disabled-hover-bg, var(--u-color-disabled-dark-1));
|
|
371
|
+
color: var(--u-button-disabled-hover-color, var(--u-button-disabled-text-color, var(--u-text-color-white)));
|
|
361
372
|
}
|
|
362
373
|
.u-button--color-disabled.is-disabled {
|
|
363
374
|
background-color: var(--u-color-disabled-light-5);
|
|
@@ -379,7 +390,7 @@
|
|
|
379
390
|
box-shadow: 0px 0px 0px 1px var(--u-color-disabled);
|
|
380
391
|
}
|
|
381
392
|
.u-button--color-disabled.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-disabled.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
382
|
-
background-color: var(--u-color-disabled-light-9);
|
|
393
|
+
background-color: var(--u-button-disabled-plain-bg, var(--u-color-disabled-light-9));
|
|
383
394
|
}
|
|
384
395
|
.u-button--color-disabled.is-text.is-disabled {
|
|
385
396
|
color: var(--u-color-disabled-light-5);
|
|
@@ -388,9 +399,9 @@
|
|
|
388
399
|
color: var(--u-color-disabled-light-5);
|
|
389
400
|
}
|
|
390
401
|
.u-button--color-disabled.is-plain {
|
|
391
|
-
color: var(--u-color-disabled);
|
|
392
|
-
background-color: var(--u-color-disabled-light-9);
|
|
393
|
-
box-shadow: 0px 0px 2px 1px var(--u-color-disabled-light-5);
|
|
402
|
+
color: var(--u-button-disabled-plain-color, var(--u-color-disabled));
|
|
403
|
+
background-color: var(--u-button-disabled-plain-bg, var(--u-color-disabled-light-9));
|
|
404
|
+
box-shadow: 0px 0px 2px 1px var(--u-button-disabled-plain-shadow, var(--u-color-disabled-light-5));
|
|
394
405
|
}
|
|
395
406
|
.u-button--color-disabled.is-plain:active {
|
|
396
407
|
box-shadow: none;
|
|
@@ -404,10 +415,11 @@
|
|
|
404
415
|
}
|
|
405
416
|
.u-button--color-default {
|
|
406
417
|
background-color: var(--u-color-default);
|
|
407
|
-
color: var(--u-text-color-white);
|
|
418
|
+
color: var(--u-button-default-text-color, var(--u-text-color-white));
|
|
408
419
|
}
|
|
409
420
|
.u-button--color-default:hover {
|
|
410
|
-
background-color: var(--u-color-default-dark-1);
|
|
421
|
+
background-color: var(--u-button-default-hover-bg, var(--u-color-default-dark-1));
|
|
422
|
+
color: var(--u-button-default-hover-color, var(--u-button-default-text-color, var(--u-text-color-white)));
|
|
411
423
|
}
|
|
412
424
|
.u-button--color-default.is-disabled {
|
|
413
425
|
background-color: var(--u-color-default-light-5);
|
|
@@ -429,7 +441,7 @@
|
|
|
429
441
|
box-shadow: 0px 0px 0px 1px var(--u-color-default);
|
|
430
442
|
}
|
|
431
443
|
.u-button--color-default.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-default.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
432
|
-
background-color: var(--u-color-default-light-9);
|
|
444
|
+
background-color: var(--u-button-default-plain-bg, var(--u-color-default-light-9));
|
|
433
445
|
}
|
|
434
446
|
.u-button--color-default.is-text.is-disabled {
|
|
435
447
|
color: var(--u-color-default-light-5);
|
|
@@ -438,9 +450,9 @@
|
|
|
438
450
|
color: var(--u-color-default-light-5);
|
|
439
451
|
}
|
|
440
452
|
.u-button--color-default.is-plain {
|
|
441
|
-
color: var(--u-color-default);
|
|
442
|
-
background-color: var(--u-color-default-light-9);
|
|
443
|
-
box-shadow: 0px 0px 2px 1px var(--u-color-default-light-5);
|
|
453
|
+
color: var(--u-button-default-plain-color, var(--u-color-default));
|
|
454
|
+
background-color: var(--u-button-default-plain-bg, var(--u-color-default-light-9));
|
|
455
|
+
box-shadow: 0px 0px 2px 1px var(--u-button-default-plain-shadow, var(--u-color-default-light-5));
|
|
444
456
|
}
|
|
445
457
|
.u-button--color-default.is-plain:active {
|
|
446
458
|
box-shadow: none;
|
|
@@ -11,17 +11,17 @@ declare const __VLS_export: _$vue.DefineComponent<CascadeProps, {}, {}, {}, {},
|
|
|
11
11
|
onClear?: (() => any) | undefined;
|
|
12
12
|
onChange?: ((...args: [value?: string | undefined, label?: string | undefined, item?: Record<string, any> | undefined] | [value: string[], label: string[], data: Record<string, any>[]]) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
data: Record<string, any>[];
|
|
16
|
+
readonly: boolean;
|
|
14
17
|
labelKey: string;
|
|
15
18
|
valueKey: string;
|
|
16
19
|
childrenKey: string;
|
|
17
|
-
data: Record<string, any>[];
|
|
18
|
-
disabled: boolean;
|
|
19
|
-
readonly: boolean;
|
|
20
20
|
placeholder: string;
|
|
21
21
|
clearable: boolean;
|
|
22
22
|
filterable: boolean;
|
|
23
|
-
visibilityLimit: number;
|
|
24
23
|
separator: string;
|
|
24
|
+
visibilityLimit: number;
|
|
25
25
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
26
26
|
declare const _default: typeof __VLS_export;
|
|
27
27
|
//#endregion
|
|
@@ -127,7 +127,8 @@
|
|
|
127
127
|
margin-bottom: 0.2rem;
|
|
128
128
|
}
|
|
129
129
|
.u-cascade-panel-item__option.is-active {
|
|
130
|
-
background-color: var(--u-color-primary-light-9);
|
|
130
|
+
background-color: var(--u-cascade-node-active-bg, var(--u-color-primary-light-9));
|
|
131
|
+
color: var(--u-cascade-node-active-color, var(--u-color-primary));
|
|
131
132
|
border-radius: var(--u-radius-default);
|
|
132
133
|
}
|
|
133
134
|
.u-cascade-panel-item__option.is-selected {
|
|
@@ -20,8 +20,8 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
20
20
|
"onUpdate:modelValue"?: ((checked: boolean) => any) | undefined;
|
|
21
21
|
onChange?: ((checked: boolean) => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
|
-
type: _$_veltra_utils0.ColorType;
|
|
24
23
|
disabled: boolean;
|
|
24
|
+
type: _$_veltra_utils0.ColorType;
|
|
25
25
|
readonly: boolean;
|
|
26
26
|
round: boolean;
|
|
27
27
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
.u-checkbox__wrap {
|
|
75
75
|
border: var(--u-border-width) var(--u-border-style) var(--u-checkbox-border, #ccc);
|
|
76
76
|
border-radius: 6px;
|
|
77
|
-
color: #fff;
|
|
77
|
+
color: var(--u-checkbox-color, #fff);
|
|
78
78
|
transition: background-color 0.15s ease;
|
|
79
79
|
display: inline-flex;
|
|
80
80
|
justify-content: center;
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
line-height: 1em;
|
|
86
86
|
}
|
|
87
87
|
.u-checkbox--indeterminate {
|
|
88
|
-
background-color: #fff;
|
|
88
|
+
background-color: var(--u-checkbox-color, #fff);
|
|
89
89
|
width: 10px;
|
|
90
90
|
height: 2px;
|
|
91
91
|
vertical-align: middle;
|
|
@@ -14,10 +14,10 @@ declare const __VLS_export: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {},
|
|
|
14
14
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
15
|
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
-
labelKey: string;
|
|
18
|
-
valueKey: string;
|
|
19
17
|
disabled: boolean;
|
|
20
18
|
readonly: boolean;
|
|
19
|
+
labelKey: string;
|
|
20
|
+
valueKey: string;
|
|
21
21
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
23
23
|
//#endregion
|
|
@@ -13,9 +13,9 @@ declare const __VLS_base: _$vue.DefineComponent<CollapseProps, _CollapseExposed,
|
|
|
13
13
|
"onUpdate:modelValue"?: ((value: CollapseModelValue) => any) | undefined;
|
|
14
14
|
onChange?: ((value: CollapseModelValue) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
|
+
iconPosition: CollapseIconPosition;
|
|
16
17
|
accordion: boolean;
|
|
17
18
|
bordered: boolean;
|
|
18
|
-
iconPosition: CollapseIconPosition;
|
|
19
19
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
20
20
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
21
|
declare const _default: typeof __VLS_export;
|
|
@@ -7,8 +7,8 @@ declare const __VLS_export: _$vue.DefineComponent<DatePickerProps, {}, {}, {}, {
|
|
|
7
7
|
}, string, _$vue.PublicProps, Readonly<DatePickerProps> & Readonly<{
|
|
8
8
|
"onUpdate:modelValue"?: ((value?: string | number | Date | undefined) => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
|
-
type: "date" | "month" | "year";
|
|
11
10
|
disabled: boolean;
|
|
11
|
+
type: "date" | "month" | "year";
|
|
12
12
|
readonly: boolean;
|
|
13
13
|
placeholder: string;
|
|
14
14
|
clearable: boolean;
|
|
@@ -7,8 +7,8 @@ declare const __VLS_export: _$vue.DefineComponent<DateRangePickerProps, {}, {},
|
|
|
7
7
|
}, string, _$vue.PublicProps, Readonly<DateRangePickerProps> & Readonly<{
|
|
8
8
|
"onUpdate:modelValue"?: ((value?: [string, string] | undefined) => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
|
-
type: "date" | "month" | "year";
|
|
11
10
|
disabled: boolean;
|
|
11
|
+
type: "date" | "month" | "year";
|
|
12
12
|
readonly: boolean;
|
|
13
13
|
placeholder: [string, string];
|
|
14
14
|
clearable: boolean;
|
|
@@ -14,12 +14,12 @@ type __VLS_Slots = {} & {
|
|
|
14
14
|
declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
15
15
|
"update:modelValue": (value: boolean) => any;
|
|
16
16
|
} & {
|
|
17
|
-
"update:modelValue": (value: boolean) => any;
|
|
18
17
|
close: () => any;
|
|
18
|
+
"update:modelValue": (value: boolean) => any;
|
|
19
19
|
closed: () => any;
|
|
20
20
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
22
21
|
onClose?: (() => any) | undefined;
|
|
22
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
23
23
|
onClosed?: (() => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
25
|
direction: DrawerDirection;
|
|
@@ -81,16 +81,16 @@
|
|
|
81
81
|
height: 22px;
|
|
82
82
|
line-height: 1;
|
|
83
83
|
font-size: 12px;
|
|
84
|
-
color: var(--u-color-primary);
|
|
85
|
-
background-color: var(--u-color-primary-light-9);
|
|
84
|
+
color: var(--u-expression-editor-chip-color, var(--u-color-primary));
|
|
85
|
+
background-color: var(--u-expression-editor-chip-bg, var(--u-color-primary-light-9));
|
|
86
86
|
border-radius: 999px;
|
|
87
87
|
cursor: pointer;
|
|
88
88
|
user-select: none;
|
|
89
89
|
transition: background-color 0.12s ease, box-shadow 0.12s ease;
|
|
90
90
|
}
|
|
91
91
|
.u-expression-editor__chip:hover {
|
|
92
|
-
color: var(--u-color-primary);
|
|
93
|
-
background-color: var(--u-color-primary-light-8);
|
|
92
|
+
color: var(--u-expression-editor-chip-color, var(--u-color-primary));
|
|
93
|
+
background-color: var(--u-expression-editor-chip-bg, var(--u-color-primary-light-8));
|
|
94
94
|
box-shadow: 0 1px 4px var(--u-shadow-color);
|
|
95
95
|
}
|
|
96
96
|
.u-expression-editor__chip:hover .u-expression-editor__chip-close {
|
|
@@ -28,8 +28,8 @@ declare const __VLS_export: _$vue.DefineComponent<__VLS_PublicProps, _FileViewer
|
|
|
28
28
|
}) => any) | undefined;
|
|
29
29
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
|
-
modelValue: string;
|
|
32
31
|
open: boolean;
|
|
32
|
+
modelValue: string;
|
|
33
33
|
sidebarWidth: string | number | false;
|
|
34
34
|
sheetMaxRows: number;
|
|
35
35
|
downloadable: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { toBlobUrl } from "../helper.js";
|
|
1
2
|
import { createCommentVNode, createElementBlock, defineComponent, mergeProps, normalizeClass, onBeforeUnmount, openBlock, ref, shallowRef, unref, useAttrs, watch } from "vue";
|
|
2
3
|
import { bem } from "@veltra/utils";
|
|
3
4
|
//#region src/components/file-viewer/previewers/image-previewer.vue
|
|
@@ -17,11 +18,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
18
|
const loading = ref(true);
|
|
18
19
|
const failed = ref(false);
|
|
19
20
|
let revoke;
|
|
20
|
-
|
|
21
|
+
function load() {
|
|
21
22
|
loading.value = true;
|
|
22
23
|
failed.value = false;
|
|
23
24
|
revoke?.();
|
|
24
|
-
const { toBlobUrl } = await import("../helper.js");
|
|
25
25
|
const r = toBlobUrl(props.file.src, props.file.mime);
|
|
26
26
|
url.value = r.url;
|
|
27
27
|
revoke = r.revoke;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-previewer.js","names":[],"sources":["../../../../src/components/file-viewer/previewers/image-previewer.vue"],"sourcesContent":["<template>\n <div :class=\"cls.e('image')\" v-bind=\"attrs\">\n <img\n v-if=\"url\"\n :src=\"url\"\n :alt=\"file.name\"\n draggable=\"false\"\n @load=\"loading = false\"\n @error=\"onImgError\"\n />\n <div v-if=\"loading\" :class=\"cls.e('loading')\">加载中…</div>\n <div v-if=\"failed\" :class=\"cls.e('loading')\">图片加载失败</div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { bem } from '@veltra/utils'\nimport { onBeforeUnmount, ref, shallowRef, useAttrs, watch } from 'vue'\n\nimport type { FileViewerItem } from '../../../types/file-viewer'\n\ndefineOptions({ name: 'FileViewerImagePreviewer', inheritAttrs: false })\n\nconst props = defineProps<{ file: FileViewerItem }>()\n\nconst emit = defineEmits<{ (e: 'error', err: unknown): void }>()\n\nconst cls = bem('file-viewer')\nconst attrs = useAttrs()\n\nconst url = shallowRef<string>('')\nconst loading = ref(true)\nconst failed = ref(false)\n\nlet revoke: (() => void) | undefined\n\
|
|
1
|
+
{"version":3,"file":"image-previewer.js","names":[],"sources":["../../../../src/components/file-viewer/previewers/image-previewer.vue"],"sourcesContent":["<template>\n <div :class=\"cls.e('image')\" v-bind=\"attrs\">\n <img\n v-if=\"url\"\n :src=\"url\"\n :alt=\"file.name\"\n draggable=\"false\"\n @load=\"loading = false\"\n @error=\"onImgError\"\n />\n <div v-if=\"loading\" :class=\"cls.e('loading')\">加载中…</div>\n <div v-if=\"failed\" :class=\"cls.e('loading')\">图片加载失败</div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { bem } from '@veltra/utils'\nimport { onBeforeUnmount, ref, shallowRef, useAttrs, watch } from 'vue'\n\nimport type { FileViewerItem } from '../../../types/file-viewer'\nimport { toBlobUrl } from '../helper'\n\ndefineOptions({ name: 'FileViewerImagePreviewer', inheritAttrs: false })\n\nconst props = defineProps<{ file: FileViewerItem }>()\n\nconst emit = defineEmits<{ (e: 'error', err: unknown): void }>()\n\nconst cls = bem('file-viewer')\nconst attrs = useAttrs()\n\nconst url = shallowRef<string>('')\nconst loading = ref(true)\nconst failed = ref(false)\n\nlet revoke: (() => void) | undefined\n\nfunction load() {\n loading.value = true\n failed.value = false\n revoke?.()\n const r = toBlobUrl(props.file.src, props.file.mime)\n url.value = r.url\n revoke = r.revoke\n}\n\nfunction onImgError(e: Event) {\n loading.value = false\n failed.value = true\n emit('error', e)\n}\n\nwatch(\n () => props.file,\n () => load(),\n { immediate: true }\n)\n\nonBeforeUnmount(() => {\n revoke?.()\n url.value = ''\n})\n</script>\n"],"mappings":";;;;;;;;;;;;EAwBA,MAAM,QAAQ;EAEd,MAAM,OAAO;EAEb,MAAM,MAAM,IAAI,cAAa;EAC7B,MAAM,QAAQ,UAAS;EAEvB,MAAM,MAAM,WAAmB,GAAE;EACjC,MAAM,UAAU,IAAI,KAAI;EACxB,MAAM,SAAS,IAAI,MAAK;EAExB,IAAI;EAEJ,SAAS,OAAO;AACd,WAAQ,QAAQ;AAChB,UAAO,QAAQ;AACf,aAAS;GACT,MAAM,IAAI,UAAU,MAAM,KAAK,KAAK,MAAM,KAAK,KAAI;AACnD,OAAI,QAAQ,EAAE;AACd,YAAS,EAAE;;EAGb,SAAS,WAAW,GAAU;AAC5B,WAAQ,QAAQ;AAChB,UAAO,QAAQ;AACf,QAAK,SAAS,EAAC;;AAGjB,cACQ,MAAM,YACN,MAAM,EACZ,EAAE,WAAW,MAAK,CACpB;AAEA,wBAAsB;AACpB,aAAS;AACT,OAAI,QAAQ;IACb;;uBA5DC,mBAWM,OAXN,WAWM,EAXA,OAAO,MAAA,IAAG,CAAC,EAAC,QAAA,EAAA,EAAmB,MAAA,MAAK,CAAA,EAAA;IAEhC,IAAA,SAAA,WAAA,EADR,mBAOE,OAAA;;KALC,KAAK,IAAA;KACL,KAAK,QAAA,KAAK;KACX,WAAU;KACT,QAAI,OAAA,OAAA,OAAA,MAAA,WAAE,QAAA,QAAO;KACb,SAAO;;IAEC,QAAA,SAAA,WAAA,EAAX,mBAAwD,OAAA;;KAAnC,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,UAAA,CAAA;OAAa,QAAI,EAAA,IAAA,mBAAA,QAAA,KAAA;IACvC,OAAA,SAAA,WAAA,EAAX,mBAAyD,OAAA;;KAArC,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,UAAA,CAAA;OAAa,UAAM,EAAA,IAAA,mBAAA,QAAA,KAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { toBlobUrl } from "../helper.js";
|
|
1
2
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, onBeforeUnmount, openBlock, shallowRef, unref, useAttrs, watch, withCtx } from "vue";
|
|
2
3
|
import { bem } from "@veltra/utils";
|
|
3
4
|
import { createPluginRegistration } from "@embedpdf/core";
|
|
@@ -22,9 +23,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
23
|
const { engine, isLoading, error } = usePdfiumEngine();
|
|
23
24
|
const pdfUrl = shallowRef("");
|
|
24
25
|
let revoke;
|
|
25
|
-
|
|
26
|
+
function load() {
|
|
26
27
|
revoke?.();
|
|
27
|
-
const { toBlobUrl } = await import("../helper.js");
|
|
28
28
|
const r = toBlobUrl(props.file.src, props.file.mime ?? "application/pdf");
|
|
29
29
|
pdfUrl.value = r.url;
|
|
30
30
|
revoke = r.revoke;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pdf-previewer.js","names":[],"sources":["../../../../src/components/file-viewer/previewers/pdf-previewer.vue"],"sourcesContent":["<template>\n <div :class=\"cls.e('pdf')\" v-bind=\"attrs\">\n <div v-if=\"!engine || isLoading\" :class=\"cls.e('loading')\">正在加载 PDF 引擎…</div>\n <EmbedPDF v-else-if=\"pdfUrl\" :engine=\"engine\" :plugins=\"plugins\" v-slot=\"{ activeDocumentId }\">\n <DocumentContent\n v-if=\"activeDocumentId\"\n :document-id=\"activeDocumentId\"\n v-slot=\"{ isLoaded }\"\n >\n <Viewport v-if=\"isLoaded\" :document-id=\"activeDocumentId\" :class=\"cls.e('pdf-viewport')\">\n <Scroller :document-id=\"activeDocumentId\">\n <template #default=\"{ page }\">\n <div\n :class=\"cls.e('pdf-page')\"\n :style=\"{ width: page.width + 'px', height: page.height + 'px' }\"\n >\n <RenderLayer :document-id=\"activeDocumentId\" :page-index=\"page.pageIndex\" />\n </div>\n </template>\n </Scroller>\n </Viewport>\n </DocumentContent>\n </EmbedPDF>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createPluginRegistration } from '@embedpdf/core'\nimport { EmbedPDF } from '@embedpdf/core/vue'\nimport { usePdfiumEngine } from '@embedpdf/engines/vue'\nimport {\n DocumentContent,\n DocumentManagerPluginPackage\n} from '@embedpdf/plugin-document-manager/vue'\nimport { RenderLayer, RenderPluginPackage } from '@embedpdf/plugin-render/vue'\nimport { ScrollPluginPackage, Scroller } from '@embedpdf/plugin-scroll/vue'\nimport { ViewportPluginPackage, Viewport } from '@embedpdf/plugin-viewport/vue'\nimport { bem } from '@veltra/utils'\nimport { computed, onBeforeUnmount, shallowRef, useAttrs, watch } from 'vue'\n\nimport type { FileViewerItem } from '../../../types/file-viewer'\n\ndefineOptions({ name: 'FileViewerPdfPreviewer', inheritAttrs: false })\n\nconst props = defineProps<{ file: FileViewerItem }>()\n\nconst emit = defineEmits<{ (e: 'error', err: unknown): void }>()\n\nconst cls = bem('file-viewer')\nconst attrs = useAttrs()\n\nconst { engine, isLoading, error } = usePdfiumEngine()\n\nconst pdfUrl = shallowRef<string>('')\nlet revoke: (() => void) | undefined\n\
|
|
1
|
+
{"version":3,"file":"pdf-previewer.js","names":[],"sources":["../../../../src/components/file-viewer/previewers/pdf-previewer.vue"],"sourcesContent":["<template>\n <div :class=\"cls.e('pdf')\" v-bind=\"attrs\">\n <div v-if=\"!engine || isLoading\" :class=\"cls.e('loading')\">正在加载 PDF 引擎…</div>\n <EmbedPDF v-else-if=\"pdfUrl\" :engine=\"engine\" :plugins=\"plugins\" v-slot=\"{ activeDocumentId }\">\n <DocumentContent\n v-if=\"activeDocumentId\"\n :document-id=\"activeDocumentId\"\n v-slot=\"{ isLoaded }\"\n >\n <Viewport v-if=\"isLoaded\" :document-id=\"activeDocumentId\" :class=\"cls.e('pdf-viewport')\">\n <Scroller :document-id=\"activeDocumentId\">\n <template #default=\"{ page }\">\n <div\n :class=\"cls.e('pdf-page')\"\n :style=\"{ width: page.width + 'px', height: page.height + 'px' }\"\n >\n <RenderLayer :document-id=\"activeDocumentId\" :page-index=\"page.pageIndex\" />\n </div>\n </template>\n </Scroller>\n </Viewport>\n </DocumentContent>\n </EmbedPDF>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createPluginRegistration } from '@embedpdf/core'\nimport { EmbedPDF } from '@embedpdf/core/vue'\nimport { usePdfiumEngine } from '@embedpdf/engines/vue'\nimport {\n DocumentContent,\n DocumentManagerPluginPackage\n} from '@embedpdf/plugin-document-manager/vue'\nimport { RenderLayer, RenderPluginPackage } from '@embedpdf/plugin-render/vue'\nimport { ScrollPluginPackage, Scroller } from '@embedpdf/plugin-scroll/vue'\nimport { ViewportPluginPackage, Viewport } from '@embedpdf/plugin-viewport/vue'\nimport { bem } from '@veltra/utils'\nimport { computed, onBeforeUnmount, shallowRef, useAttrs, watch } from 'vue'\n\nimport type { FileViewerItem } from '../../../types/file-viewer'\nimport { toBlobUrl } from '../helper'\n\ndefineOptions({ name: 'FileViewerPdfPreviewer', inheritAttrs: false })\n\nconst props = defineProps<{ file: FileViewerItem }>()\n\nconst emit = defineEmits<{ (e: 'error', err: unknown): void }>()\n\nconst cls = bem('file-viewer')\nconst attrs = useAttrs()\n\nconst { engine, isLoading, error } = usePdfiumEngine()\n\nconst pdfUrl = shallowRef<string>('')\nlet revoke: (() => void) | undefined\n\nfunction load() {\n revoke?.()\n const r = toBlobUrl(props.file.src, props.file.mime ?? 'application/pdf')\n pdfUrl.value = r.url\n revoke = r.revoke\n}\n\nconst plugins = computed(() => {\n if (!pdfUrl.value) return []\n return [\n createPluginRegistration(DocumentManagerPluginPackage, {\n initialDocuments: [{ url: pdfUrl.value }]\n }),\n createPluginRegistration(ViewportPluginPackage),\n createPluginRegistration(ScrollPluginPackage),\n createPluginRegistration(RenderPluginPackage)\n ]\n})\n\nwatch(\n () => props.file,\n () => load(),\n { immediate: true }\n)\n\nwatch(error, (err) => {\n if (err) emit('error', err)\n})\n\nonBeforeUnmount(() => {\n revoke?.()\n pdfUrl.value = ''\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;EA6CA,MAAM,QAAQ;EAEd,MAAM,OAAO;EAEb,MAAM,MAAM,IAAI,cAAa;EAC7B,MAAM,QAAQ,UAAS;EAEvB,MAAM,EAAE,QAAQ,WAAW,UAAU,iBAAgB;EAErD,MAAM,SAAS,WAAmB,GAAE;EACpC,IAAI;EAEJ,SAAS,OAAO;AACd,aAAS;GACT,MAAM,IAAI,UAAU,MAAM,KAAK,KAAK,MAAM,KAAK,QAAQ,kBAAiB;AACxE,UAAO,QAAQ,EAAE;AACjB,YAAS,EAAE;;EAGb,MAAM,UAAU,eAAe;AAC7B,OAAI,CAAC,OAAO,MAAO,QAAO,EAAC;AAC3B,UAAO;IACL,yBAAyB,8BAA8B,EACrD,kBAAkB,CAAC,EAAE,KAAK,OAAO,OAAO,CAAA,EACzC,CAAC;IACF,yBAAyB,sBAAsB;IAC/C,yBAAyB,oBAAoB;IAC7C,yBAAyB,oBAAmB;IAC9C;IACD;AAED,cACQ,MAAM,YACN,MAAM,EACZ,EAAE,WAAW,MAAK,CACpB;AAEA,QAAM,QAAQ,QAAQ;AACpB,OAAI,IAAK,MAAK,SAAS,IAAG;IAC3B;AAED,wBAAsB;AACpB,aAAS;AACT,UAAO,QAAQ;IAChB;;uBAxFC,mBAsBM,OAtBN,WAsBM,EAtBA,OAAO,MAAA,IAAG,CAAC,EAAC,MAAA,EAAA,EAAiB,MAAA,MAAK,CAAA,EAAA,CAAA,CAC1B,MAAA,OAAM,IAAI,MAAA,UAAS,IAAA,WAAA,EAA/B,mBAA6E,OAAA;;IAA3C,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,UAAA,CAAA;MAAa,gBAAY,EAAA,IAClD,OAAA,SAAA,WAAA,EAArB,YAmBW,MAAA,SAAA,EAAA;;IAnBmB,QAAQ,MAAA,OAAM;IAAG,SAAS,QAAA;;sBAkBpC,EAlBuD,uBAAgB,CAEjF,oBAAA,WAAA,EADR,YAiBkB,MAAA,gBAAA,EAAA;;KAff,eAAa;;uBAcH,EAbD,eAAQ,CAEF,YAAA,WAAA,EAAhB,YAWW,MAAA,SAAA,EAAA;;MAXgB,eAAa;MAAmB,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,eAAA,CAAA;;6BAU1D,CATX,YASW,MAAA,SAAA,EAAA,EATA,eAAa,kBAAgB,EAAA;OAC3B,SAAO,SAMV,EANc,WAAI,CACxB,mBAKM,OAAA;QAJH,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,WAAA,CAAA;QACZ,OAAK,eAAA;SAAA,OAAW,KAAK,QAAK;SAAA,QAAiB,KAAK,SAAM;SAAA,CAAA;WAEvD,YAA4E,MAAA,YAAA,EAAA;QAA9D,eAAa;QAAmB,cAAY,KAAK"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { toBlobUrl } from "../helper.js";
|
|
1
2
|
import { createCommentVNode, createElementBlock, defineComponent, normalizeClass, onBeforeUnmount, openBlock, shallowRef, unref, useTemplateRef, watch } from "vue";
|
|
2
3
|
import { bem } from "@veltra/utils";
|
|
3
4
|
//#region src/components/file-viewer/previewers/video-previewer.vue
|
|
@@ -15,9 +16,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
16
|
const videoRef = useTemplateRef("videoRef");
|
|
16
17
|
let revoke;
|
|
17
18
|
let unmounting = false;
|
|
18
|
-
|
|
19
|
+
function load() {
|
|
19
20
|
revoke?.();
|
|
20
|
-
const { toBlobUrl } = await import("../helper.js");
|
|
21
21
|
const r = toBlobUrl(props.file.src, props.file.mime);
|
|
22
22
|
url.value = r.url;
|
|
23
23
|
revoke = r.revoke;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video-previewer.js","names":[],"sources":["../../../../src/components/file-viewer/previewers/video-previewer.vue"],"sourcesContent":["<template>\n <div :class=\"cls.e('video')\">\n <video\n v-if=\"url\"\n ref=\"videoRef\"\n :src=\"url\"\n :type=\"file.mime\"\n controls\n preload=\"metadata\"\n playsinline\n @error=\"onVideoError\"\n />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { bem } from '@veltra/utils'\nimport { onBeforeUnmount, shallowRef, useTemplateRef, watch } from 'vue'\n\nimport type { FileViewerItem } from '../../../types/file-viewer'\n\ndefineOptions({ name: 'FileViewerVideoPreviewer' })\n\nconst props = defineProps<{ file: FileViewerItem }>()\n\nconst emit = defineEmits<{ (e: 'error', err: unknown): void }>()\n\nconst cls = bem('file-viewer')\n\nconst url = shallowRef<string>('')\nconst videoRef = useTemplateRef<HTMLVideoElement>('videoRef')\n\nlet revoke: (() => void) | undefined\nlet unmounting = false\n\
|
|
1
|
+
{"version":3,"file":"video-previewer.js","names":[],"sources":["../../../../src/components/file-viewer/previewers/video-previewer.vue"],"sourcesContent":["<template>\n <div :class=\"cls.e('video')\">\n <video\n v-if=\"url\"\n ref=\"videoRef\"\n :src=\"url\"\n :type=\"file.mime\"\n controls\n preload=\"metadata\"\n playsinline\n @error=\"onVideoError\"\n />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { bem } from '@veltra/utils'\nimport { onBeforeUnmount, shallowRef, useTemplateRef, watch } from 'vue'\n\nimport type { FileViewerItem } from '../../../types/file-viewer'\nimport { toBlobUrl } from '../helper'\n\ndefineOptions({ name: 'FileViewerVideoPreviewer' })\n\nconst props = defineProps<{ file: FileViewerItem }>()\n\nconst emit = defineEmits<{ (e: 'error', err: unknown): void }>()\n\nconst cls = bem('file-viewer')\n\nconst url = shallowRef<string>('')\nconst videoRef = useTemplateRef<HTMLVideoElement>('videoRef')\n\nlet revoke: (() => void) | undefined\nlet unmounting = false\n\nfunction load() {\n revoke?.()\n const r = toBlobUrl(props.file.src, props.file.mime)\n url.value = r.url\n revoke = r.revoke\n}\n\nfunction onVideoError(e: Event) {\n if (unmounting) return\n const v = e.target as HTMLVideoElement | null\n if (!v?.src) return\n emit('error', e)\n}\n\nwatch(\n () => props.file,\n () => load(),\n { immediate: true }\n)\n\nonBeforeUnmount(() => {\n unmounting = true\n const v = videoRef.value\n if (v) {\n v.pause()\n v.removeAttribute('src')\n try {\n v.load()\n } catch {\n /* noop */\n }\n }\n revoke?.()\n url.value = ''\n})\n</script>\n"],"mappings":";;;;;;;;;;;EAwBA,MAAM,QAAQ;EAEd,MAAM,OAAO;EAEb,MAAM,MAAM,IAAI,cAAa;EAE7B,MAAM,MAAM,WAAmB,GAAE;EACjC,MAAM,WAAW,eAAiC,WAAU;EAE5D,IAAI;EACJ,IAAI,aAAa;EAEjB,SAAS,OAAO;AACd,aAAS;GACT,MAAM,IAAI,UAAU,MAAM,KAAK,KAAK,MAAM,KAAK,KAAI;AACnD,OAAI,QAAQ,EAAE;AACd,YAAS,EAAE;;EAGb,SAAS,aAAa,GAAU;AAC9B,OAAI,WAAY;AAEhB,OAAI,CADM,EAAE,QACJ,IAAK;AACb,QAAK,SAAS,EAAC;;AAGjB,cACQ,MAAM,YACN,MAAM,EACZ,EAAE,WAAW,MAAK,CACpB;AAEA,wBAAsB;AACpB,gBAAa;GACb,MAAM,IAAI,SAAS;AACnB,OAAI,GAAG;AACL,MAAE,OAAM;AACR,MAAE,gBAAgB,MAAK;AACvB,QAAI;AACF,OAAE,MAAK;YACD;;AAIV,aAAS;AACT,OAAI,QAAQ;IACb;;uBArEC,mBAWM,OAAA,EAXA,OAAK,eAAE,MAAA,IAAG,CAAC,EAAC,QAAA,CAAA,EAAA,EAAA,CAER,IAAA,SAAA,WAAA,EADR,mBASE,SAAA;;aAPI;IAAJ,KAAI;IACH,KAAK,IAAA;IACL,MAAM,QAAA,KAAK;IACZ,UAAA;IACA,SAAQ;IACR,aAAA;IACC,SAAO"}
|
|
@@ -29,7 +29,9 @@
|
|
|
29
29
|
}
|
|
30
30
|
.u-message-confirm__box {
|
|
31
31
|
width: 420px;
|
|
32
|
-
background-color:
|
|
32
|
+
background-color: var(--u-bg-color-top);
|
|
33
|
+
border: var(--u-border);
|
|
34
|
+
box-shadow: var(--u-shadow);
|
|
33
35
|
transition: opacity 0.3s, transform 0.4s;
|
|
34
36
|
transform: translateY(-50%);
|
|
35
37
|
}
|
|
@@ -28,13 +28,13 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
28
28
|
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
29
29
|
onChange?: ((options: Record<string, any>[]) => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
|
-
|
|
32
|
-
valueKey: string;
|
|
31
|
+
minWidth: string;
|
|
33
32
|
disabled: boolean;
|
|
34
33
|
readonly: boolean;
|
|
34
|
+
labelKey: string;
|
|
35
|
+
valueKey: string;
|
|
35
36
|
placeholder: string;
|
|
36
37
|
clearable: boolean;
|
|
37
|
-
minWidth: string;
|
|
38
38
|
visibilityLimit: number;
|
|
39
39
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
40
40
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -22,15 +22,15 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
22
22
|
onClear?: (() => any) | undefined;
|
|
23
23
|
onChange?: ((checked: Record<string, any>[]) => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
|
+
minWidth: string;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
readonly: boolean;
|
|
25
28
|
expandAll: boolean;
|
|
26
29
|
labelKey: string;
|
|
27
30
|
valueKey: string;
|
|
28
|
-
disabled: boolean;
|
|
29
|
-
readonly: boolean;
|
|
30
31
|
placeholder: string;
|
|
31
32
|
clearable: boolean;
|
|
32
33
|
filterable: boolean;
|
|
33
|
-
minWidth: string;
|
|
34
34
|
visibilityLimit: number;
|
|
35
35
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
36
36
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|