next-element-vue 0.4.1 → 0.4.3
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/index.css +1 -1
- package/dist/index.js +207 -53
- package/dist/index.min.js +3 -3
- package/dist/index.umd.js +200 -52
- package/dist/index.umd.min.js +3 -3
- package/dist/packages/components/layout/src/composite/index.d.ts +29 -0
- package/dist/packages/components/layout/src/composite/widgets/header.d.ts +2 -0
- package/dist/packages/components/layout/src/composite/widgets/menu-top.d.ts +34 -0
- package/dist/packages/components/layout/src/composite/widgets/sidebar.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* 作 者:huangteng
|
|
4
4
|
* 邮 箱:htengweb@163.com
|
|
5
|
-
* 当前版本:0.4.
|
|
6
|
-
* 发布日期:2024-11-
|
|
5
|
+
* 当前版本:0.4.3 v
|
|
6
|
+
* 发布日期:2024-11-20
|
|
7
7
|
* 地 址:https://www.npmjs.com/package/next-element-vue
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -1038,11 +1038,11 @@
|
|
|
1038
1038
|
}
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
|
-
const {getLightColor: getLightColor$
|
|
1041
|
+
const {getLightColor: getLightColor$5} = useChangeColor(), nextUseCssVar = (cssvar, value) => {
|
|
1042
1042
|
document.documentElement.style.setProperty(cssvar, value);
|
|
1043
1043
|
}, nextUseCssTheme = (cssvar, value) => {
|
|
1044
1044
|
nextUseCssVar(cssvar, value);
|
|
1045
|
-
for (let i = 1; i < 10; i++) nextUseCssVar(cssvar + "-light-" + i, getLightColor$
|
|
1045
|
+
for (let i = 1; i < 10; i++) nextUseCssVar(cssvar + "-light-" + i, getLightColor$5(value, i / 10));
|
|
1046
1046
|
nextUseCssVar(`${cssvar}-dark-2`, value);
|
|
1047
1047
|
}, themeColorCssEnum = {
|
|
1048
1048
|
themeColor: "--el-color-primary",
|
|
@@ -1155,7 +1155,7 @@
|
|
|
1155
1155
|
isDark: !1
|
|
1156
1156
|
}
|
|
1157
1157
|
};
|
|
1158
|
-
const ns$
|
|
1158
|
+
const ns$n = useNamespace("text-ellipsis");
|
|
1159
1159
|
const NextTextEllipsis = withInstall(vue.defineComponent({
|
|
1160
1160
|
name: "NextTextEllipsis",
|
|
1161
1161
|
props: {
|
|
@@ -1201,7 +1201,7 @@
|
|
|
1201
1201
|
}
|
|
1202
1202
|
};
|
|
1203
1203
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
1204
|
-
class: [ ns$
|
|
1204
|
+
class: [ ns$n.b(), props.class ],
|
|
1205
1205
|
style: setWidth.value,
|
|
1206
1206
|
onMouseenter: onMouseenter
|
|
1207
1207
|
}, [ isTip.value ? vue.createVNode(elementPlus.ElTooltip, {
|
|
@@ -1211,11 +1211,11 @@
|
|
|
1211
1211
|
disabled: props.disabled
|
|
1212
1212
|
}, {
|
|
1213
1213
|
default: () => [ vue.createVNode("span", {
|
|
1214
|
-
class: ns$
|
|
1214
|
+
class: ns$n.e("text"),
|
|
1215
1215
|
ref: ellipsisRef
|
|
1216
1216
|
}, [ slots.default ? slots.default() : props.content ]) ]
|
|
1217
1217
|
}) : vue.createVNode("span", {
|
|
1218
|
-
class: ns$
|
|
1218
|
+
class: ns$n.e("text"),
|
|
1219
1219
|
ref: ellipsisRef
|
|
1220
1220
|
}, [ slots.default ? slots.default() : props.content ]) ]) ]);
|
|
1221
1221
|
}
|
|
@@ -1550,6 +1550,9 @@
|
|
|
1550
1550
|
}, {
|
|
1551
1551
|
type: "columns",
|
|
1552
1552
|
text: "分栏"
|
|
1553
|
+
}, {
|
|
1554
|
+
type: "composite",
|
|
1555
|
+
text: "综合"
|
|
1553
1556
|
} ];
|
|
1554
1557
|
return vue.createVNode(elementPlus.ElScrollbar, null, {
|
|
1555
1558
|
default: () => [ vue.createVNode(elementPlus.ElDivider, {
|
|
@@ -1802,8 +1805,8 @@
|
|
|
1802
1805
|
}) ]);
|
|
1803
1806
|
}
|
|
1804
1807
|
});
|
|
1805
|
-
const {getLightColor: getLightColor$
|
|
1806
|
-
var Header$
|
|
1808
|
+
const {getLightColor: getLightColor$4} = useChangeColor();
|
|
1809
|
+
var Header$4 = vue.defineComponent({
|
|
1807
1810
|
setup: () => ({
|
|
1808
1811
|
ns: vue.inject("ns", {})
|
|
1809
1812
|
}),
|
|
@@ -1811,7 +1814,7 @@
|
|
|
1811
1814
|
const slots = this.$slots, _ns = this.ns, _config = vue.inject("options", {}), headerStyle = vue.computed((() => {
|
|
1812
1815
|
const {isHeaderBarColorGradual: isHeaderBarColorGradual, headerBarColor: color} = _config.setting;
|
|
1813
1816
|
return isHeaderBarColorGradual ? {
|
|
1814
|
-
background: `linear-gradient(to bottom , ${color}, ${getLightColor$
|
|
1817
|
+
background: `linear-gradient(to bottom , ${color}, ${getLightColor$4(color, .5)})`
|
|
1815
1818
|
} : "";
|
|
1816
1819
|
})), __slots_header_tools = {};
|
|
1817
1820
|
return slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
@@ -2553,7 +2556,7 @@
|
|
|
2553
2556
|
}, null) ]
|
|
2554
2557
|
}))) ]) ]);
|
|
2555
2558
|
}
|
|
2556
|
-
}), ns$
|
|
2559
|
+
}), ns$m = useNamespace("menu");
|
|
2557
2560
|
const NextMenu = withInstall(vue.defineComponent({
|
|
2558
2561
|
name: "NextMenu",
|
|
2559
2562
|
props: {
|
|
@@ -2580,21 +2583,22 @@
|
|
|
2580
2583
|
}
|
|
2581
2584
|
},
|
|
2582
2585
|
setup(props) {
|
|
2583
|
-
vue.provide("ns", ns$
|
|
2586
|
+
vue.provide("ns", ns$m);
|
|
2584
2587
|
const router = vue.getCurrentInstance().appContext.config.globalProperties.$router, currentPath = router.currentRoute?.value.fullPath, activePath = vue.ref(currentPath);
|
|
2585
2588
|
vue.watch((() => router.currentRoute?.value), (to => {
|
|
2586
2589
|
activePath.value = to.fullPath;
|
|
2587
2590
|
}));
|
|
2588
2591
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode(elementPlus.ElMenu, {
|
|
2589
|
-
class: [ ns$
|
|
2592
|
+
class: [ ns$m.b(), props.className ],
|
|
2590
2593
|
style: props.style,
|
|
2594
|
+
"popper-class": ns$m.b("popper"),
|
|
2591
2595
|
defaultActive: activePath.value,
|
|
2592
2596
|
router: props.router,
|
|
2593
2597
|
mode: props.mode,
|
|
2594
2598
|
ellipsis: !0
|
|
2595
2599
|
}, {
|
|
2596
2600
|
default: () => [ vue.createVNode(vue.Fragment, null, [ props.menuTree.map((item => item.children?.length ? valueExist(item.meta?.isHide, !1) ? null : vue.createVNode(elementPlus.ElSubMenu, {
|
|
2597
|
-
"popper-class": ns$
|
|
2601
|
+
"popper-class": ns$m.b("popper"),
|
|
2598
2602
|
index: item.path || item.id,
|
|
2599
2603
|
teleported: !0
|
|
2600
2604
|
}, {
|
|
@@ -2605,7 +2609,7 @@
|
|
|
2605
2609
|
menuData: item.children
|
|
2606
2610
|
}, null)
|
|
2607
2611
|
}) : valueExist(item.meta?.isHide, !1) ? null : vue.createVNode(elementPlus.ElMenuItem, {
|
|
2608
|
-
"popper-class": ns$
|
|
2612
|
+
"popper-class": ns$m.b("popper"),
|
|
2609
2613
|
index: item.path
|
|
2610
2614
|
}, {
|
|
2611
2615
|
default: () => [ vue.createVNode(MenuItemTitle, {
|
|
@@ -2615,7 +2619,7 @@
|
|
|
2615
2619
|
}) ]);
|
|
2616
2620
|
}
|
|
2617
2621
|
}));
|
|
2618
|
-
var Sidebar$
|
|
2622
|
+
var Sidebar$3 = vue.defineComponent({
|
|
2619
2623
|
setup: () => ({
|
|
2620
2624
|
ns: vue.inject("ns", {})
|
|
2621
2625
|
}),
|
|
@@ -2631,10 +2635,10 @@
|
|
|
2631
2635
|
}) ]);
|
|
2632
2636
|
}
|
|
2633
2637
|
});
|
|
2634
|
-
const ns$
|
|
2638
|
+
const ns$l = useNamespace("layout-defaults");
|
|
2635
2639
|
var defaults = vue.defineComponent({
|
|
2636
2640
|
props: {},
|
|
2637
|
-
setup: () => (vue.provide("ns", ns$
|
|
2641
|
+
setup: () => (vue.provide("ns", ns$l), {}),
|
|
2638
2642
|
render() {
|
|
2639
2643
|
const slots = this.$slots, _config = vue.inject("options", {}), _emit = vue.inject("__emit__", {});
|
|
2640
2644
|
slots.menu;
|
|
@@ -2643,12 +2647,12 @@
|
|
|
2643
2647
|
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
2644
2648
|
const isTabs = vue.ref(!!slots.tabs);
|
|
2645
2649
|
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), vue.createVNode(elementPlus.ElContainer, {
|
|
2646
|
-
class: ns$
|
|
2650
|
+
class: ns$l.b()
|
|
2647
2651
|
}, {
|
|
2648
2652
|
default: () => {
|
|
2649
|
-
return [ vue.createVNode(Sidebar$
|
|
2650
|
-
class: [ ns$
|
|
2651
|
-
}, [ vue.createVNode(Header$
|
|
2653
|
+
return [ vue.createVNode(Sidebar$3, null, null), vue.createVNode("div", {
|
|
2654
|
+
class: [ ns$l.b("content") ]
|
|
2655
|
+
}, [ vue.createVNode(Header$4, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? __slots_header_tools : {
|
|
2652
2656
|
default: () => [ __slots_header_tools ]
|
|
2653
2657
|
})), _config.showTabs ? slots.tabs ? slots.tabs?.() : vue.createVNode(NextTabs, {
|
|
2654
2658
|
tabs: _config.tabs,
|
|
@@ -2657,20 +2661,20 @@
|
|
|
2657
2661
|
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2658
2662
|
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2659
2663
|
}, null) : null, vue.createVNode("main", {
|
|
2660
|
-
class: [ ns$
|
|
2664
|
+
class: [ ns$l.bf("main"), ns$l.is("layout-tabs", isTabs.value) ]
|
|
2661
2665
|
}, [ slots.default?.() ]) ]) ];
|
|
2662
2666
|
var s;
|
|
2663
2667
|
}
|
|
2664
2668
|
});
|
|
2665
2669
|
}
|
|
2666
2670
|
});
|
|
2667
|
-
const {getLightColor: getLightColor$
|
|
2668
|
-
var Header$
|
|
2671
|
+
const {getLightColor: getLightColor$3} = useChangeColor();
|
|
2672
|
+
var Header$3 = vue.defineComponent({
|
|
2669
2673
|
setup(props, {slots: slots}) {
|
|
2670
2674
|
const _ns = vue.inject("ns", {}), _config = vue.inject("options", {}), headerStyle = vue.computed((() => {
|
|
2671
2675
|
const {isHeaderBarColorGradual: isHeaderBarColorGradual, headerBarColor: color} = _config.setting;
|
|
2672
2676
|
return isHeaderBarColorGradual ? {
|
|
2673
|
-
background: `linear-gradient(to bottom , ${color}, ${getLightColor$
|
|
2677
|
+
background: `linear-gradient(to bottom , ${color}, ${getLightColor$3(color, .5)})`
|
|
2674
2678
|
} : "";
|
|
2675
2679
|
})), __slots_header_tools = {};
|
|
2676
2680
|
slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
@@ -2694,17 +2698,17 @@
|
|
|
2694
2698
|
};
|
|
2695
2699
|
}
|
|
2696
2700
|
});
|
|
2697
|
-
const ns$
|
|
2701
|
+
const ns$k = useNamespace("layout-transverse");
|
|
2698
2702
|
var transverse = vue.defineComponent({
|
|
2699
2703
|
props: {},
|
|
2700
|
-
setup: () => (vue.provide("ns", ns$
|
|
2704
|
+
setup: () => (vue.provide("ns", ns$k), {}),
|
|
2701
2705
|
render() {
|
|
2702
2706
|
const slots = this.$slots, _config = vue.inject("options", {}), _emit = vue.inject("__emit__", {}), __slots_header = {};
|
|
2703
2707
|
slots[slots_config_headerMenu] && (__slots_header[slots_config_headerMenu] = () => slots[slots_config_headerMenu]()),
|
|
2704
2708
|
slots[slots_config_headerToolsPrefix] && (__slots_header[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
2705
2709
|
slots[slots_config_headerToolsSuffix] && (__slots_header[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
2706
2710
|
const isTabs = vue.ref(!!slots.tabs);
|
|
2707
|
-
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), vue.createVNode(vue.Fragment, null, [ vue.createVNode(Header$
|
|
2711
|
+
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), vue.createVNode(vue.Fragment, null, [ vue.createVNode(Header$3, null, (s = __slots_header,
|
|
2708
2712
|
"function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? __slots_header : {
|
|
2709
2713
|
default: () => [ __slots_header ]
|
|
2710
2714
|
})), _config.showTabs ? slots.tabs ? slots.tabs?.() : vue.createVNode(NextTabs, {
|
|
@@ -2714,18 +2718,18 @@
|
|
|
2714
2718
|
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2715
2719
|
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2716
2720
|
}, null) : null, vue.createVNode("main", {
|
|
2717
|
-
class: [ ns$
|
|
2721
|
+
class: [ ns$k.b("main"), ns$k.is("layout-tabs", isTabs.value) ]
|
|
2718
2722
|
}, [ slots.default?.() ]) ]);
|
|
2719
2723
|
var s;
|
|
2720
2724
|
}
|
|
2721
2725
|
});
|
|
2722
|
-
const {getLightColor: getLightColor$
|
|
2723
|
-
var Header$
|
|
2726
|
+
const {getLightColor: getLightColor$2} = useChangeColor();
|
|
2727
|
+
var Header$2 = vue.defineComponent({
|
|
2724
2728
|
setup(props, {slots: slots}) {
|
|
2725
2729
|
const _ns = vue.inject("ns", {}), _config = vue.inject("options", {}), headerStyle = vue.computed((() => {
|
|
2726
2730
|
const {isHeaderBarColorGradual: isHeaderBarColorGradual, headerBarColor: color} = _config.setting;
|
|
2727
2731
|
return isHeaderBarColorGradual ? {
|
|
2728
|
-
background: `linear-gradient(to bottom , ${color}, ${getLightColor$
|
|
2732
|
+
background: `linear-gradient(to bottom , ${color}, ${getLightColor$2(color, .5)})`
|
|
2729
2733
|
} : "";
|
|
2730
2734
|
})), __slots_header_tools = {};
|
|
2731
2735
|
slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
@@ -2744,7 +2748,7 @@
|
|
|
2744
2748
|
var s;
|
|
2745
2749
|
};
|
|
2746
2750
|
}
|
|
2747
|
-
}), Sidebar$
|
|
2751
|
+
}), Sidebar$2 = vue.defineComponent({
|
|
2748
2752
|
setup: () => ({
|
|
2749
2753
|
ns: vue.inject("ns", {})
|
|
2750
2754
|
}),
|
|
@@ -2758,10 +2762,10 @@
|
|
|
2758
2762
|
}, null) ]);
|
|
2759
2763
|
}
|
|
2760
2764
|
});
|
|
2761
|
-
const ns$
|
|
2765
|
+
const ns$j = useNamespace("layout-columns");
|
|
2762
2766
|
var columns = vue.defineComponent({
|
|
2763
2767
|
props: {},
|
|
2764
|
-
setup: () => (vue.provide("ns", ns$
|
|
2768
|
+
setup: () => (vue.provide("ns", ns$j), {}),
|
|
2765
2769
|
render() {
|
|
2766
2770
|
const slots = this.$slots, _config = vue.inject("options", {}), _emit = vue.inject("__emit__", {}), __slots_header = {};
|
|
2767
2771
|
slots[slots_config_headerMenu] && (__slots_header[slots_config_headerMenu] = () => slots[slots_config_headerMenu]()),
|
|
@@ -2769,12 +2773,12 @@
|
|
|
2769
2773
|
slots[slots_config_headerToolsSuffix] && (__slots_header[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
2770
2774
|
const isTabs = vue.ref(!!slots.tabs);
|
|
2771
2775
|
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), vue.createVNode(elementPlus.ElContainer, {
|
|
2772
|
-
class: ns$
|
|
2776
|
+
class: ns$j.b()
|
|
2773
2777
|
}, {
|
|
2774
2778
|
default: () => {
|
|
2775
|
-
return [ vue.createVNode(Sidebar$
|
|
2776
|
-
class: [ ns$
|
|
2777
|
-
}, [ vue.createVNode(Header$
|
|
2779
|
+
return [ vue.createVNode(Sidebar$2, null, null), vue.createVNode("div", {
|
|
2780
|
+
class: [ ns$j.b("content") ]
|
|
2781
|
+
}, [ vue.createVNode(Header$2, null, (s = __slots_header, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? __slots_header : {
|
|
2778
2782
|
default: () => [ __slots_header ]
|
|
2779
2783
|
})), _config.showTabs ? slots.tabs ? slots.tabs?.() : vue.createVNode(NextTabs, {
|
|
2780
2784
|
tabs: _config.tabs,
|
|
@@ -2783,20 +2787,20 @@
|
|
|
2783
2787
|
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2784
2788
|
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2785
2789
|
}, null) : null, vue.createVNode("main", {
|
|
2786
|
-
class: [ ns$
|
|
2790
|
+
class: [ ns$j.bf("main"), ns$j.is("layout-tabs", isTabs.value) ]
|
|
2787
2791
|
}, [ slots.default?.() ]) ]) ];
|
|
2788
2792
|
var s;
|
|
2789
2793
|
}
|
|
2790
2794
|
});
|
|
2791
2795
|
}
|
|
2792
2796
|
});
|
|
2793
|
-
const {getLightColor: getLightColor} = useChangeColor();
|
|
2794
|
-
var Header = vue.defineComponent({
|
|
2797
|
+
const {getLightColor: getLightColor$1} = useChangeColor();
|
|
2798
|
+
var Header$1 = vue.defineComponent({
|
|
2795
2799
|
setup(props, {slots: slots}) {
|
|
2796
2800
|
const _ns = vue.inject("ns", {}), _config = vue.inject("options", {}), headerStyle = vue.computed((() => {
|
|
2797
2801
|
const {isHeaderBarColorGradual: isHeaderBarColorGradual, headerBarColor: color} = _config.setting;
|
|
2798
2802
|
return isHeaderBarColorGradual ? {
|
|
2799
|
-
background: `linear-gradient(to bottom , ${color}, ${getLightColor(color, .5)})`
|
|
2803
|
+
background: `linear-gradient(to bottom , ${color}, ${getLightColor$1(color, .5)})`
|
|
2800
2804
|
} : "";
|
|
2801
2805
|
})), __slots_header_tools = {};
|
|
2802
2806
|
slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
@@ -2815,7 +2819,7 @@
|
|
|
2815
2819
|
var s;
|
|
2816
2820
|
};
|
|
2817
2821
|
}
|
|
2818
|
-
}), Sidebar = vue.defineComponent({
|
|
2822
|
+
}), Sidebar$1 = vue.defineComponent({
|
|
2819
2823
|
setup: () => ({
|
|
2820
2824
|
ns: vue.inject("ns", {})
|
|
2821
2825
|
}),
|
|
@@ -2831,12 +2835,155 @@
|
|
|
2831
2835
|
}) ]);
|
|
2832
2836
|
}
|
|
2833
2837
|
});
|
|
2834
|
-
const ns$
|
|
2838
|
+
const ns$i = useNamespace("layout-classic");
|
|
2835
2839
|
var classic = vue.defineComponent({
|
|
2836
2840
|
props: {},
|
|
2837
|
-
setup: () => (vue.provide("ns", ns$
|
|
2838
|
-
ns: ns$
|
|
2841
|
+
setup: () => (vue.provide("ns", ns$i), {
|
|
2842
|
+
ns: ns$i
|
|
2839
2843
|
}),
|
|
2844
|
+
render() {
|
|
2845
|
+
const slots = this.$slots, _config = vue.inject("options", {}), _emit = vue.inject("__emit__", {});
|
|
2846
|
+
slots.menu;
|
|
2847
|
+
const __slots_header_tools = {};
|
|
2848
|
+
slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
2849
|
+
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
2850
|
+
const isTabs = vue.ref(!!slots.tabs);
|
|
2851
|
+
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), vue.createVNode(vue.Fragment, null, [ vue.createVNode(Header$1, null, (s = __slots_header_tools,
|
|
2852
|
+
"function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? __slots_header_tools : {
|
|
2853
|
+
default: () => [ __slots_header_tools ]
|
|
2854
|
+
})), vue.createVNode("div", {
|
|
2855
|
+
class: [ ns$i.b("content"), ns$i.is("layout-tabs", isTabs.value) ]
|
|
2856
|
+
}, [ vue.createVNode(Sidebar$1, null, null), vue.createVNode("div", {
|
|
2857
|
+
class: ns$i.b("container")
|
|
2858
|
+
}, [ _config.showTabs ? slots.tabs ? slots.tabs?.() : vue.createVNode(NextTabs, {
|
|
2859
|
+
tabs: _config.tabs,
|
|
2860
|
+
activeTab: _config.activeTab,
|
|
2861
|
+
onChange: (...arg) => _emit("tabsChange", ...arg),
|
|
2862
|
+
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2863
|
+
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2864
|
+
}, null) : null, vue.createVNode("main", {
|
|
2865
|
+
class: [ ns$i.b("main") ]
|
|
2866
|
+
}, [ slots.default?.() ]) ]) ]) ]);
|
|
2867
|
+
var s;
|
|
2868
|
+
}
|
|
2869
|
+
});
|
|
2870
|
+
const findParentNode = (path, tree) => {
|
|
2871
|
+
for (const node of tree) {
|
|
2872
|
+
if (node.children?.some((child => child.path === path))) return node;
|
|
2873
|
+
if (node.children) {
|
|
2874
|
+
const parent = findParentNode(path, node.children);
|
|
2875
|
+
if (parent) return parent;
|
|
2876
|
+
}
|
|
2877
|
+
}
|
|
2878
|
+
return null;
|
|
2879
|
+
}, ns$h = useNamespace("menu");
|
|
2880
|
+
var MenuTop = vue.defineComponent({
|
|
2881
|
+
props: {
|
|
2882
|
+
className: {
|
|
2883
|
+
type: String,
|
|
2884
|
+
default: ""
|
|
2885
|
+
},
|
|
2886
|
+
style: {
|
|
2887
|
+
type: Object,
|
|
2888
|
+
default: () => ({})
|
|
2889
|
+
},
|
|
2890
|
+
menuTree: {
|
|
2891
|
+
type: Array,
|
|
2892
|
+
default: () => []
|
|
2893
|
+
}
|
|
2894
|
+
},
|
|
2895
|
+
setup(props) {
|
|
2896
|
+
vue.provide("ns", ns$h);
|
|
2897
|
+
const updateSubmentTree = vue.inject("updateSubmentTree"), router = vue.getCurrentInstance().appContext.config.globalProperties.$router, currentPath = router.currentRoute?.value.fullPath, parentNode = findParentNode(currentPath, props.menuTree), activeMenuId = vue.ref(parentNode?.id);
|
|
2898
|
+
parentNode?.id && updateSubmentTree(parentNode.children), vue.watch((() => router.currentRoute?.value), (to => {
|
|
2899
|
+
const parentNode = findParentNode(to.fullPath, props.menuTree);
|
|
2900
|
+
activeMenuId.value = parentNode?.id, parentNode?.id && updateSubmentTree(parentNode.children);
|
|
2901
|
+
}));
|
|
2902
|
+
const findTreeFirst = tree => {
|
|
2903
|
+
let result = tree[0];
|
|
2904
|
+
for (let i = 0; i < tree.length; i++) {
|
|
2905
|
+
const node = tree[i];
|
|
2906
|
+
if (node.children?.length && (result = findTreeFirst(node.children), result)) break;
|
|
2907
|
+
}
|
|
2908
|
+
return result;
|
|
2909
|
+
}, renderContent = () => vue.createVNode(elementPlus.ElMenu, {
|
|
2910
|
+
class: [ ns$h.b(), props.className ],
|
|
2911
|
+
style: props.style,
|
|
2912
|
+
"popper-class": ns$h.b("popper"),
|
|
2913
|
+
defaultActive: activeMenuId.value,
|
|
2914
|
+
mode: "horizontal",
|
|
2915
|
+
ellipsis: !0
|
|
2916
|
+
}, {
|
|
2917
|
+
default: () => [ vue.createVNode(vue.Fragment, null, [ props.menuTree.map((item => valueExist(item.meta?.isHide, !1) ? null : vue.createVNode(elementPlus.ElMenuItem, {
|
|
2918
|
+
index: item.id,
|
|
2919
|
+
onClick: val => ((val, item) => {
|
|
2920
|
+
if (updateSubmentTree(item.children), item.children?.length) {
|
|
2921
|
+
const firstNode = findTreeFirst(item.children);
|
|
2922
|
+
router.push(firstNode.path);
|
|
2923
|
+
} else router.push(item.path);
|
|
2924
|
+
})(0, item)
|
|
2925
|
+
}, {
|
|
2926
|
+
default: () => [ vue.createVNode(MenuItemTitle, {
|
|
2927
|
+
meta: item.meta
|
|
2928
|
+
}, null) ]
|
|
2929
|
+
}))) ]) ]
|
|
2930
|
+
});
|
|
2931
|
+
return () => vue.createVNode(vue.Fragment, null, [ renderContent() ]);
|
|
2932
|
+
}
|
|
2933
|
+
});
|
|
2934
|
+
const {getLightColor: getLightColor} = useChangeColor();
|
|
2935
|
+
var Header = vue.defineComponent({
|
|
2936
|
+
setup(props, {slots: slots}) {
|
|
2937
|
+
const _ns = vue.inject("ns", {}), _config = vue.inject("options", {}), headerStyle = vue.computed((() => {
|
|
2938
|
+
const {isHeaderBarColorGradual: isHeaderBarColorGradual, headerBarColor: color} = _config.setting;
|
|
2939
|
+
return isHeaderBarColorGradual ? {
|
|
2940
|
+
background: `linear-gradient(to bottom , ${color}, ${getLightColor(color, .5)})`
|
|
2941
|
+
} : "";
|
|
2942
|
+
})), __slots_header_tools = {};
|
|
2943
|
+
slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
2944
|
+
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
2945
|
+
return () => {
|
|
2946
|
+
return vue.createVNode(vue.Fragment, null, [ vue.createVNode("header", {
|
|
2947
|
+
class: _ns.b("header"),
|
|
2948
|
+
style: headerStyle.value
|
|
2949
|
+
}, [ vue.createVNode(LogoView, null, null), vue.createVNode("div", {
|
|
2950
|
+
class: _ns.bf("header", "menu")
|
|
2951
|
+
}, [ slots[slots_config_headerMenu] ? slots[slots_config_headerMenu]() : vue.createVNode(MenuTop, {
|
|
2952
|
+
menuTree: _config.menuTree
|
|
2953
|
+
}, null) ]), vue.createVNode("div", {
|
|
2954
|
+
class: _ns.bf("header", "right")
|
|
2955
|
+
}, [ vue.createVNode(HeaderTools, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? __slots_header_tools : {
|
|
2956
|
+
default: () => [ __slots_header_tools ]
|
|
2957
|
+
})) ]) ]) ]);
|
|
2958
|
+
var s;
|
|
2959
|
+
};
|
|
2960
|
+
}
|
|
2961
|
+
}), Sidebar = vue.defineComponent({
|
|
2962
|
+
setup(props, {slots: slots}) {
|
|
2963
|
+
const ns = vue.inject("ns", {}), submenuTree = vue.inject("submenuTree", []);
|
|
2964
|
+
return () => vue.createVNode(vue.Fragment, null, [ 0 === submenuTree.value.length ? null : vue.createVNode("aside", {
|
|
2965
|
+
class: ns.b("sidebar")
|
|
2966
|
+
}, [ slots[slots_config_headerMenu] ? slots[slots_config_headerMenu]() : vue.createVNode(NextMenu, {
|
|
2967
|
+
mode: "vertical",
|
|
2968
|
+
menuTree: submenuTree.value
|
|
2969
|
+
}, null) ]) ]);
|
|
2970
|
+
}
|
|
2971
|
+
});
|
|
2972
|
+
const ns$g = useNamespace("layout-composite");
|
|
2973
|
+
var composite = vue.defineComponent({
|
|
2974
|
+
props: {},
|
|
2975
|
+
setup() {
|
|
2976
|
+
vue.provide("ns", ns$g);
|
|
2977
|
+
const submenuTree = vue.ref([]);
|
|
2978
|
+
return vue.provide("submenuTree", submenuTree), vue.provide("updateSubmentTree", (val => {
|
|
2979
|
+
submenuTree.value = [], vue.nextTick((() => {
|
|
2980
|
+
submenuTree.value = val;
|
|
2981
|
+
}));
|
|
2982
|
+
})), {
|
|
2983
|
+
ns: ns$g,
|
|
2984
|
+
submenuTree: submenuTree
|
|
2985
|
+
};
|
|
2986
|
+
},
|
|
2840
2987
|
render() {
|
|
2841
2988
|
const slots = this.$slots, _config = vue.inject("options", {}), _emit = vue.inject("__emit__", {});
|
|
2842
2989
|
slots.menu;
|
|
@@ -2867,7 +3014,8 @@
|
|
|
2867
3014
|
defaults: vue.markRaw(defaults),
|
|
2868
3015
|
transverse: vue.markRaw(transverse),
|
|
2869
3016
|
columns: vue.markRaw(columns),
|
|
2870
|
-
classic: vue.markRaw(classic)
|
|
3017
|
+
classic: vue.markRaw(classic),
|
|
3018
|
+
composite: vue.markRaw(composite)
|
|
2871
3019
|
}, customizerCoverArray = (objValue, srcValue) => {
|
|
2872
3020
|
if (Array.isArray(objValue)) return srcValue;
|
|
2873
3021
|
};
|
|
@@ -8023,7 +8171,7 @@
|
|
|
8023
8171
|
})(app);
|
|
8024
8172
|
};
|
|
8025
8173
|
var index = {
|
|
8026
|
-
version: "0.4.
|
|
8174
|
+
version: "0.4.3",
|
|
8027
8175
|
install: install
|
|
8028
8176
|
};
|
|
8029
8177
|
exports.NextContainer = NextContainer, exports.NextCrudTable = NextCrudTable, exports.NextCrudTableVirtualized = NextCrudTableVirtualized,
|
|
@@ -8070,7 +8218,7 @@
|
|
|
8070
8218
|
}), exports.useGetDerivedNamespace = useGetDerivedNamespace, exports.useLanguage = (locale, lang) => {
|
|
8071
8219
|
const localeRef = vue.isRef(locale) ? locale : vue.ref(locale), nextLang = localeLang[lang] || localeLang["zh-cn"];
|
|
8072
8220
|
localeRef.value.name = lang, localeRef.value.next = nextLang.next;
|
|
8073
|
-
}, exports.useLocale = useLocale, exports.useNamespace = useNamespace, exports.version = "0.4.
|
|
8221
|
+
}, exports.useLocale = useLocale, exports.useNamespace = useNamespace, exports.version = "0.4.3",
|
|
8074
8222
|
Object.defineProperty(exports, "__esModule", {
|
|
8075
8223
|
value: !0
|
|
8076
8224
|
});
|