@jetlinks-web/components 2.6.21 → 2.6.23
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/AMap/Map.js +1 -2
- package/es/AutoComplete/AutoComplete.js +0 -1
- package/es/BadgeStatus/Badge.js +1 -2
- package/es/CardSelect/CardSelect.js +1 -2
- package/es/CheckButton/CheckButton.js +1 -2
- package/es/CheckButton/style/index.less +40 -40
- package/es/DragModal/DragModal.js +0 -1
- package/es/Echarts/Echarts.js +1 -2
- package/es/EditTable/EditTable.js +4 -6
- package/es/EditTable/FormItem.js +0 -1
- package/es/EditTable/Header.js +5 -3
- package/es/EditTable/components/ContextMenu/Menu.js +1 -2
- package/es/EditTable/components/Search/search.js +1 -2
- package/es/EditTable/components/Search/sort.js +1 -3
- package/es/EditTable/group.js +11 -12
- package/es/EditTable/hooks/useValidate.js +1 -1
- package/es/EditTable/style/index.less +41 -41
- package/es/FlameGraph/FlameGraph.js +5 -4
- package/es/FullPage/FullPage.js +1 -2
- package/es/LocaleProvider/index.js +1 -2
- package/es/PermissionButton/index.js +6 -7
- package/es/ProLayout/Basic/BasicLayout.js +34 -39
- package/es/ProLayout/Basic/Header.js +3 -7
- package/es/ProLayout/PageContainer/index.js +8 -12
- package/es/ProLayout/SiderMenu/BaseMenu.js +16 -39
- package/es/ProLayout/SiderMenu/SiderMenu.js +14 -34
- package/es/ProLayout/TopHeader/index.js +1 -9
- package/es/ProLayout/style/default.less +4 -4
- package/es/ProLayout/util.js +5 -5
- package/es/ProTable/Content.js +34 -18
- package/es/ProTable/style/ProTable.less +138 -138
- package/es/RadioButton/RadioButton.js +0 -1
- package/es/Search/Advanced/SaveHistory.js +1 -2
- package/es/Search/Item.js +1 -2
- package/es/Title/title.js +0 -1
- package/es/style/index.css +1 -1
- package/es/style/variable.less +4 -4
- package/lib/AMap/Map.js +1 -2
- package/lib/AutoComplete/AutoComplete.js +0 -1
- package/lib/BadgeStatus/Badge.js +1 -2
- package/lib/CardSelect/CardSelect.js +1 -2
- package/lib/CheckButton/CheckButton.js +1 -2
- package/lib/CheckButton/style/index.less +40 -40
- package/lib/DragModal/DragModal.js +0 -1
- package/lib/Echarts/Echarts.js +1 -2
- package/lib/EditTable/EditTable.js +4 -6
- package/lib/EditTable/FormItem.js +0 -1
- package/lib/EditTable/Header.js +5 -3
- package/lib/EditTable/components/ContextMenu/Menu.js +1 -2
- package/lib/EditTable/components/Search/search.js +1 -2
- package/lib/EditTable/components/Search/sort.js +1 -3
- package/lib/EditTable/group.js +11 -12
- package/lib/EditTable/hooks/useValidate.js +1 -1
- package/lib/EditTable/style/index.less +41 -41
- package/lib/FlameGraph/FlameGraph.js +5 -4
- package/lib/FullPage/FullPage.js +1 -2
- package/lib/Icon/icon.js +1 -2
- package/lib/LocaleProvider/index.js +1 -2
- package/lib/PermissionButton/index.js +6 -7
- package/lib/ProLayout/Basic/BasicLayout.js +34 -40
- package/lib/ProLayout/Basic/Header.js +2 -6
- package/lib/ProLayout/PageContainer/index.js +7 -11
- package/lib/ProLayout/SiderMenu/BaseMenu.js +17 -39
- package/lib/ProLayout/SiderMenu/SiderMenu.js +14 -35
- package/lib/ProLayout/TopHeader/index.js +2 -9
- package/lib/ProLayout/style/default.less +4 -4
- package/lib/ProLayout/util.js +5 -5
- package/lib/ProTable/Content.js +34 -18
- package/lib/ProTable/style/ProTable.less +138 -138
- package/lib/RadioButton/RadioButton.js +0 -1
- package/lib/Search/Advanced/SaveHistory.js +1 -2
- package/lib/Search/Item.js +1 -2
- package/lib/Title/title.js +0 -1
- package/lib/components.js +1 -2
- package/lib/index.js +1 -2
- package/lib/style/index.css +1 -1
- package/lib/style/variable.less +4 -4
- package/package.json +4 -4
|
@@ -19,9 +19,6 @@ require("ant-design-vue/lib/_util/vue-types");
|
|
|
19
19
|
var _defaultSettings = require("../defaultSettings");
|
|
20
20
|
var _LocaleReciver = require("../../LocaleReciver");
|
|
21
21
|
var _excluded = ["title", "tabList", "tabActiveKey", "content", "pageHeaderRender", "header", "extraContent", "prefixedClassName", "prefixCls", "fixedHeader", "showBack"];
|
|
22
|
-
function _isSlot(s) {
|
|
23
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
|
|
24
|
-
}
|
|
25
22
|
var pageHeaderTabConfig = exports.pageHeaderTabConfig = {
|
|
26
23
|
/**
|
|
27
24
|
* @name tabs 的列表
|
|
@@ -157,7 +154,6 @@ var renderFooter = function renderFooter(props) {
|
|
|
157
154
|
}, [item.tab]);
|
|
158
155
|
};
|
|
159
156
|
if (tabList && tabList.length) {
|
|
160
|
-
var _slot;
|
|
161
157
|
return (0, _vue.createVNode)(_lib.Tabs, (0, _objectSpread2.default)({
|
|
162
158
|
"class": "page-container-tabs",
|
|
163
159
|
"activeKey": tabActiveKey,
|
|
@@ -167,14 +163,14 @@ var renderFooter = function renderFooter(props) {
|
|
|
167
163
|
}
|
|
168
164
|
},
|
|
169
165
|
"tabBarExtraContent": tabBarExtraContent
|
|
170
|
-
}, tabProps),
|
|
171
|
-
return (0, _vue.createVNode)(_lib.Tabs.TabPane, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
172
|
-
"tab": tabPane(item),
|
|
173
|
-
"key": item.key
|
|
174
|
-
}), null);
|
|
175
|
-
})) ? _slot : {
|
|
166
|
+
}, tabProps), {
|
|
176
167
|
default: function _default() {
|
|
177
|
-
return [
|
|
168
|
+
return [tabList.map(function (item) {
|
|
169
|
+
return (0, _vue.createVNode)(_lib.Tabs.TabPane, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
170
|
+
"tab": tabPane(item),
|
|
171
|
+
"key": item.key
|
|
172
|
+
}), null);
|
|
173
|
+
})];
|
|
178
174
|
}
|
|
179
175
|
});
|
|
180
176
|
}
|
|
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.baseMenuProps = void 0;
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
-
var _vue = require("vue");
|
|
10
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
+
var _vue = require("vue");
|
|
13
13
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
14
14
|
var _defaultSettings = require("../defaultSettings");
|
|
15
15
|
var _RouteContext = require("../RouteContext");
|
|
@@ -17,9 +17,6 @@ var _Icon = _interopRequireDefault(require("../../Icon"));
|
|
|
17
17
|
var _utils = require("@jetlinks-web/utils");
|
|
18
18
|
var _lib = require("ant-design-vue/lib/");
|
|
19
19
|
var _iconsVue = require("@ant-design/icons-vue/lib/icons");
|
|
20
|
-
function _isSlot(s) {
|
|
21
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
|
|
22
|
-
}
|
|
23
20
|
var baseMenuProps = exports.baseMenuProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _defaultSettings.defaultSettingProps), {}, {
|
|
24
21
|
prefixCls: {
|
|
25
22
|
type: String,
|
|
@@ -123,8 +120,7 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
123
120
|
});
|
|
124
121
|
(0, _defineProperty2.default)(this, "getSubMenuOrItem", function (item) {
|
|
125
122
|
var _item$meta, _item$meta2, _item$meta7, _item$meta8;
|
|
126
|
-
if (Array.isArray(item.children) && item.children.length > 0 && !(item
|
|
127
|
-
var _slot;
|
|
123
|
+
if (Array.isArray(item.children) && item.children.length > 0 && !(item !== null && item !== void 0 && (_item$meta = item.meta) !== null && _item$meta !== void 0 && _item$meta.hideInMenu) && !(item !== null && item !== void 0 && (_item$meta2 = item.meta) !== null && _item$meta2 !== void 0 && _item$meta2.hideChildrenInMenu)) {
|
|
128
124
|
var _item$meta3, _item$meta4, _item$meta5, _item$meta6;
|
|
129
125
|
if (_this.props.subMenuItemRender) {
|
|
130
126
|
var subMenuItemRender = (0, _vue.withCtx)(_this.props.subMenuItemRender, _this.ctx);
|
|
@@ -137,21 +133,13 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
137
133
|
prefixCls = _this$props.prefixCls,
|
|
138
134
|
locale = _this$props.locale;
|
|
139
135
|
var menuTitle = locale && locale((_item$meta3 = item.meta) === null || _item$meta3 === void 0 ? void 0 : _item$meta3.title) || ((_item$meta4 = item.meta) === null || _item$meta4 === void 0 ? void 0 : _item$meta4.title);
|
|
140
|
-
var defaultTitle = (
|
|
136
|
+
var defaultTitle = (_item$meta5 = item.meta) !== null && _item$meta5 !== void 0 && _item$meta5.icon ? (0, _vue.createVNode)("span", {
|
|
141
137
|
"class": "".concat(prefixCls, "-menu-item")
|
|
142
138
|
}, [(0, _vue.createVNode)("span", {
|
|
143
139
|
"class": "".concat(prefixCls, "-menu-item-title")
|
|
144
|
-
},
|
|
145
|
-
default: function _default() {
|
|
146
|
-
return [menuTitle];
|
|
147
|
-
}
|
|
148
|
-
})]) : (0, _vue.createVNode)("span", {
|
|
140
|
+
}, [menuTitle])]) : (0, _vue.createVNode)("span", {
|
|
149
141
|
"class": "".concat(prefixCls, "-menu-item")
|
|
150
|
-
},
|
|
151
|
-
default: function _default() {
|
|
152
|
-
return [menuTitle];
|
|
153
|
-
}
|
|
154
|
-
});
|
|
142
|
+
}, [menuTitle]);
|
|
155
143
|
return (0, _vue.createVNode)(_lib.Menu.SubMenu, {
|
|
156
144
|
"title": defaultTitle,
|
|
157
145
|
"key": item.path,
|
|
@@ -160,9 +148,9 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
160
148
|
"iconUrl": _this.props.iconfontUrl,
|
|
161
149
|
"icon": (_item$meta6 = item.meta) === null || _item$meta6 === void 0 ? void 0 : _item$meta6.icon
|
|
162
150
|
}, null)
|
|
163
|
-
},
|
|
151
|
+
}, {
|
|
164
152
|
default: function _default() {
|
|
165
|
-
return [
|
|
153
|
+
return [_this.getNavMenuItems(item.children)];
|
|
166
154
|
}
|
|
167
155
|
});
|
|
168
156
|
}
|
|
@@ -179,15 +167,14 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
179
167
|
"disabled": (_item$meta7 = item.meta) === null || _item$meta7 === void 0 ? void 0 : _item$meta7.disabled,
|
|
180
168
|
"danger": (_item$meta8 = item.meta) === null || _item$meta8 === void 0 ? void 0 : _item$meta8.danger,
|
|
181
169
|
"key": item.path
|
|
182
|
-
},
|
|
170
|
+
}, {
|
|
183
171
|
default: function _default() {
|
|
184
172
|
return [title];
|
|
185
173
|
}
|
|
186
174
|
});
|
|
187
175
|
});
|
|
188
176
|
(0, _defineProperty2.default)(this, "getMenuItem", function (item) {
|
|
189
|
-
var
|
|
190
|
-
var _item$meta9, _item$meta10, _item$meta11, _item$meta12, _item$meta13;
|
|
177
|
+
var _item$meta9, _item$meta0, _item$meta1, _item$meta10, _item$meta11;
|
|
191
178
|
var meta = (0, _objectSpread2.default)({}, item.meta);
|
|
192
179
|
var target = meta.target || null;
|
|
193
180
|
var hasUrl = _utils.regular.isUrl(item.path);
|
|
@@ -206,30 +193,22 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
206
193
|
locale = _this$props2.locale;
|
|
207
194
|
var icon = ((_item$meta9 = item.meta) === null || _item$meta9 === void 0 ? void 0 : _item$meta9.icon) && (0, _vue.createVNode)(LazyIcon, {
|
|
208
195
|
"iconUrl": _this.props.iconfontUrl,
|
|
209
|
-
"icon": (_item$
|
|
196
|
+
"icon": (_item$meta0 = item.meta) === null || _item$meta0 === void 0 ? void 0 : _item$meta0.icon
|
|
210
197
|
}, null) || undefined;
|
|
211
|
-
var menuTitle = locale && locale((_item$
|
|
212
|
-
var defaultTitle = (
|
|
198
|
+
var menuTitle = locale && locale((_item$meta1 = item.meta) === null || _item$meta1 === void 0 ? void 0 : _item$meta1.title) || ((_item$meta10 = item.meta) === null || _item$meta10 === void 0 ? void 0 : _item$meta10.title);
|
|
199
|
+
var defaultTitle = (_item$meta11 = item.meta) !== null && _item$meta11 !== void 0 && _item$meta11.icon ? (0, _vue.createVNode)(CustomTag, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, attrs), props), {}, {
|
|
213
200
|
"class": "".concat(prefixCls, "-menu-item")
|
|
214
201
|
}), {
|
|
215
202
|
default: function _default() {
|
|
216
203
|
return [icon, (0, _vue.createVNode)("span", {
|
|
217
204
|
"class": "".concat(prefixCls, "-menu-item-title")
|
|
218
|
-
},
|
|
219
|
-
default: function _default() {
|
|
220
|
-
return [menuTitle];
|
|
221
|
-
}
|
|
222
|
-
})];
|
|
205
|
+
}, [menuTitle])];
|
|
223
206
|
}
|
|
224
207
|
}) : (0, _vue.createVNode)(CustomTag, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, attrs), props), {}, {
|
|
225
208
|
"class": "".concat(prefixCls, "-menu-item")
|
|
226
|
-
}),
|
|
227
|
-
default: function _default() {
|
|
228
|
-
return [menuTitle];
|
|
229
|
-
}
|
|
230
|
-
})) ? _slot2 : {
|
|
209
|
+
}), {
|
|
231
210
|
default: function _default() {
|
|
232
|
-
return [
|
|
211
|
+
return [(0, _vue.createVNode)("span", null, [menuTitle])];
|
|
233
212
|
}
|
|
234
213
|
});
|
|
235
214
|
return [defaultTitle, icon];
|
|
@@ -267,7 +246,6 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
267
246
|
emit('click', args);
|
|
268
247
|
};
|
|
269
248
|
return function () {
|
|
270
|
-
var _slot3;
|
|
271
249
|
return (0, _vue.createVNode)(_lib.Menu, (0, _objectSpread2.default)({
|
|
272
250
|
"key": "Menu",
|
|
273
251
|
"inlineIndent": 16,
|
|
@@ -278,9 +256,9 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
278
256
|
"onOpenChange": handleOpenChange,
|
|
279
257
|
"onSelect": handleSelect,
|
|
280
258
|
"onClick": handleClick
|
|
281
|
-
}, props.menuProps),
|
|
259
|
+
}, props.menuProps), {
|
|
282
260
|
default: function _default() {
|
|
283
|
-
return [
|
|
261
|
+
return [menuUtil.getNavMenuItems(props.menuData)];
|
|
284
262
|
}
|
|
285
263
|
});
|
|
286
264
|
};
|
|
@@ -17,11 +17,7 @@ var _vueTypes = _interopRequireDefault(require("ant-design-vue/lib/_util/vue-typ
|
|
|
17
17
|
var _Icon = _interopRequireDefault(require("../../Icon"));
|
|
18
18
|
var _RouteContext = require("../RouteContext");
|
|
19
19
|
require("../typings");
|
|
20
|
-
function
|
|
21
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
-
function _isSlot(s) {
|
|
23
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
|
|
24
|
-
}
|
|
20
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
25
21
|
var siderMenuProps = exports.siderMenuProps = (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, _defaultSettings.defaultSettingProps), _BaseMenu.baseMenuProps), {}, {
|
|
26
22
|
logo: {
|
|
27
23
|
type: [Object, String, Function],
|
|
@@ -154,11 +150,7 @@ var defaultRenderLogoAndTitle = exports.defaultRenderLogoAndTitle = function def
|
|
|
154
150
|
if (layout === 'mix' && renderFunction === false) {
|
|
155
151
|
return null;
|
|
156
152
|
}
|
|
157
|
-
var titleDom = (0, _vue.createVNode)("h1", null,
|
|
158
|
-
default: function _default() {
|
|
159
|
-
return [title];
|
|
160
|
-
}
|
|
161
|
-
});
|
|
153
|
+
var titleDom = (0, _vue.createVNode)("h1", null, [title]);
|
|
162
154
|
if (renderKey === 'menuHeaderRender') {
|
|
163
155
|
return null;
|
|
164
156
|
}
|
|
@@ -168,11 +160,7 @@ var defaultRenderLogoAndTitle = exports.defaultRenderLogoAndTitle = function def
|
|
|
168
160
|
return renderFunction(logoDom, props.collapsed ? null : titleDom, props);
|
|
169
161
|
}
|
|
170
162
|
if (Array.isArray(renderFunction)) {
|
|
171
|
-
return (0, _vue.createVNode)(_vue.Fragment, null,
|
|
172
|
-
default: function _default() {
|
|
173
|
-
return [renderFunction];
|
|
174
|
-
}
|
|
175
|
-
});
|
|
163
|
+
return (0, _vue.createVNode)(_vue.Fragment, null, [renderFunction]);
|
|
176
164
|
}
|
|
177
165
|
return (0, _vue.createVNode)("a", null, [logoDom, props.collapsed ? null : titleDom]);
|
|
178
166
|
};
|
|
@@ -184,7 +172,6 @@ var defaultRenderCollapsedButton = exports.defaultRenderCollapsedButton = functi
|
|
|
184
172
|
}, null);
|
|
185
173
|
};
|
|
186
174
|
var SiderMenu = function SiderMenu(props) {
|
|
187
|
-
var _slot;
|
|
188
175
|
var collapsed = props.collapsed,
|
|
189
176
|
siderWidth = props.siderWidth,
|
|
190
177
|
breakpoint = props.breakpoint,
|
|
@@ -285,17 +272,9 @@ var SiderMenu = function SiderMenu(props) {
|
|
|
285
272
|
"onClick": props.layout !== 'mix' ? props.onMenuHeaderClick : undefined,
|
|
286
273
|
"id": "logo",
|
|
287
274
|
"style": props === null || props === void 0 ? void 0 : props.logoStyle
|
|
288
|
-
},
|
|
289
|
-
default: function _default() {
|
|
290
|
-
return [headerDom];
|
|
291
|
-
}
|
|
292
|
-
}), extraDom && (0, _vue.createVNode)("div", {
|
|
275
|
+
}, [headerDom]), extraDom && (0, _vue.createVNode)("div", {
|
|
293
276
|
"class": (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(baseClassName, "-extra"), true), "".concat(baseClassName, "-extra-no-logo"), !headerDom)
|
|
294
|
-
},
|
|
295
|
-
default: function _default() {
|
|
296
|
-
return [extraDom];
|
|
297
|
-
}
|
|
298
|
-
}), (0, _vue.createVNode)("div", {
|
|
277
|
+
}, [extraDom]), (0, _vue.createVNode)("div", {
|
|
299
278
|
"class": "".concat(baseClassName, "-body"),
|
|
300
279
|
"style": "flex: 1; overflow: hidden auto;"
|
|
301
280
|
}, [props.layoutType !== _defaultSettings.LayoutType.CARD ? menuContentRender && menuContentRender(props, defaultMenuDom) || defaultMenuDom : null]), (0, _vue.createVNode)("div", {
|
|
@@ -312,17 +291,17 @@ var SiderMenu = function SiderMenu(props) {
|
|
|
312
291
|
props.onCollapse(!props.collapsed);
|
|
313
292
|
}
|
|
314
293
|
}
|
|
315
|
-
}, _isSlot(_slot = (0, _vue.createVNode)(_lib.Menu.Item, {
|
|
316
|
-
"key": 'collapsed-button',
|
|
317
|
-
"class": "".concat(baseClassName, "-collapsed-button"),
|
|
318
|
-
"title": false
|
|
319
294
|
}, {
|
|
320
295
|
default: function _default() {
|
|
321
|
-
return [
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
296
|
+
return [(0, _vue.createVNode)(_lib.Menu.Item, {
|
|
297
|
+
"key": 'collapsed-button',
|
|
298
|
+
"class": "".concat(baseClassName, "-collapsed-button"),
|
|
299
|
+
"title": false
|
|
300
|
+
}, {
|
|
301
|
+
default: function _default() {
|
|
302
|
+
return [collapsedButtonRender && typeof collapsedButtonRender === 'function' ? collapsedButtonRender(collapsed) : collapsedButtonRender];
|
|
303
|
+
}
|
|
304
|
+
})];
|
|
326
305
|
}
|
|
327
306
|
}) : null])];
|
|
328
307
|
}
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.topNavHeaderProps = exports.baseHeaderProps = exports.TopNavHeader = void 0;
|
|
8
|
-
var _vue = require("vue");
|
|
9
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _vue = require("vue");
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
12
|
var _vcResizeObserver = _interopRequireDefault(require("ant-design-vue/lib/vc-resize-observer"));
|
|
@@ -17,9 +17,6 @@ var _RouteContext = require("../RouteContext");
|
|
|
17
17
|
var _BaseMenu = _interopRequireDefault(require("../SiderMenu/BaseMenu"));
|
|
18
18
|
var _util = require("../util");
|
|
19
19
|
var _excluded = ["rightContentRender"];
|
|
20
|
-
function _isSlot(s) {
|
|
21
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
|
|
22
|
-
}
|
|
23
20
|
var baseHeaderProps = exports.baseHeaderProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _defaultSettings.defaultSettingProps), {}, {
|
|
24
21
|
prefixCls: _vueTypes.default.string.def('ant-pro'),
|
|
25
22
|
collapsed: _vueTypes.default.looseBool,
|
|
@@ -146,11 +143,7 @@ var TopNavHeader = exports.TopNavHeader = function TopNavHeader(props) {
|
|
|
146
143
|
"class": "".concat(prefixCls, "-logo"),
|
|
147
144
|
"key": "logo",
|
|
148
145
|
"id": "logo"
|
|
149
|
-
},
|
|
150
|
-
default: function _default() {
|
|
151
|
-
return [headerDom];
|
|
152
|
-
}
|
|
153
|
-
})]), (0, _vue.createVNode)("div", {
|
|
146
|
+
}, [headerDom])]), (0, _vue.createVNode)("div", {
|
|
154
147
|
"style": {
|
|
155
148
|
flex: 1
|
|
156
149
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import 'ant-design-vue/lib/style/themes/index.less';
|
|
2
|
-
|
|
3
|
-
@basicLayout-prefix-cls: ~'@{ant-prefix}-pro-basicLayout';
|
|
4
|
-
@pro-layout-header-height: 48px;
|
|
1
|
+
@import 'ant-design-vue/lib/style/themes/index.less';
|
|
2
|
+
|
|
3
|
+
@basicLayout-prefix-cls: ~'@{ant-prefix}-pro-basicLayout';
|
|
4
|
+
@pro-layout-header-height: 48px;
|
package/lib/ProLayout/util.js
CHANGED
|
@@ -14,14 +14,14 @@ function clearMenuItem(menusData) {
|
|
|
14
14
|
return menusData.map(function (item) {
|
|
15
15
|
var _finalItem$meta;
|
|
16
16
|
var finalItem = (0, _objectSpread2.default)({}, item);
|
|
17
|
-
if ((_finalItem$meta = finalItem.meta)
|
|
17
|
+
if ((_finalItem$meta = finalItem.meta) !== null && _finalItem$meta !== void 0 && _finalItem$meta.hideInMenu) {
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
|
-
if (finalItem &&
|
|
20
|
+
if (finalItem && finalItem !== null && finalItem !== void 0 && finalItem.children) {
|
|
21
21
|
var _finalItem$meta2;
|
|
22
|
-
if (!((_finalItem$meta2 = finalItem.meta)
|
|
22
|
+
if (!((_finalItem$meta2 = finalItem.meta) !== null && _finalItem$meta2 !== void 0 && _finalItem$meta2.hideChildInMenu) && finalItem.children.some(function (child) {
|
|
23
23
|
var _child$meta;
|
|
24
|
-
return child && child.name && !((_child$meta = child.meta)
|
|
24
|
+
return child && child.name && !((_child$meta = child.meta) !== null && _child$meta !== void 0 && _child$meta.hideInMenu);
|
|
25
25
|
})) {
|
|
26
26
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
27
27
|
children: clearMenuItem(finalItem.children)
|
|
@@ -38,7 +38,7 @@ function flatMap(menusData) {
|
|
|
38
38
|
return menusData.map(function (item) {
|
|
39
39
|
var _finalItem$meta3;
|
|
40
40
|
var finalItem = (0, _objectSpread2.default)({}, item);
|
|
41
|
-
if (!finalItem.name || (
|
|
41
|
+
if (!finalItem.name || (_finalItem$meta3 = finalItem.meta) !== null && _finalItem$meta3 !== void 0 && _finalItem$meta3.hideInMenu) {
|
|
42
42
|
return null;
|
|
43
43
|
}
|
|
44
44
|
if (finalItem.children) {
|
package/lib/ProTable/Content.js
CHANGED
|
@@ -21,29 +21,36 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
21
21
|
"_contentProps": "setup-maybe-ref",
|
|
22
22
|
"Table": "setup-maybe-ref",
|
|
23
23
|
"get": "setup-maybe-ref",
|
|
24
|
+
"omit": "setup-maybe-ref",
|
|
24
25
|
"Empty": "setup-maybe-ref",
|
|
26
|
+
"useTableInject": "setup-maybe-ref",
|
|
25
27
|
"props": "setup-reactive-const",
|
|
26
28
|
"slots": "setup-maybe-ref",
|
|
29
|
+
"_rowSelection": "setup-maybe-ref",
|
|
27
30
|
"_columns": "setup-ref",
|
|
31
|
+
"_slots": "setup-ref",
|
|
28
32
|
"_scroll": "setup-ref",
|
|
29
|
-
"gridTemplateColumns": "setup-ref"
|
|
33
|
+
"gridTemplateColumns": "setup-ref",
|
|
34
|
+
"onClick": "setup-const"
|
|
30
35
|
} */
|
|
31
36
|
import { defineComponent as _defineComponent } from 'vue';
|
|
32
|
-
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock,
|
|
37
|
+
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, mergeProps as _mergeProps, renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, unref as _unref, createVNode as _createVNode, normalizeProps as _normalizeProps, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createSlots as _createSlots, createBlock as _createBlock } from "vue";
|
|
33
38
|
const _hoisted_1 = { class: "jtable-box" };
|
|
34
39
|
const _hoisted_2 = {
|
|
35
40
|
key: 0,
|
|
36
41
|
class: "jtable-card"
|
|
37
42
|
};
|
|
38
|
-
const _hoisted_3 =
|
|
43
|
+
const _hoisted_3 = ["onClick"];
|
|
44
|
+
const _hoisted_4 = {
|
|
39
45
|
key: 1,
|
|
40
46
|
class: "j-table-empty"
|
|
41
47
|
};
|
|
42
48
|
import { useSlots, computed } from 'vue';
|
|
43
49
|
import { _contentProps } from "./setting";
|
|
44
50
|
import { Table } from 'ant-design-vue/lib/';
|
|
45
|
-
import { get } from 'lodash-es';
|
|
51
|
+
import { get, omit } from 'lodash-es';
|
|
46
52
|
import Empty from '../Empty';
|
|
53
|
+
import { useTableInject } from './hooks';
|
|
47
54
|
const __sfc_main__ = _defineComponent({
|
|
48
55
|
...{
|
|
49
56
|
name: 'Content'
|
|
@@ -58,7 +65,11 @@ const __sfc_main__ = _defineComponent({
|
|
|
58
65
|
setup(__props) {
|
|
59
66
|
const props = __props;
|
|
60
67
|
const slots = useSlots();
|
|
68
|
+
const _rowSelection = useTableInject();
|
|
61
69
|
const _columns = computed(() => props.columns.filter((i) => !_optionalChain([i, 'optionalAccess', _2 => _2.hideInTable])));
|
|
70
|
+
const _slots = computed(() => {
|
|
71
|
+
return omit(slots, ['emptyText', 'bodyCell']);
|
|
72
|
+
});
|
|
62
73
|
const _scroll = computed(() => {
|
|
63
74
|
if (props.scroll === false) {
|
|
64
75
|
return {
|
|
@@ -74,6 +85,12 @@ const __sfc_main__ = _defineComponent({
|
|
|
74
85
|
const gridTemplateColumns = computed(() => {
|
|
75
86
|
return `repeat(${props.column}, 1fr)`;
|
|
76
87
|
});
|
|
88
|
+
const onClick = (item) => {
|
|
89
|
+
if (_rowSelection && _rowSelection.value) {
|
|
90
|
+
const _selected = _optionalChain([_rowSelection, 'access', _3 => _3.value, 'access', _4 => _4.selectedRowKeys, 'optionalAccess', _5 => _5.includes, 'call', _6 => _6(item[props.rowKey])]);
|
|
91
|
+
_optionalChain([_rowSelection, 'access', _7 => _7.value, 'access', _8 => _8.onSelect, 'optionalCall', _9 => _9(item, !_selected)]);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
77
94
|
return (_ctx, _cache) => {
|
|
78
95
|
return (_openBlock(), _createElementBlock("div", _hoisted_1, [
|
|
79
96
|
(_ctx.mode === 'CARD')
|
|
@@ -87,36 +104,35 @@ const __sfc_main__ = _defineComponent({
|
|
|
87
104
|
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.dataSource, (item) => {
|
|
88
105
|
return (_openBlock(), _createElementBlock("div", {
|
|
89
106
|
class: _normalizeClass(['jtable-card-item', props.cardBodyClass]),
|
|
90
|
-
key: item[props.rowKey]
|
|
107
|
+
key: item[props.rowKey],
|
|
108
|
+
onClick: ($event) => (onClick(item))
|
|
91
109
|
}, [
|
|
92
|
-
_renderSlot(_ctx.$slots, "card",
|
|
93
|
-
],
|
|
110
|
+
_renderSlot(_ctx.$slots, "card", _mergeProps({ ref_for: true }, item))
|
|
111
|
+
], 10 /* CLASS, PROPS */, _hoisted_3));
|
|
94
112
|
}), 128 /* KEYED_FRAGMENT */))
|
|
95
113
|
], 4 /* STYLE */))
|
|
96
|
-
: (_openBlock(), _createElementBlock("div",
|
|
114
|
+
: (_openBlock(), _createElementBlock("div", _hoisted_4, [
|
|
97
115
|
_renderSlot(_ctx.$slots, "emptyText", {}, () => [
|
|
98
116
|
_createVNode(_unref(Empty))
|
|
99
117
|
])
|
|
100
118
|
]))
|
|
101
119
|
]))
|
|
102
120
|
: (_openBlock(), _createBlock(_unref(Table), _mergeProps({ key: 1 }, props, {
|
|
121
|
+
"row-selection": _ctx.rowSelection || _unref(_rowSelection),
|
|
103
122
|
dataSource: _ctx.dataSource,
|
|
104
123
|
columns: _columns.value,
|
|
105
124
|
pagination: false,
|
|
106
125
|
scroll: _scroll.value,
|
|
107
|
-
class: { 'j-table-scroll': !_optionalChain([props, 'access',
|
|
126
|
+
class: { 'j-table-scroll': !_optionalChain([props, 'access', _10 => _10.scroll, 'optionalAccess', _11 => _11.y]) }
|
|
108
127
|
}), _createSlots({
|
|
109
|
-
headerCell: _withCtx(({ column, title }) => [
|
|
110
|
-
_renderSlot(_ctx.$slots, "headerCell", _normalizeProps(_guardReactiveProps({ column, title })))
|
|
111
|
-
]),
|
|
112
128
|
bodyCell: _withCtx(({ column, record, index }) => [
|
|
113
|
-
((_optionalChain([column, 'optionalAccess',
|
|
114
|
-
? _renderSlot(_ctx.$slots, _optionalChain([column, 'optionalAccess',
|
|
129
|
+
((_optionalChain([column, 'optionalAccess', _12 => _12.key]) || _optionalChain([column, 'optionalAccess', _13 => _13.dataIndex])) && _optionalChain([column, 'optionalAccess', _14 => _14.scopedSlots]) && (_optionalChain([_slots, 'access', _15 => _15.value, 'optionalAccess', _16 => _16[_optionalChain([column, 'optionalAccess', _17 => _17.dataIndex])]]) || _optionalChain([_slots, 'access', _18 => _18.value, 'optionalAccess', _19 => _19[_optionalChain([column, 'optionalAccess', _20 => _20.key])]])))
|
|
130
|
+
? _renderSlot(_ctx.$slots, _optionalChain([column, 'optionalAccess', _21 => _21.key]) || _optionalChain([column, 'optionalAccess', _22 => _22.dataIndex]), _mergeProps({ key: 0 }, record, {
|
|
115
131
|
index: index,
|
|
116
132
|
column: column
|
|
117
133
|
}))
|
|
118
134
|
: (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [
|
|
119
|
-
_createTextVNode(_toDisplayString(_unref(get)(record, _optionalChain([column, 'optionalAccess',
|
|
135
|
+
_createTextVNode(_toDisplayString(_unref(get)(record, _optionalChain([column, 'optionalAccess', _23 => _23.dataIndex]) || _optionalChain([column, 'optionalAccess', _24 => _24.key])) || '--'), 1 /* TEXT */)
|
|
120
136
|
], 64 /* STABLE_FRAGMENT */))
|
|
121
137
|
]),
|
|
122
138
|
emptyText: _withCtx(() => [
|
|
@@ -126,17 +142,17 @@ const __sfc_main__ = _defineComponent({
|
|
|
126
142
|
]),
|
|
127
143
|
_: 2 /* DYNAMIC */
|
|
128
144
|
}, [
|
|
129
|
-
_renderList(
|
|
145
|
+
_renderList(_slots.value, (_, slotKey) => {
|
|
130
146
|
return {
|
|
131
147
|
name: slotKey,
|
|
132
148
|
fn: _withCtx((slotProps) => [
|
|
133
|
-
(!['
|
|
149
|
+
(!((_optionalChain([__props, 'access', _25 => _25.column, 'optionalAccess', _26 => _26.key]) || _optionalChain([__props, 'access', _27 => _27.column, 'optionalAccess', _28 => _28.dataIndex])) && _optionalChain([__props, 'access', _29 => _29.column, 'optionalAccess', _30 => _30.scopedSlots]) && (_optionalChain([_slots, 'access', _31 => _31.value, 'optionalAccess', _32 => _32[_optionalChain([__props, 'access', _33 => _33.column, 'optionalAccess', _34 => _34.dataIndex])]]) || _optionalChain([_slots, 'access', _35 => _35.value, 'optionalAccess', _36 => _36[_optionalChain([__props, 'access', _37 => _37.column, 'optionalAccess', _38 => _38.key])]]))))
|
|
134
150
|
? _renderSlot(_ctx.$slots, slotKey, _normalizeProps(_mergeProps({ key: 0 }, slotProps)))
|
|
135
151
|
: _createCommentVNode("v-if", true)
|
|
136
152
|
])
|
|
137
153
|
};
|
|
138
154
|
})
|
|
139
|
-
]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */, ["dataSource", "columns", "scroll", "class"]))
|
|
155
|
+
]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */, ["row-selection", "dataSource", "columns", "scroll", "class"]))
|
|
140
156
|
]));
|
|
141
157
|
};
|
|
142
158
|
}
|