ele-admin-plus 1.1.9-beta.2 → 1.1.9-beta.4
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/es/ele-app/el.d.ts +9 -0
- package/es/ele-app/style/overwrite/message-box/index.scss +5 -0
- package/es/ele-basic-select/index.d.ts +2 -2
- package/es/ele-check-card/index.d.ts +1 -1
- package/es/ele-drawer/index.d.ts +1 -1
- package/es/ele-dropdown/index.d.ts +2 -2
- package/es/ele-dropdown/index.js +1 -0
- package/es/ele-icon-select/index.d.ts +3 -3
- package/es/ele-map-picker/index.d.ts +1 -1
- package/es/ele-menus/index.d.ts +10 -2
- package/es/ele-menus/index.js +17 -4
- package/es/ele-menus/props.d.ts +8 -2
- package/es/ele-menus/props.js +9 -3
- package/es/ele-menus/style/index.scss +12 -11
- package/es/ele-menus/types.d.ts +9 -9
- package/es/ele-menus/util.d.ts +21 -15
- package/es/ele-menus/util.js +92 -83
- package/es/ele-modal/index.d.ts +2 -2
- package/es/ele-modal/index.js +27 -4
- package/es/ele-modal/style/index.scss +58 -12
- package/es/ele-modal/types.d.ts +2 -10
- package/es/ele-modal/util.d.ts +3 -3
- package/es/ele-modal/util.js +22 -57
- package/es/ele-printer/util.js +3 -1
- package/es/ele-pro-layout/components/pro-header.d.ts +23 -11
- package/es/ele-pro-layout/components/pro-header.js +68 -15
- package/es/ele-pro-layout/components/pro-iframe.js +46 -23
- package/es/ele-pro-layout/components/pro-sidebar.d.ts +21 -15
- package/es/ele-pro-layout/components/pro-sidebar.js +36 -14
- package/es/ele-pro-layout/components/pro-sidebox.d.ts +23 -11
- package/es/ele-pro-layout/components/pro-sidebox.js +46 -14
- package/es/ele-pro-layout/components/tab-dropdown.js +5 -1
- package/es/ele-pro-layout/index.d.ts +40 -27
- package/es/ele-pro-layout/index.js +269 -52
- package/es/ele-pro-layout/props.d.ts +5 -0
- package/es/ele-pro-layout/props.js +5 -0
- package/es/ele-pro-layout/types.d.ts +29 -3
- package/es/ele-segmented/index.d.ts +1 -1
- package/es/ele-table-select/index.d.ts +5 -5
- package/es/ele-tree-select/index.d.ts +5 -5
- package/es/ele-upload-list/components/list-item.d.ts +5 -1
- package/es/ele-upload-list/components/list-item.js +7 -4
- package/es/ele-upload-list/index.d.ts +10 -6
- package/es/ele-upload-list/index.js +7 -5
- package/es/ele-upload-list/props.d.ts +6 -2
- package/es/ele-upload-list/props.js +5 -1
- package/es/ele-virtual-table/components/body-cell.d.ts +1 -1
- package/es/ele-virtual-table/index.d.ts +1 -1
- package/lib/ele-app/el.d.ts +9 -0
- package/lib/ele-app/style/overwrite/message-box/index.scss +5 -0
- package/lib/ele-basic-select/index.d.ts +2 -2
- package/lib/ele-check-card/index.d.ts +1 -1
- package/lib/ele-drawer/index.d.ts +1 -1
- package/lib/ele-dropdown/index.cjs +1 -0
- package/lib/ele-dropdown/index.d.ts +2 -2
- package/lib/ele-icon-select/index.d.ts +3 -3
- package/lib/ele-map-picker/index.d.ts +1 -1
- package/lib/ele-menus/index.cjs +17 -4
- package/lib/ele-menus/index.d.ts +10 -2
- package/lib/ele-menus/props.cjs +9 -3
- package/lib/ele-menus/props.d.ts +8 -2
- package/lib/ele-menus/style/index.scss +12 -11
- package/lib/ele-menus/types.d.ts +9 -9
- package/lib/ele-menus/util.cjs +92 -83
- package/lib/ele-menus/util.d.ts +21 -15
- package/lib/ele-modal/index.cjs +27 -4
- package/lib/ele-modal/index.d.ts +2 -2
- package/lib/ele-modal/style/index.scss +58 -12
- package/lib/ele-modal/types.d.ts +2 -10
- package/lib/ele-modal/util.cjs +22 -57
- package/lib/ele-modal/util.d.ts +3 -3
- package/lib/ele-printer/util.cjs +3 -1
- package/lib/ele-pro-layout/components/pro-header.cjs +67 -14
- package/lib/ele-pro-layout/components/pro-header.d.ts +23 -11
- package/lib/ele-pro-layout/components/pro-iframe.cjs +45 -22
- package/lib/ele-pro-layout/components/pro-sidebar.cjs +36 -14
- package/lib/ele-pro-layout/components/pro-sidebar.d.ts +21 -15
- package/lib/ele-pro-layout/components/pro-sidebox.cjs +46 -14
- package/lib/ele-pro-layout/components/pro-sidebox.d.ts +23 -11
- package/lib/ele-pro-layout/components/tab-dropdown.cjs +5 -1
- package/lib/ele-pro-layout/index.cjs +269 -52
- package/lib/ele-pro-layout/index.d.ts +40 -27
- package/lib/ele-pro-layout/props.cjs +5 -0
- package/lib/ele-pro-layout/props.d.ts +5 -0
- package/lib/ele-pro-layout/types.d.ts +29 -3
- package/lib/ele-segmented/index.d.ts +1 -1
- package/lib/ele-table-select/index.d.ts +5 -5
- package/lib/ele-tree-select/index.d.ts +5 -5
- package/lib/ele-upload-list/components/list-item.cjs +6 -3
- package/lib/ele-upload-list/components/list-item.d.ts +5 -1
- package/lib/ele-upload-list/index.cjs +7 -5
- package/lib/ele-upload-list/index.d.ts +10 -6
- package/lib/ele-upload-list/props.cjs +5 -1
- package/lib/ele-upload-list/props.d.ts +6 -2
- package/lib/ele-virtual-table/components/body-cell.d.ts +1 -1
- package/lib/ele-virtual-table/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -28,6 +28,13 @@ const _sfc_main = defineComponent({
|
|
|
28
28
|
const { authenticated } = useLicense();
|
|
29
29
|
const { currentRoute, push } = useRouter();
|
|
30
30
|
const { disableTransition } = useDisableTransition();
|
|
31
|
+
const state = {
|
|
32
|
+
headerData: [],
|
|
33
|
+
sideboxData: [],
|
|
34
|
+
sidebarData: [],
|
|
35
|
+
menuTimer: null,
|
|
36
|
+
isHover: false
|
|
37
|
+
};
|
|
31
38
|
const contentRef = ref(null);
|
|
32
39
|
const levelData = shallowRef([]);
|
|
33
40
|
const tabData = shallowRef([]);
|
|
@@ -215,6 +222,9 @@ const _sfc_main = defineComponent({
|
|
|
215
222
|
sideboxActive.value = active1;
|
|
216
223
|
}
|
|
217
224
|
sidebarActive.value = active;
|
|
225
|
+
state.headerActive = headerActive.value;
|
|
226
|
+
state.sideboxActive = sideboxActive.value;
|
|
227
|
+
state.sidebarActive = sidebarActive.value;
|
|
218
228
|
};
|
|
219
229
|
const splitMenuData = () => {
|
|
220
230
|
var _a;
|
|
@@ -291,6 +301,9 @@ const _sfc_main = defineComponent({
|
|
|
291
301
|
sidebarData.value = menuData.value;
|
|
292
302
|
}
|
|
293
303
|
}
|
|
304
|
+
state.headerData = headerData.value;
|
|
305
|
+
state.sideboxData = sideboxData.value;
|
|
306
|
+
state.sidebarData = sidebarData.value;
|
|
294
307
|
};
|
|
295
308
|
const updateMenuData = () => {
|
|
296
309
|
let temp;
|
|
@@ -336,90 +349,276 @@ const _sfc_main = defineComponent({
|
|
|
336
349
|
});
|
|
337
350
|
}
|
|
338
351
|
};
|
|
339
|
-
const onNavItemClick = (item) => {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
if (props.beforeClick && props.beforeClick(item) === false) {
|
|
352
|
+
const onNavItemClick = (item, e) => {
|
|
353
|
+
const path = item.index;
|
|
354
|
+
const trigger = props.navTrigger;
|
|
355
|
+
if (!path || trigger !== "click" && trigger !== "hover") {
|
|
344
356
|
return;
|
|
345
357
|
}
|
|
346
358
|
if (isExternalLink(item.index)) {
|
|
347
|
-
|
|
359
|
+
e.stopPropagation();
|
|
360
|
+
if (props.beforeClick && props.beforeClick(item, e) === false) {
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
window.open(path);
|
|
348
364
|
return;
|
|
349
365
|
}
|
|
350
|
-
|
|
351
|
-
const temp = getActiveChilds(
|
|
352
|
-
headerData.value,
|
|
353
|
-
headerActive.value,
|
|
354
|
-
"tempChildren"
|
|
355
|
-
);
|
|
366
|
+
const temp = getActiveChilds(headerData.value, path, "tempChildren");
|
|
356
367
|
const isChild = !temp.some((d) => {
|
|
357
368
|
var _a;
|
|
358
369
|
return !((_a = d.meta) == null ? void 0 : _a.hide);
|
|
359
370
|
});
|
|
360
|
-
if (
|
|
361
|
-
|
|
371
|
+
if (trigger !== "click" && !isChild) {
|
|
372
|
+
e.stopPropagation();
|
|
362
373
|
return;
|
|
363
374
|
}
|
|
364
|
-
if (
|
|
375
|
+
if (props.beforeClick && props.beforeClick(item, e) === false) {
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
if (isChild) {
|
|
379
|
+
if (path !== unref(currentRoute).fullPath) {
|
|
380
|
+
push(path);
|
|
381
|
+
}
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
if (headerActive.value !== path) {
|
|
385
|
+
headerActive.value = path;
|
|
386
|
+
if (!mixSidebar.value) {
|
|
387
|
+
sidebarData.value = temp;
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
365
390
|
sideboxData.value = temp.map((d) => {
|
|
366
391
|
return {
|
|
367
|
-
|
|
368
|
-
path: d.path,
|
|
369
|
-
component: d.component,
|
|
370
|
-
redirect: d.redirect,
|
|
371
|
-
meta: d.meta,
|
|
392
|
+
...d,
|
|
372
393
|
children: props.collapse ? d.children : void 0,
|
|
373
394
|
tempChildren: d.children
|
|
374
395
|
};
|
|
375
396
|
});
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
const onNavItemMouseenter = (item, e) => {
|
|
400
|
+
if (!mixLayout.value) {
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
if (state.menuTimer != null) {
|
|
404
|
+
clearTimeout(state.menuTimer);
|
|
405
|
+
state.menuTimer = null;
|
|
406
|
+
}
|
|
407
|
+
const path = item.index;
|
|
408
|
+
const trigger = props.navTrigger;
|
|
409
|
+
if (trigger !== "hover" || !path || isExternalLink(path)) {
|
|
376
410
|
return;
|
|
377
411
|
}
|
|
378
|
-
|
|
412
|
+
const temp = getActiveChilds(headerData.value, path, "tempChildren");
|
|
413
|
+
if (!temp.some((d) => {
|
|
414
|
+
var _a;
|
|
415
|
+
return !((_a = d.meta) == null ? void 0 : _a.hide);
|
|
416
|
+
})) {
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
if (props.beforeClick && props.beforeClick(item, e) === false) {
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
if (headerActive.value !== path) {
|
|
423
|
+
state.isHover = true;
|
|
424
|
+
headerActive.value = path;
|
|
425
|
+
if (!mixSidebar.value) {
|
|
426
|
+
sidebarData.value = temp;
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
sideboxData.value = temp.map((d) => {
|
|
430
|
+
return {
|
|
431
|
+
...d,
|
|
432
|
+
children: props.collapse ? d.children : void 0,
|
|
433
|
+
tempChildren: d.children
|
|
434
|
+
};
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
const onNavMouseEnter = () => {
|
|
439
|
+
if (state.menuTimer != null) {
|
|
440
|
+
clearTimeout(state.menuTimer);
|
|
441
|
+
state.menuTimer = null;
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
const onNavMouseLeave = () => {
|
|
445
|
+
if (!state.isHover) {
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
if (state.menuTimer != null) {
|
|
449
|
+
clearTimeout(state.menuTimer);
|
|
450
|
+
state.menuTimer = null;
|
|
451
|
+
}
|
|
452
|
+
state.menuTimer = setTimeout(() => {
|
|
453
|
+
state.isHover = false;
|
|
454
|
+
if (headerActive.value !== state.headerActive) {
|
|
455
|
+
headerActive.value = state.headerActive;
|
|
456
|
+
if (mixSidebar.value) {
|
|
457
|
+
sideboxData.value = state.sideboxData;
|
|
458
|
+
} else {
|
|
459
|
+
sidebarData.value = state.sidebarData;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
if (mixSidebar.value && sideboxActive.value !== state.sideboxActive) {
|
|
463
|
+
sideboxActive.value = state.sideboxActive;
|
|
464
|
+
sidebarData.value = state.sidebarData;
|
|
465
|
+
}
|
|
466
|
+
}, props.menuHoverTimeout);
|
|
379
467
|
};
|
|
380
|
-
const onBoxItemClick = (item) => {
|
|
381
|
-
|
|
468
|
+
const onBoxItemClick = (item, e) => {
|
|
469
|
+
const path = item.index;
|
|
470
|
+
const trigger = props.boxTrigger;
|
|
471
|
+
if (!path || trigger !== "click" && trigger !== "hover") {
|
|
382
472
|
return;
|
|
383
473
|
}
|
|
384
|
-
if (
|
|
474
|
+
if (isExternalLink(path)) {
|
|
475
|
+
e.stopPropagation();
|
|
476
|
+
if (props.beforeClick && props.beforeClick(item, e) === false) {
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
window.open(path);
|
|
385
480
|
return;
|
|
386
481
|
}
|
|
387
|
-
if (
|
|
388
|
-
|
|
482
|
+
if (props.collapse) {
|
|
483
|
+
if (props.beforeClick && props.beforeClick(item, e) === false) {
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
if (path !== unref(currentRoute).fullPath) {
|
|
487
|
+
push(path);
|
|
488
|
+
}
|
|
389
489
|
return;
|
|
390
490
|
}
|
|
391
|
-
|
|
392
|
-
const temp = getActiveChilds(
|
|
393
|
-
sideboxData.value,
|
|
394
|
-
sideboxActive.value,
|
|
395
|
-
"tempChildren"
|
|
396
|
-
);
|
|
491
|
+
const temp = getActiveChilds(sideboxData.value, path, "tempChildren");
|
|
397
492
|
const isChild = !temp.some((d) => {
|
|
398
493
|
var _a;
|
|
399
494
|
return !((_a = d.meta) == null ? void 0 : _a.hide);
|
|
400
495
|
});
|
|
401
|
-
if (
|
|
402
|
-
|
|
496
|
+
if (trigger !== "click" && !isChild) {
|
|
497
|
+
e.stopPropagation();
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
if (props.beforeClick && props.beforeClick(item, e) === false) {
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
if (isChild) {
|
|
504
|
+
if (path !== unref(currentRoute).fullPath) {
|
|
505
|
+
push(path);
|
|
506
|
+
}
|
|
403
507
|
return;
|
|
404
508
|
}
|
|
405
|
-
|
|
509
|
+
if (sideboxActive.value !== path) {
|
|
510
|
+
sideboxActive.value = path;
|
|
511
|
+
sidebarData.value = temp;
|
|
512
|
+
}
|
|
406
513
|
};
|
|
407
|
-
const
|
|
408
|
-
if (
|
|
514
|
+
const onBoxItemMouseenter = (item, e) => {
|
|
515
|
+
if (props.collapse) {
|
|
409
516
|
return;
|
|
410
517
|
}
|
|
411
|
-
if (
|
|
518
|
+
if (state.menuTimer != null) {
|
|
519
|
+
clearTimeout(state.menuTimer);
|
|
520
|
+
state.menuTimer = null;
|
|
521
|
+
}
|
|
522
|
+
const path = item.index;
|
|
523
|
+
const trigger = props.boxTrigger;
|
|
524
|
+
if (trigger !== "hover" || !path || isExternalLink(path)) {
|
|
412
525
|
return;
|
|
413
526
|
}
|
|
414
|
-
|
|
415
|
-
|
|
527
|
+
const temp = getActiveChilds(sideboxData.value, path, "tempChildren");
|
|
528
|
+
if (!temp.some((d) => {
|
|
529
|
+
var _a;
|
|
530
|
+
return !((_a = d.meta) == null ? void 0 : _a.hide);
|
|
531
|
+
})) {
|
|
532
|
+
return;
|
|
533
|
+
}
|
|
534
|
+
if (props.beforeClick && props.beforeClick(item, e) === false) {
|
|
416
535
|
return;
|
|
417
536
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
537
|
+
if (sideboxActive.value !== path) {
|
|
538
|
+
state.isHover = true;
|
|
539
|
+
sideboxActive.value = path;
|
|
540
|
+
sidebarData.value = temp;
|
|
421
541
|
}
|
|
422
542
|
};
|
|
543
|
+
const onBoxMouseEnter = () => {
|
|
544
|
+
if (state.menuTimer != null) {
|
|
545
|
+
clearTimeout(state.menuTimer);
|
|
546
|
+
state.menuTimer = null;
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
const onBoxMouseLeave = () => {
|
|
550
|
+
if (!state.isHover) {
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
if (state.menuTimer != null) {
|
|
554
|
+
clearTimeout(state.menuTimer);
|
|
555
|
+
state.menuTimer = null;
|
|
556
|
+
}
|
|
557
|
+
state.menuTimer = setTimeout(() => {
|
|
558
|
+
state.isHover = false;
|
|
559
|
+
if (headerActive.value !== state.headerActive) {
|
|
560
|
+
headerActive.value = state.headerActive;
|
|
561
|
+
if (mixSidebar.value) {
|
|
562
|
+
sideboxData.value = state.sideboxData;
|
|
563
|
+
} else {
|
|
564
|
+
sidebarData.value = state.sidebarData;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
if (mixSidebar.value && sideboxActive.value !== state.sideboxActive) {
|
|
568
|
+
sideboxActive.value = state.sideboxActive;
|
|
569
|
+
sidebarData.value = state.sidebarData;
|
|
570
|
+
}
|
|
571
|
+
}, props.menuHoverTimeout);
|
|
572
|
+
};
|
|
573
|
+
const onMenuItemClick = (item, e) => {
|
|
574
|
+
const path = item.index;
|
|
575
|
+
const trigger = props.itemTrigger;
|
|
576
|
+
if (!path || trigger !== "click" && trigger !== "hover") {
|
|
577
|
+
return;
|
|
578
|
+
}
|
|
579
|
+
if (props.beforeClick && props.beforeClick(item, e) === false) {
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
if (isExternalLink(path)) {
|
|
583
|
+
e.stopPropagation();
|
|
584
|
+
window.open(path);
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
587
|
+
sidebarActive.value = path;
|
|
588
|
+
if (path !== unref(currentRoute).fullPath) {
|
|
589
|
+
push(path);
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
const onSideMouseEnter = () => {
|
|
593
|
+
if (state.menuTimer != null) {
|
|
594
|
+
clearTimeout(state.menuTimer);
|
|
595
|
+
state.menuTimer = null;
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
const onSideMouseLeave = () => {
|
|
599
|
+
if (!state.isHover) {
|
|
600
|
+
return;
|
|
601
|
+
}
|
|
602
|
+
if (state.menuTimer != null) {
|
|
603
|
+
clearTimeout(state.menuTimer);
|
|
604
|
+
state.menuTimer = null;
|
|
605
|
+
}
|
|
606
|
+
state.menuTimer = setTimeout(() => {
|
|
607
|
+
state.isHover = false;
|
|
608
|
+
if (headerActive.value !== state.headerActive) {
|
|
609
|
+
headerActive.value = state.headerActive;
|
|
610
|
+
if (mixSidebar.value) {
|
|
611
|
+
sideboxData.value = state.sideboxData;
|
|
612
|
+
} else {
|
|
613
|
+
sidebarData.value = state.sidebarData;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
if (mixSidebar.value && sideboxActive.value !== state.sideboxActive) {
|
|
617
|
+
sideboxActive.value = state.sideboxActive;
|
|
618
|
+
sidebarData.value = state.sidebarData;
|
|
619
|
+
}
|
|
620
|
+
}, props.menuHoverTimeout);
|
|
621
|
+
};
|
|
423
622
|
watch(
|
|
424
623
|
() => props.menus,
|
|
425
624
|
() => {
|
|
@@ -462,11 +661,13 @@ const _sfc_main = defineComponent({
|
|
|
462
661
|
sideboxData.value = sideboxData.value.map((d) => {
|
|
463
662
|
return { ...d, children: d.tempChildren };
|
|
464
663
|
});
|
|
664
|
+
state.sideboxData = sideboxData.value;
|
|
465
665
|
return;
|
|
466
666
|
}
|
|
467
667
|
sideboxData.value = sideboxData.value.map((d) => {
|
|
468
668
|
return { ...d, children: void 0 };
|
|
469
669
|
});
|
|
670
|
+
state.sideboxData = sideboxData.value;
|
|
470
671
|
}
|
|
471
672
|
);
|
|
472
673
|
watch(
|
|
@@ -527,7 +728,7 @@ const _sfc_main = defineComponent({
|
|
|
527
728
|
props
|
|
528
729
|
);
|
|
529
730
|
const layoutProvide = computed(() => {
|
|
530
|
-
const
|
|
731
|
+
const state2 = {
|
|
531
732
|
mobile: mobile.value,
|
|
532
733
|
collapse: props.collapse,
|
|
533
734
|
compact: props.compact,
|
|
@@ -540,7 +741,7 @@ const _sfc_main = defineComponent({
|
|
|
540
741
|
keepAlive: props.tabBar && props.keepAlive,
|
|
541
742
|
responsive: props.responsive
|
|
542
743
|
};
|
|
543
|
-
return
|
|
744
|
+
return state2;
|
|
544
745
|
});
|
|
545
746
|
provide(LAYOUT_KEY, layoutProvide);
|
|
546
747
|
return {
|
|
@@ -576,8 +777,16 @@ const _sfc_main = defineComponent({
|
|
|
576
777
|
onHeadMenuOpen,
|
|
577
778
|
onHeadMenuClose,
|
|
578
779
|
onNavItemClick,
|
|
780
|
+
onNavItemMouseenter,
|
|
781
|
+
onNavMouseEnter,
|
|
782
|
+
onNavMouseLeave,
|
|
579
783
|
onBoxItemClick,
|
|
580
|
-
|
|
784
|
+
onBoxItemMouseenter,
|
|
785
|
+
onBoxMouseEnter,
|
|
786
|
+
onBoxMouseLeave,
|
|
787
|
+
onMenuItemClick,
|
|
788
|
+
onSideMouseEnter,
|
|
789
|
+
onSideMouseLeave
|
|
581
790
|
};
|
|
582
791
|
}
|
|
583
792
|
});
|
|
@@ -624,7 +833,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
624
833
|
onLogoClick: _ctx.onLogoClick,
|
|
625
834
|
onOpen: _ctx.onHeadMenuOpen,
|
|
626
835
|
onClsoe: _ctx.onHeadMenuClose,
|
|
627
|
-
onItemClick: _ctx.onNavItemClick
|
|
836
|
+
onItemClick: _ctx.onNavItemClick,
|
|
837
|
+
onItemMouseenter: _ctx.onNavItemMouseenter,
|
|
838
|
+
onMouseEnter: _ctx.onNavMouseEnter,
|
|
839
|
+
onMouseLeave: _ctx.onNavMouseLeave
|
|
628
840
|
}, createSlots({ _: 2 }, [
|
|
629
841
|
renderList(Object.keys(_ctx.$slots).filter(
|
|
630
842
|
(k) => ![
|
|
@@ -647,7 +859,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
647
859
|
])
|
|
648
860
|
};
|
|
649
861
|
})
|
|
650
|
-
]), 1032, ["menus", "headerStyle", "active", "ellipsis", "ellipsisProps", "menuTrigger", "itemTrigger", "collapse", "sidebar", "titleSlot", "iconSlot", "levels", "breadcrumb", "breadcrumbSeparator", "homePath", "isHome", "onLogoClick", "onOpen", "onClsoe", "onItemClick"]),
|
|
862
|
+
]), 1032, ["menus", "headerStyle", "active", "ellipsis", "ellipsisProps", "menuTrigger", "itemTrigger", "collapse", "sidebar", "titleSlot", "iconSlot", "levels", "breadcrumb", "breadcrumbSeparator", "homePath", "isHome", "onLogoClick", "onOpen", "onClsoe", "onItemClick", "onItemMouseenter", "onMouseEnter", "onMouseLeave"]),
|
|
651
863
|
createVNode(_component_EleWatermark, {
|
|
652
864
|
class: "ele-admin-main",
|
|
653
865
|
height: 68,
|
|
@@ -668,7 +880,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
668
880
|
itemTrigger: _ctx.boxTrigger,
|
|
669
881
|
titleSlot: _ctx.sideboxTitleSlot,
|
|
670
882
|
iconSlot: _ctx.sideboxIconSlot,
|
|
671
|
-
onItemClick: _ctx.onBoxItemClick
|
|
883
|
+
onItemClick: _ctx.onBoxItemClick,
|
|
884
|
+
onItemMouseenter: _ctx.onBoxItemMouseenter,
|
|
885
|
+
onMouseEnter: _ctx.onBoxMouseEnter,
|
|
886
|
+
onMouseLeave: _ctx.onBoxMouseLeave
|
|
672
887
|
}, createSlots({ _: 2 }, [
|
|
673
888
|
renderList(Object.keys(_ctx.$slots).filter(
|
|
674
889
|
(k) => ![
|
|
@@ -694,7 +909,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
694
909
|
])
|
|
695
910
|
};
|
|
696
911
|
})
|
|
697
|
-
]), 1032, ["menus", "sidebarStyle", "colorfulIcon", "active", "compact", "collapse", "popperEffect", "itemTrigger", "titleSlot", "iconSlot", "onItemClick"])) : createCommentVNode("", true),
|
|
912
|
+
]), 1032, ["menus", "sidebarStyle", "colorfulIcon", "active", "compact", "collapse", "popperEffect", "itemTrigger", "titleSlot", "iconSlot", "onItemClick", "onItemMouseenter", "onMouseEnter", "onMouseLeave"])) : createCommentVNode("", true),
|
|
698
913
|
_ctx.sidebar ? (openBlock(), createBlock(_component_ProSidebar, {
|
|
699
914
|
key: 1,
|
|
700
915
|
menus: _ctx.sidebarData,
|
|
@@ -710,7 +925,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
710
925
|
iconSlot: _ctx.sidebarIconSlot,
|
|
711
926
|
onOpen: _ctx.onSideMenuOpen,
|
|
712
927
|
onClsoe: _ctx.onSideMenuClose,
|
|
713
|
-
onItemClick: _ctx.onMenuItemClick
|
|
928
|
+
onItemClick: _ctx.onMenuItemClick,
|
|
929
|
+
onMouseEnter: _ctx.onSideMouseEnter,
|
|
930
|
+
onMouseLeave: _ctx.onSideMouseLeave
|
|
714
931
|
}, createSlots({ _: 2 }, [
|
|
715
932
|
renderList(Object.keys(_ctx.$slots).filter(
|
|
716
933
|
(k) => ![
|
|
@@ -736,7 +953,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
736
953
|
])
|
|
737
954
|
};
|
|
738
955
|
})
|
|
739
|
-
]), 1032, ["menus", "sidebarStyle", "colorfulIcon", "active", "collapse", "uniqueOpened", "defaultOpeneds", "popperEffect", "itemTrigger", "titleSlot", "iconSlot", "onOpen", "onClsoe", "onItemClick"])) : createCommentVNode("", true),
|
|
956
|
+
]), 1032, ["menus", "sidebarStyle", "colorfulIcon", "active", "collapse", "uniqueOpened", "defaultOpeneds", "popperEffect", "itemTrigger", "titleSlot", "iconSlot", "onOpen", "onClsoe", "onItemClick", "onMouseEnter", "onMouseLeave"])) : createCommentVNode("", true),
|
|
740
957
|
createElementVNode("div", _hoisted_1, [
|
|
741
958
|
_ctx.tabBar ? (openBlock(), createBlock(_component_ProTabs, {
|
|
742
959
|
key: 0,
|
|
@@ -201,6 +201,11 @@ export declare const proLayoutProps: {
|
|
|
201
201
|
type: BooleanConstructor;
|
|
202
202
|
default: boolean;
|
|
203
203
|
};
|
|
204
|
+
/** 菜单切换超时 */
|
|
205
|
+
menuHoverTimeout: {
|
|
206
|
+
type: NumberConstructor;
|
|
207
|
+
default: number;
|
|
208
|
+
};
|
|
204
209
|
};
|
|
205
210
|
export type ProLayoutProps = ExtractPropTypes<typeof proLayoutProps>;
|
|
206
211
|
/**
|
|
@@ -230,12 +230,12 @@ export type BreadcrumbSeparator = ElBreadcrumbProps['separatorIcon'];
|
|
|
230
230
|
/**
|
|
231
231
|
* 混合模式菜单切换模式
|
|
232
232
|
*/
|
|
233
|
-
export type MenuItemTrigger = 'route' | 'click';
|
|
233
|
+
export type MenuItemTrigger = 'route' | 'click' | 'hover';
|
|
234
234
|
|
|
235
235
|
/**
|
|
236
|
-
*
|
|
236
|
+
* 子菜单项点击前钩子
|
|
237
237
|
*/
|
|
238
|
-
export type BeforeClick = (item: EleMenuItemProps) => boolean;
|
|
238
|
+
export type BeforeClick = (item: EleMenuItemProps, e: MouseEvent) => boolean;
|
|
239
239
|
|
|
240
240
|
/**
|
|
241
241
|
* 内链数据
|
|
@@ -245,9 +245,35 @@ export interface IframeItem {
|
|
|
245
245
|
id: string;
|
|
246
246
|
/** 地址 */
|
|
247
247
|
src: string;
|
|
248
|
+
/** 是否是刷新状态 */
|
|
249
|
+
refresh?: boolean;
|
|
248
250
|
}
|
|
249
251
|
|
|
250
252
|
/**
|
|
251
253
|
* 标签页标题组件实例
|
|
252
254
|
*/
|
|
253
255
|
export type TabTitleInstance = InstanceType<typeof TabTitle> | null;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* 顶栏状态数据
|
|
259
|
+
*/
|
|
260
|
+
export interface HeaderState {
|
|
261
|
+
/** 是否是鼠标进入状态 */
|
|
262
|
+
hover: boolean;
|
|
263
|
+
/** 鼠标离开状态定时器 */
|
|
264
|
+
timer?: number | null;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* 状态数据
|
|
269
|
+
*/
|
|
270
|
+
export interface LayoutState {
|
|
271
|
+
headerActive?: string;
|
|
272
|
+
sideboxActive?: string;
|
|
273
|
+
sidebarActive?: string;
|
|
274
|
+
headerData: MenuItem[];
|
|
275
|
+
sideboxData: MenuItem[];
|
|
276
|
+
sidebarData: MenuItem[];
|
|
277
|
+
menuTimer?: number | null;
|
|
278
|
+
isHover: boolean;
|
|
279
|
+
}
|
|
@@ -24,8 +24,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
24
24
|
};
|
|
25
25
|
size: import("vue").PropType<import("./types").SegmentedSize>;
|
|
26
26
|
}>> & {
|
|
27
|
-
"onUpdate:modelValue"?: ((_value: string | number) => any) | undefined;
|
|
28
27
|
onChange?: ((_active: string | number) => any) | undefined;
|
|
28
|
+
"onUpdate:modelValue"?: ((_value: string | number) => any) | undefined;
|
|
29
29
|
}, {
|
|
30
30
|
disabled: boolean;
|
|
31
31
|
block: boolean;
|
|
@@ -158,13 +158,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
158
158
|
}>> & {
|
|
159
159
|
onFocus?: ((_e: FocusEvent) => any) | undefined;
|
|
160
160
|
onBlur?: ((_e: FocusEvent) => any) | undefined;
|
|
161
|
-
"onUpdate:modelValue"?: ((_value: SelectValue) => any) | undefined;
|
|
162
161
|
onChange?: ((_value: SelectValue) => any) | undefined;
|
|
162
|
+
"onUpdate:modelValue"?: ((_value: SelectValue) => any) | undefined;
|
|
163
|
+
onVisibleChange?: ((_visible: boolean) => any) | undefined;
|
|
164
|
+
onRemoveTag?: ((_value: SingleValue) => any) | undefined;
|
|
163
165
|
onClear?: (() => any) | undefined;
|
|
164
166
|
onSelect?: ((_item: DataItem | DataItem[]) => any) | undefined;
|
|
165
167
|
onFilterChange?: ((_value: string) => any) | undefined;
|
|
166
|
-
onRemoveTag?: ((_value: SingleValue) => any) | undefined;
|
|
167
|
-
onVisibleChange?: ((_visible: boolean) => any) | undefined;
|
|
168
168
|
}, {
|
|
169
169
|
placement: import("element-plus/es/utils/index").EpPropMergeType<StringConstructor, import("element-plus").Placement, unknown> | undefined;
|
|
170
170
|
disabled: boolean;
|
|
@@ -173,11 +173,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
173
173
|
clearable: boolean;
|
|
174
174
|
persistent: boolean;
|
|
175
175
|
transition: string;
|
|
176
|
+
filterable: boolean;
|
|
177
|
+
tagType: import("element-plus/es/utils/index").EpPropMergeType<StringConstructor, "success" | "warning" | "info" | "primary" | "danger", unknown> | undefined;
|
|
176
178
|
multiple: boolean;
|
|
177
179
|
responsive: boolean;
|
|
178
|
-
tagType: import("element-plus/es/utils/index").EpPropMergeType<StringConstructor, "success" | "warning" | "info" | "primary" | "danger", unknown> | undefined;
|
|
179
180
|
automaticDropdown: boolean;
|
|
180
|
-
filterable: boolean;
|
|
181
181
|
valueKey: string;
|
|
182
182
|
labelKey: string;
|
|
183
183
|
}, {}>;
|
|
@@ -132,11 +132,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
132
132
|
}>> & {
|
|
133
133
|
onFocus?: ((_e: FocusEvent) => any) | undefined;
|
|
134
134
|
onBlur?: ((_e: FocusEvent) => any) | undefined;
|
|
135
|
-
"onUpdate:modelValue"?: ((_value: SelectValue) => any) | undefined;
|
|
136
135
|
onChange?: ((_value: SelectValue) => any) | undefined;
|
|
137
|
-
|
|
138
|
-
onRemoveTag?: ((_value: SingleValue) => any) | undefined;
|
|
136
|
+
"onUpdate:modelValue"?: ((_value: SelectValue) => any) | undefined;
|
|
139
137
|
onVisibleChange?: ((_visible: boolean) => any) | undefined;
|
|
138
|
+
onRemoveTag?: ((_value: SingleValue) => any) | undefined;
|
|
139
|
+
onClear?: (() => any) | undefined;
|
|
140
140
|
}, {
|
|
141
141
|
placement: import("element-plus/es/utils/index").EpPropMergeType<StringConstructor, import("element-plus").Placement, unknown> | undefined;
|
|
142
142
|
disabled: boolean;
|
|
@@ -145,10 +145,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
145
145
|
clearable: boolean;
|
|
146
146
|
persistent: boolean;
|
|
147
147
|
transition: string;
|
|
148
|
-
|
|
148
|
+
filterable: boolean;
|
|
149
149
|
tagType: import("element-plus/es/utils/index").EpPropMergeType<StringConstructor, "success" | "warning" | "info" | "primary" | "danger", unknown> | undefined;
|
|
150
|
+
multiple: boolean;
|
|
150
151
|
automaticDropdown: boolean;
|
|
151
|
-
filterable: boolean;
|
|
152
152
|
checkedValueStrategy: boolean;
|
|
153
153
|
}, {}>;
|
|
154
154
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type { ElProgressProps } from '../../ele-app/el';
|
|
2
|
+
import type { ElProgressProps, ElImageProps } from '../../ele-app/el';
|
|
3
3
|
import type { UploadItem, UploadLocale } from '../types';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
5
5
|
/** 数据 */
|
|
@@ -11,6 +11,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11
11
|
readonly: BooleanConstructor;
|
|
12
12
|
/** 是否禁用 */
|
|
13
13
|
disabled: BooleanConstructor;
|
|
14
|
+
/** 自定义条目样式 */
|
|
15
|
+
imageProps: PropType<ElImageProps>;
|
|
14
16
|
/** 进度条属性 */
|
|
15
17
|
progressProps: PropType<ElProgressProps>;
|
|
16
18
|
/** 国际化 */
|
|
@@ -36,6 +38,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
36
38
|
readonly: BooleanConstructor;
|
|
37
39
|
/** 是否禁用 */
|
|
38
40
|
disabled: BooleanConstructor;
|
|
41
|
+
/** 自定义条目样式 */
|
|
42
|
+
imageProps: PropType<ElImageProps>;
|
|
39
43
|
/** 进度条属性 */
|
|
40
44
|
progressProps: PropType<ElProgressProps>;
|
|
41
45
|
/** 国际化 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, resolveComponent, openBlock, createElementBlock, renderSlot, createBlock, createVNode, withCtx, withModifiers, createCommentVNode, createElementVNode, toDisplayString
|
|
1
|
+
import { defineComponent, resolveComponent, openBlock, createElementBlock, renderSlot, createBlock, mergeProps, createVNode, withCtx, withModifiers, createCommentVNode, createElementVNode, toDisplayString } from "vue";
|
|
2
2
|
import { ElImage, ElProgress, ElIcon } from "element-plus";
|
|
3
3
|
import { CloseOutlined, SyncOutlined, FileOutlined } from "../../icons";
|
|
4
4
|
import EleTooltip from "../../ele-tooltip/index";
|
|
@@ -23,6 +23,8 @@ const _sfc_main = defineComponent({
|
|
|
23
23
|
readonly: Boolean,
|
|
24
24
|
/** 是否禁用 */
|
|
25
25
|
disabled: Boolean,
|
|
26
|
+
/** 自定义条目样式 */
|
|
27
|
+
imageProps: Object,
|
|
26
28
|
/** 进度条属性 */
|
|
27
29
|
progressProps: Object,
|
|
28
30
|
/** 国际化 */
|
|
@@ -84,11 +86,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
84
86
|
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.onItemClick && _ctx.onItemClick(...args))
|
|
85
87
|
}, [
|
|
86
88
|
renderSlot(_ctx.$slots, "thumbnail", { item: _ctx.item }, () => [
|
|
87
|
-
_ctx.item.url ? (openBlock(), createBlock(_component_ElImage, {
|
|
89
|
+
_ctx.item.url ? (openBlock(), createBlock(_component_ElImage, mergeProps({
|
|
88
90
|
key: 0,
|
|
89
|
-
fit: "cover"
|
|
91
|
+
fit: "cover"
|
|
92
|
+
}, _ctx.imageProps || {}, {
|
|
90
93
|
src: _ctx.item.url
|
|
91
|
-
}, null,
|
|
94
|
+
}), null, 16, ["src"])) : (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
92
95
|
createVNode(_component_ElIcon, null, {
|
|
93
96
|
default: withCtx(() => [
|
|
94
97
|
createVNode(_component_FileOutlined)
|