xrk-components 2.0.0-beta.75 → 2.0.0-beta.76
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/lib/index.esm.js +4 -8
- package/lib/index.umd.js +4 -8
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -76908,12 +76908,7 @@ var script$2 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$2
|
|
|
76908
76908
|
var props = __props;
|
|
76909
76909
|
var ctx = getCurrentInstance();
|
|
76910
76910
|
var slots = useSlots();
|
|
76911
|
-
var menuList =
|
|
76912
|
-
var _a;
|
|
76913
|
-
if (props.menuType === 'vertical')
|
|
76914
|
-
return props.menus;
|
|
76915
|
-
return ((_a = currentMenu.value) === null || _a === void 0 ? void 0 : _a.menuList) || [];
|
|
76916
|
-
});
|
|
76911
|
+
var menuList = ref(props.menuType === 'vertical' ? props.menus : []);
|
|
76917
76912
|
var hideMenuFlag = computed(function () {
|
|
76918
76913
|
if (props.menuType === 'horizontal') {
|
|
76919
76914
|
return !props.hideMenu && menuList.value.length;
|
|
@@ -76941,7 +76936,7 @@ var script$2 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$2
|
|
|
76941
76936
|
}
|
|
76942
76937
|
};
|
|
76943
76938
|
watch(function () { var _a, _b, _c; return (_c = (_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.appContext) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.globalProperties) === null || _c === void 0 ? void 0 : _c.$route; }, function () {
|
|
76944
|
-
var _a, _b, _c;
|
|
76939
|
+
var _a, _b, _c, _d;
|
|
76945
76940
|
if (props.menuType === 'horizontal') {
|
|
76946
76941
|
var _route_1 = (_c = (_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.appContext) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.globalProperties) === null || _c === void 0 ? void 0 : _c.$route;
|
|
76947
76942
|
currentMenu.value = menuBase.value.find(function (item) {
|
|
@@ -76949,6 +76944,7 @@ var script$2 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$2
|
|
|
76949
76944
|
var arr = menusMap.get(((_a = _route_1 === null || _route_1 === void 0 ? void 0 : _route_1.meta) === null || _a === void 0 ? void 0 : _a.parentPath) || (_route_1 === null || _route_1 === void 0 ? void 0 : _route_1.path)) || [];
|
|
76950
76945
|
return arr.includes(item.url);
|
|
76951
76946
|
});
|
|
76947
|
+
menuList.value = ((_d = currentMenu.value) === null || _d === void 0 ? void 0 : _d.menuList) || [];
|
|
76952
76948
|
}
|
|
76953
76949
|
}, { immediate: true });
|
|
76954
76950
|
var MenuTopRender = defineComponent({
|
|
@@ -77030,7 +77026,7 @@ var script$2 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$2
|
|
|
77030
77026
|
}, {
|
|
77031
77027
|
default: withCtx(function () { return [
|
|
77032
77028
|
createVNode(unref(BaseLayoutMenu), {
|
|
77033
|
-
menus:
|
|
77029
|
+
menus: menuList.value,
|
|
77034
77030
|
onMenuClick: _cache[0] || (_cache[0] = function (menu) { return emits('menuClick', menu); })
|
|
77035
77031
|
}, null, 8 /* PROPS */, ["menus"])
|
|
77036
77032
|
]; }),
|
package/lib/index.umd.js
CHANGED
|
@@ -76911,12 +76911,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
76911
76911
|
var props = __props;
|
|
76912
76912
|
var ctx = vue.getCurrentInstance();
|
|
76913
76913
|
var slots = vue.useSlots();
|
|
76914
|
-
var menuList = vue.
|
|
76915
|
-
var _a;
|
|
76916
|
-
if (props.menuType === 'vertical')
|
|
76917
|
-
return props.menus;
|
|
76918
|
-
return ((_a = currentMenu.value) === null || _a === void 0 ? void 0 : _a.menuList) || [];
|
|
76919
|
-
});
|
|
76914
|
+
var menuList = vue.ref(props.menuType === 'vertical' ? props.menus : []);
|
|
76920
76915
|
var hideMenuFlag = vue.computed(function () {
|
|
76921
76916
|
if (props.menuType === 'horizontal') {
|
|
76922
76917
|
return !props.hideMenu && menuList.value.length;
|
|
@@ -76944,7 +76939,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
76944
76939
|
}
|
|
76945
76940
|
};
|
|
76946
76941
|
vue.watch(function () { var _a, _b, _c; return (_c = (_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.appContext) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.globalProperties) === null || _c === void 0 ? void 0 : _c.$route; }, function () {
|
|
76947
|
-
var _a, _b, _c;
|
|
76942
|
+
var _a, _b, _c, _d;
|
|
76948
76943
|
if (props.menuType === 'horizontal') {
|
|
76949
76944
|
var _route_1 = (_c = (_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.appContext) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.globalProperties) === null || _c === void 0 ? void 0 : _c.$route;
|
|
76950
76945
|
currentMenu.value = menuBase.value.find(function (item) {
|
|
@@ -76952,6 +76947,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
76952
76947
|
var arr = menusMap.get(((_a = _route_1 === null || _route_1 === void 0 ? void 0 : _route_1.meta) === null || _a === void 0 ? void 0 : _a.parentPath) || (_route_1 === null || _route_1 === void 0 ? void 0 : _route_1.path)) || [];
|
|
76953
76948
|
return arr.includes(item.url);
|
|
76954
76949
|
});
|
|
76950
|
+
menuList.value = ((_d = currentMenu.value) === null || _d === void 0 ? void 0 : _d.menuList) || [];
|
|
76955
76951
|
}
|
|
76956
76952
|
}, { immediate: true });
|
|
76957
76953
|
var MenuTopRender = vue.defineComponent({
|
|
@@ -77033,7 +77029,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
77033
77029
|
}, {
|
|
77034
77030
|
default: vue.withCtx(function () { return [
|
|
77035
77031
|
vue.createVNode(vue.unref(BaseLayoutMenu), {
|
|
77036
|
-
menus:
|
|
77032
|
+
menus: menuList.value,
|
|
77037
77033
|
onMenuClick: _cache[0] || (_cache[0] = function (menu) { return emits('menuClick', menu); })
|
|
77038
77034
|
}, null, 8 /* PROPS */, ["menus"])
|
|
77039
77035
|
]; }),
|