xrk-components 2.0.0-beta.74 → 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
CHANGED
|
@@ -74141,7 +74141,7 @@ script$i.__file = "packages/xrk/search/search.vue";
|
|
|
74141
74141
|
|
|
74142
74142
|
var __default__$f = { name: 'base-cascader' };
|
|
74143
74143
|
var script$h = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$f), { props: {
|
|
74144
|
-
options: { type: [Array, Function], required:
|
|
74144
|
+
options: { type: [Array, Function], required: false },
|
|
74145
74145
|
modelValue: { type: null, required: false },
|
|
74146
74146
|
size: { type: String, required: false },
|
|
74147
74147
|
placeholder: { type: String, required: false },
|
|
@@ -74177,6 +74177,8 @@ var script$h = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$f
|
|
|
74177
74177
|
});
|
|
74178
74178
|
var cascaderOptions = computed(function () {
|
|
74179
74179
|
var _a;
|
|
74180
|
+
if (!_props.options)
|
|
74181
|
+
return [];
|
|
74180
74182
|
if (typeof _props.options === 'function') {
|
|
74181
74183
|
return (_a = _props.options) === null || _a === void 0 ? void 0 : _a.call(_props, _props.modelValue);
|
|
74182
74184
|
}
|
|
@@ -76906,12 +76908,7 @@ var script$2 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$2
|
|
|
76906
76908
|
var props = __props;
|
|
76907
76909
|
var ctx = getCurrentInstance();
|
|
76908
76910
|
var slots = useSlots();
|
|
76909
|
-
var menuList =
|
|
76910
|
-
var _a;
|
|
76911
|
-
if (props.menuType === 'vertical')
|
|
76912
|
-
return props.menus;
|
|
76913
|
-
return ((_a = currentMenu.value) === null || _a === void 0 ? void 0 : _a.menuList) || [];
|
|
76914
|
-
});
|
|
76911
|
+
var menuList = ref(props.menuType === 'vertical' ? props.menus : []);
|
|
76915
76912
|
var hideMenuFlag = computed(function () {
|
|
76916
76913
|
if (props.menuType === 'horizontal') {
|
|
76917
76914
|
return !props.hideMenu && menuList.value.length;
|
|
@@ -76939,7 +76936,7 @@ var script$2 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$2
|
|
|
76939
76936
|
}
|
|
76940
76937
|
};
|
|
76941
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 () {
|
|
76942
|
-
var _a, _b, _c;
|
|
76939
|
+
var _a, _b, _c, _d;
|
|
76943
76940
|
if (props.menuType === 'horizontal') {
|
|
76944
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;
|
|
76945
76942
|
currentMenu.value = menuBase.value.find(function (item) {
|
|
@@ -76947,6 +76944,7 @@ var script$2 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$2
|
|
|
76947
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)) || [];
|
|
76948
76945
|
return arr.includes(item.url);
|
|
76949
76946
|
});
|
|
76947
|
+
menuList.value = ((_d = currentMenu.value) === null || _d === void 0 ? void 0 : _d.menuList) || [];
|
|
76950
76948
|
}
|
|
76951
76949
|
}, { immediate: true });
|
|
76952
76950
|
var MenuTopRender = defineComponent({
|
|
@@ -77028,7 +77026,7 @@ var script$2 = /*#__PURE__*/ defineComponent(__assign(__assign({}, __default__$2
|
|
|
77028
77026
|
}, {
|
|
77029
77027
|
default: withCtx(function () { return [
|
|
77030
77028
|
createVNode(unref(BaseLayoutMenu), {
|
|
77031
|
-
menus:
|
|
77029
|
+
menus: menuList.value,
|
|
77032
77030
|
onMenuClick: _cache[0] || (_cache[0] = function (menu) { return emits('menuClick', menu); })
|
|
77033
77031
|
}, null, 8 /* PROPS */, ["menus"])
|
|
77034
77032
|
]; }),
|
package/lib/index.umd.js
CHANGED
|
@@ -74144,7 +74144,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
74144
74144
|
|
|
74145
74145
|
var __default__$f = { name: 'base-cascader' };
|
|
74146
74146
|
var script$h = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$f), { props: {
|
|
74147
|
-
options: { type: [Array, Function], required:
|
|
74147
|
+
options: { type: [Array, Function], required: false },
|
|
74148
74148
|
modelValue: { type: null, required: false },
|
|
74149
74149
|
size: { type: String, required: false },
|
|
74150
74150
|
placeholder: { type: String, required: false },
|
|
@@ -74180,6 +74180,8 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
74180
74180
|
});
|
|
74181
74181
|
var cascaderOptions = vue.computed(function () {
|
|
74182
74182
|
var _a;
|
|
74183
|
+
if (!_props.options)
|
|
74184
|
+
return [];
|
|
74183
74185
|
if (typeof _props.options === 'function') {
|
|
74184
74186
|
return (_a = _props.options) === null || _a === void 0 ? void 0 : _a.call(_props, _props.modelValue);
|
|
74185
74187
|
}
|
|
@@ -76909,12 +76911,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
76909
76911
|
var props = __props;
|
|
76910
76912
|
var ctx = vue.getCurrentInstance();
|
|
76911
76913
|
var slots = vue.useSlots();
|
|
76912
|
-
var menuList = vue.
|
|
76913
|
-
var _a;
|
|
76914
|
-
if (props.menuType === 'vertical')
|
|
76915
|
-
return props.menus;
|
|
76916
|
-
return ((_a = currentMenu.value) === null || _a === void 0 ? void 0 : _a.menuList) || [];
|
|
76917
|
-
});
|
|
76914
|
+
var menuList = vue.ref(props.menuType === 'vertical' ? props.menus : []);
|
|
76918
76915
|
var hideMenuFlag = vue.computed(function () {
|
|
76919
76916
|
if (props.menuType === 'horizontal') {
|
|
76920
76917
|
return !props.hideMenu && menuList.value.length;
|
|
@@ -76942,7 +76939,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
76942
76939
|
}
|
|
76943
76940
|
};
|
|
76944
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 () {
|
|
76945
|
-
var _a, _b, _c;
|
|
76942
|
+
var _a, _b, _c, _d;
|
|
76946
76943
|
if (props.menuType === 'horizontal') {
|
|
76947
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;
|
|
76948
76945
|
currentMenu.value = menuBase.value.find(function (item) {
|
|
@@ -76950,6 +76947,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
76950
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)) || [];
|
|
76951
76948
|
return arr.includes(item.url);
|
|
76952
76949
|
});
|
|
76950
|
+
menuList.value = ((_d = currentMenu.value) === null || _d === void 0 ? void 0 : _d.menuList) || [];
|
|
76953
76951
|
}
|
|
76954
76952
|
}, { immediate: true });
|
|
76955
76953
|
var MenuTopRender = vue.defineComponent({
|
|
@@ -77031,7 +77029,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
77031
77029
|
}, {
|
|
77032
77030
|
default: vue.withCtx(function () { return [
|
|
77033
77031
|
vue.createVNode(vue.unref(BaseLayoutMenu), {
|
|
77034
|
-
menus:
|
|
77032
|
+
menus: menuList.value,
|
|
77035
77033
|
onMenuClick: _cache[0] || (_cache[0] = function (menu) { return emits('menuClick', menu); })
|
|
77036
77034
|
}, null, 8 /* PROPS */, ["menus"])
|
|
77037
77035
|
]; }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
2
|
options: {
|
|
3
3
|
type: (ArrayConstructor | FunctionConstructor)[];
|
|
4
|
-
required:
|
|
4
|
+
required: false;
|
|
5
5
|
};
|
|
6
6
|
modelValue: {
|
|
7
7
|
type: null;
|
|
@@ -122,7 +122,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
122
122
|
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "expand-change" | "blur" | "focus" | "visible-change" | "remove-tag")[], "update:modelValue" | "change" | "expand-change" | "blur" | "focus" | "visible-change" | "remove-tag", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
123
123
|
options: {
|
|
124
124
|
type: (ArrayConstructor | FunctionConstructor)[];
|
|
125
|
-
required:
|
|
125
|
+
required: false;
|
|
126
126
|
};
|
|
127
127
|
modelValue: {
|
|
128
128
|
type: null;
|
|
@@ -26,7 +26,7 @@ export interface BaseCascaderProps extends BaseCascaderListener, Omit<CascaderPr
|
|
|
26
26
|
* 选择项
|
|
27
27
|
* 可通过函数形式,动态修改选择项的配置(activeValue 是当前 选择的内容)
|
|
28
28
|
*/
|
|
29
|
-
options
|
|
29
|
+
options?: Array<OptionProps> | ((activeValue: Array<any>) => Array<OptionProps>);
|
|
30
30
|
size?: 'large' | 'default' | 'small';
|
|
31
31
|
placeholder?: string;
|
|
32
32
|
disabled?: boolean;
|