@jetlinks-web/components 2.7.0 → 3.0.0
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/AutoComplete/AutoComplete.js +2 -3
- package/es/BadgeStatus/Badge.js +2 -3
- package/es/CardSelect/CardSelect.js +23 -18
- package/es/CardSelect/style/index.js +25 -1
- package/es/CheckButton/CheckButton.js +12 -4
- package/es/CheckButton/style/index.js +41 -1
- package/es/ConfigProvider/index.js +1 -1
- package/es/DragModal/DragModal.js +15 -9
- package/es/DragModal/style/index.js +64 -1
- package/es/EditTable/Body.js +10 -3
- package/es/EditTable/EditTable.js +14 -8
- package/es/EditTable/FormItem.js +15 -10
- package/es/EditTable/Header.js +16 -6
- package/es/EditTable/components/ContextMenu/Menu.js +12 -6
- package/es/EditTable/components/Search/search.js +1 -2
- package/es/EditTable/components/Search/sort.js +1 -3
- package/es/EditTable/group.js +24 -19
- package/es/EditTable/hooks/useValidate.js +1 -1
- package/es/EditTable/style/body.js +53 -0
- package/es/EditTable/style/form.js +24 -0
- package/es/EditTable/style/group.js +25 -0
- package/es/EditTable/style/header.js +58 -0
- package/es/EditTable/style/index.js +42 -1
- package/es/EditTable/style/menu.js +27 -0
- package/es/EditTable/style/table.js +46 -0
- package/es/EditTable/utils.js +1 -1
- package/es/Ellipsis/Ellipsis.js +11 -3
- package/es/Ellipsis/style/index.js +24 -1
- package/es/Empty/Empty.js +1 -1
- package/es/FullPage/FullPage.js +1 -2
- package/es/LocaleProvider/index.js +1 -2
- package/es/PermissionButton/index.js +4 -5
- package/es/ProLayout/Basic/BasicLayout.js +46 -42
- package/es/ProLayout/Basic/BasicLayoutStyle.js +39 -0
- package/es/ProLayout/Basic/Header.js +4 -8
- package/es/ProLayout/Basic/HeaderStyle.js +10 -0
- package/es/ProLayout/PageContainer/index.js +20 -16
- package/es/ProLayout/PageContainer/style.js +46 -0
- package/es/ProLayout/SiderMenu/BaseMenu.js +14 -37
- package/es/ProLayout/SiderMenu/SiderMenu.js +25 -36
- package/es/ProLayout/SiderMenu/style.js +166 -0
- package/es/ProLayout/TopHeader/index.js +12 -11
- package/es/ProLayout/TopHeader/style.js +126 -0
- package/es/ProLayout/style/index.js +7 -1
- package/es/ProLayout/util.js +5 -5
- package/es/ProTable/Alert.js +13 -5
- package/es/ProTable/Content.js +22 -14
- package/es/ProTable/Header.js +22 -12
- package/es/ProTable/Pagination.js +13 -5
- package/es/ProTable/ProTable.js +43 -27
- package/es/ProTable/setting.js +1 -1
- package/es/ProTable/style/index.js +109 -1
- package/es/RadioButton/RadioButton.js +10 -4
- package/es/RadioButton/style/index.js +23 -1
- package/es/Scrollbar/Scrollbar.js +10 -3
- package/es/Scrollbar/Thumb.js +36 -25
- package/es/Scrollbar/style/index.js +63 -1
- package/es/Search/Advanced/History.js +24 -17
- package/es/Search/Advanced/SaveHistory.js +2 -3
- package/es/Search/Advanced/index.js +213 -293
- package/es/Search/Item.js +175 -415
- package/es/Search/Search.js +78 -172
- package/es/Search/hooks/index.js +108 -1
- package/es/Search/hooks/useRouteQuery.js +57 -0
- package/es/Search/setting.js +132 -14
- package/es/Search/style/index.js +4 -2
- package/es/Search/style/item.js +28 -0
- package/es/Search/style/search.js +133 -0
- package/es/Search/util.js +116 -124
- package/es/Skeleton/components/DashBoardCard.js +64 -0
- package/es/Skeleton/components/DashBoardChart.js +96 -0
- package/es/Skeleton/components/Detail.js +110 -0
- package/es/Skeleton/components/Drawer.js +91 -0
- package/es/Skeleton/components/Item.js +68 -0
- package/es/Skeleton/components/List.js +45 -0
- package/es/Skeleton/components/ListCard.js +63 -0
- package/es/Skeleton/components/ListCardItem.js +86 -0
- package/es/Skeleton/components/ListTable.js +76 -0
- package/es/Skeleton/components/Page.js +62 -0
- package/es/Skeleton/components/Search.js +54 -0
- package/es/Skeleton/components/Tree.js +72 -0
- package/es/Skeleton/index.js +15 -0
- package/es/Skeleton/skeleton.js +58 -0
- package/es/Skeleton/style/index.js +132 -0
- package/es/Title/style/index.js +29 -1
- package/es/Title/title.js +13 -5
- package/es/ValueItem/ValueItem.js +29 -72
- package/es/components.js +0 -3
- package/es/locale/en-US.js +0 -7
- package/es/locale/zh-CN.js +0 -7
- package/es/style/index.js +0 -3
- package/es/style/styleRegister.js +21 -0
- package/es/style/variable.js +4 -0
- package/es/style.js +0 -12
- package/lib/AutoComplete/AutoComplete.js +1 -2
- package/lib/BadgeStatus/Badge.js +2 -3
- package/lib/CardSelect/CardSelect.js +23 -18
- package/lib/CardSelect/style/index.js +30 -1
- package/lib/CheckButton/CheckButton.js +12 -4
- package/lib/CheckButton/style/index.js +46 -1
- package/lib/ConfigProvider/context.js +1 -1
- package/lib/ConfigProvider/index.js +3 -3
- package/lib/DragModal/DragModal.js +15 -9
- package/lib/DragModal/style/index.js +69 -1
- package/lib/EditTable/Body.js +10 -3
- package/lib/EditTable/EditTable.js +13 -7
- package/lib/EditTable/FormItem.js +16 -11
- package/lib/EditTable/Header.js +16 -6
- package/lib/EditTable/components/ContextMenu/Menu.js +12 -6
- package/lib/EditTable/components/Search/search.js +1 -2
- package/lib/EditTable/components/Search/sort.js +1 -3
- package/lib/EditTable/group.js +24 -19
- package/lib/EditTable/hooks/useValidate.js +1 -1
- package/lib/EditTable/style/body.js +60 -0
- package/lib/EditTable/style/form.js +31 -0
- package/lib/EditTable/style/group.js +32 -0
- package/lib/EditTable/style/header.js +65 -0
- package/lib/EditTable/style/index.js +47 -1
- package/lib/EditTable/style/menu.js +33 -0
- package/lib/EditTable/style/table.js +52 -0
- package/lib/EditTable/utils.js +1 -1
- package/lib/Ellipsis/Ellipsis.js +11 -3
- package/lib/Ellipsis/style/index.js +29 -1
- package/lib/Empty/Empty.js +1 -1
- package/lib/FullPage/FullPage.js +1 -2
- package/lib/LocaleProvider/index.js +1 -2
- package/lib/PermissionButton/index.js +9 -10
- package/lib/ProLayout/Basic/BasicLayout.js +55 -51
- package/lib/ProLayout/Basic/BasicLayoutStyle.js +46 -0
- package/lib/ProLayout/Basic/Header.js +6 -10
- package/lib/ProLayout/Basic/HeaderStyle.js +17 -0
- package/lib/ProLayout/PageContainer/index.js +24 -20
- package/lib/ProLayout/PageContainer/style.js +53 -0
- package/lib/ProLayout/SiderMenu/BaseMenu.js +18 -40
- package/lib/ProLayout/SiderMenu/SiderMenu.js +28 -39
- package/lib/ProLayout/SiderMenu/style.js +173 -0
- package/lib/ProLayout/TopHeader/index.js +12 -10
- package/lib/ProLayout/TopHeader/style.js +133 -0
- package/lib/ProLayout/defaultSettings.js +1 -1
- package/lib/ProLayout/style/index.js +12 -1
- package/lib/ProLayout/util.js +5 -5
- package/lib/ProTable/Alert.js +13 -5
- package/lib/ProTable/Content.js +22 -14
- package/lib/ProTable/Header.js +22 -12
- package/lib/ProTable/Pagination.js +13 -5
- package/lib/ProTable/ProTable.js +43 -27
- package/lib/ProTable/setting.js +3 -3
- package/lib/ProTable/style/index.js +114 -1
- package/lib/RadioButton/RadioButton.js +10 -4
- package/lib/RadioButton/style/index.js +28 -1
- package/lib/Scrollbar/Scrollbar.js +10 -3
- package/lib/Scrollbar/Thumb.js +36 -25
- package/lib/Scrollbar/style/index.js +68 -1
- package/lib/Search/Advanced/History.js +24 -17
- package/lib/Search/Advanced/SaveHistory.js +2 -3
- package/lib/Search/Advanced/index.js +213 -293
- package/lib/Search/Item.js +175 -415
- package/lib/Search/Search.js +78 -172
- package/lib/Search/hooks/index.js +130 -1
- package/lib/Search/hooks/useRouteQuery.js +64 -0
- package/lib/Search/setting.js +133 -15
- package/lib/Search/style/index.js +9 -2
- package/lib/Search/style/item.js +35 -0
- package/lib/Search/style/search.js +140 -0
- package/lib/Search/util.js +116 -124
- package/lib/Skeleton/components/DashBoardCard.js +64 -0
- package/lib/Skeleton/components/DashBoardChart.js +96 -0
- package/lib/Skeleton/components/Detail.js +110 -0
- package/lib/Skeleton/components/Drawer.js +91 -0
- package/lib/Skeleton/components/Item.js +68 -0
- package/lib/Skeleton/components/List.js +45 -0
- package/lib/Skeleton/components/ListCard.js +63 -0
- package/lib/Skeleton/components/ListCardItem.js +86 -0
- package/lib/Skeleton/components/ListTable.js +76 -0
- package/lib/Skeleton/components/Page.js +62 -0
- package/lib/Skeleton/components/Search.js +54 -0
- package/lib/Skeleton/components/Tree.js +72 -0
- package/lib/Skeleton/index.js +75 -0
- package/lib/Skeleton/skeleton.js +58 -0
- package/lib/Skeleton/style/index.js +139 -0
- package/lib/Title/style/index.js +34 -1
- package/lib/Title/title.js +13 -5
- package/lib/ValueItem/ValueItem.js +29 -72
- package/lib/components.js +0 -21
- package/lib/locale/en-US.js +0 -7
- package/lib/locale/zh-CN.js +0 -7
- package/lib/style/components.less +0 -1
- package/lib/style/index.js +1 -4
- package/lib/style/styleRegister.js +28 -0
- package/lib/style/variable.js +10 -0
- package/lib/style.js +1 -14
- package/package.json +13 -14
- package/es/AMap/Map.js +0 -133
- package/es/AMap/index.js +0 -5
- package/es/AMap/util.js +0 -56
- package/es/CardSelect/style/index.css +0 -24
- package/es/CardSelect/style/index.less +0 -26
- package/es/CheckButton/style/index.css +0 -37
- package/es/CheckButton/style/index.less +0 -40
- package/es/DragModal/style/index.css +0 -82
- package/es/DragModal/style/index.less +0 -97
- package/es/Echarts/Echarts.js +0 -48
- package/es/Echarts/index.js +0 -5
- package/es/EditTable/style/body.less +0 -66
- package/es/EditTable/style/form.less +0 -33
- package/es/EditTable/style/group.less +0 -32
- package/es/EditTable/style/header.less +0 -77
- package/es/EditTable/style/index.css +0 -267
- package/es/EditTable/style/index.less +0 -41
- package/es/EditTable/style/menu.less +0 -25
- package/es/EditTable/style/table.less +0 -47
- package/es/Ellipsis/style/index.css +0 -17
- package/es/Ellipsis/style/index.less +0 -20
- package/es/MonacoEditor/Monaco.js +0 -242
- package/es/MonacoEditor/index.js +0 -5
- package/es/MonacoEditor/style/index.css +0 -4
- package/es/MonacoEditor/style/index.js +0 -1
- package/es/MonacoEditor/style/index.less +0 -4
- package/es/ProLayout/Basic/BasicLayout.less +0 -66
- package/es/ProLayout/Basic/Header.less +0 -8
- package/es/ProLayout/PageContainer/index.less +0 -103
- package/es/ProLayout/SiderMenu/index.less +0 -231
- package/es/ProLayout/TopHeader/index.less +0 -174
- package/es/ProLayout/style/default.less +0 -4
- package/es/ProLayout/style/style.less +0 -7
- package/es/ProTable/style/ProTable.less +0 -141
- package/es/RadioButton/style/index.css +0 -20
- package/es/RadioButton/style/index.less +0 -19
- package/es/Scrollbar/style/index.css +0 -65
- package/es/Scrollbar/style/index.less +0 -83
- package/es/Search/style/Item.less +0 -33
- package/es/Search/style/Search.less +0 -179
- package/es/Title/style/index.css +0 -23
- package/es/Title/style/index.less +0 -25
- package/es/style/index.css +0 -5197
- package/es/style/index.less +0 -13
- package/es/style/variable.css +0 -4
- package/es/style/variable.less +0 -4
- package/lib/AMap/Map.js +0 -133
- package/lib/AMap/index.js +0 -12
- package/lib/AMap/util.js +0 -62
- package/lib/CardSelect/style/index.css +0 -24
- package/lib/CardSelect/style/index.less +0 -26
- package/lib/CheckButton/style/index.css +0 -37
- package/lib/CheckButton/style/index.less +0 -40
- package/lib/DragModal/style/index.css +0 -82
- package/lib/DragModal/style/index.less +0 -97
- package/lib/Echarts/Echarts.js +0 -48
- package/lib/Echarts/index.js +0 -12
- package/lib/EditTable/style/body.less +0 -66
- package/lib/EditTable/style/form.less +0 -33
- package/lib/EditTable/style/group.less +0 -32
- package/lib/EditTable/style/header.less +0 -77
- package/lib/EditTable/style/index.css +0 -267
- package/lib/EditTable/style/index.less +0 -41
- package/lib/EditTable/style/menu.less +0 -25
- package/lib/EditTable/style/table.less +0 -47
- package/lib/Ellipsis/style/index.css +0 -17
- package/lib/Ellipsis/style/index.less +0 -20
- package/lib/MonacoEditor/Monaco.js +0 -242
- package/lib/MonacoEditor/index.js +0 -12
- package/lib/MonacoEditor/style/index.css +0 -4
- package/lib/MonacoEditor/style/index.js +0 -3
- package/lib/MonacoEditor/style/index.less +0 -4
- package/lib/ProLayout/Basic/BasicLayout.less +0 -66
- package/lib/ProLayout/Basic/Header.less +0 -8
- package/lib/ProLayout/PageContainer/index.less +0 -103
- package/lib/ProLayout/SiderMenu/index.less +0 -231
- package/lib/ProLayout/TopHeader/index.less +0 -174
- package/lib/ProLayout/style/default.less +0 -4
- package/lib/ProLayout/style/style.less +0 -7
- package/lib/ProTable/style/ProTable.less +0 -141
- package/lib/RadioButton/style/index.css +0 -20
- package/lib/RadioButton/style/index.less +0 -19
- package/lib/Scrollbar/style/index.css +0 -65
- package/lib/Scrollbar/style/index.less +0 -83
- package/lib/Search/style/Item.less +0 -33
- package/lib/Search/style/Search.less +0 -179
- package/lib/Title/style/index.css +0 -23
- package/lib/Title/style/index.less +0 -25
- package/lib/style/index.css +0 -5197
- package/lib/style/index.less +0 -13
- package/lib/style/variable.css +0 -4
- package/lib/style/variable.less +0 -4
|
@@ -11,17 +11,15 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
12
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
13
13
|
var _type = require("ant-design-vue/lib/_util/type");
|
|
14
|
-
var
|
|
14
|
+
var _antDesignVue = require("ant-design-vue");
|
|
15
15
|
var _pageHeader = require("ant-design-vue/lib/page-header");
|
|
16
16
|
var _RouteContext = require("../RouteContext");
|
|
17
17
|
var _util = require("../util");
|
|
18
|
-
require("ant-design-vue/
|
|
18
|
+
require("ant-design-vue/es/_util/vue-types");
|
|
19
19
|
var _defaultSettings = require("../defaultSettings");
|
|
20
20
|
var _LocaleReciver = require("../../LocaleReciver");
|
|
21
|
+
var _style = _interopRequireDefault(require("../style"));
|
|
21
22
|
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
23
|
var pageHeaderTabConfig = exports.pageHeaderTabConfig = {
|
|
26
24
|
/**
|
|
27
25
|
* @name tabs 的列表
|
|
@@ -157,8 +155,7 @@ var renderFooter = function renderFooter(props) {
|
|
|
157
155
|
}, [item.tab]);
|
|
158
156
|
};
|
|
159
157
|
if (tabList && tabList.length) {
|
|
160
|
-
|
|
161
|
-
return (0, _vue.createVNode)(_lib.Tabs, (0, _objectSpread2.default)({
|
|
158
|
+
return (0, _vue.createVNode)(_antDesignVue.Tabs, (0, _objectSpread2.default)({
|
|
162
159
|
"class": "page-container-tabs",
|
|
163
160
|
"activeKey": tabActiveKey,
|
|
164
161
|
"onChange": function onChange(key) {
|
|
@@ -167,14 +164,14 @@ var renderFooter = function renderFooter(props) {
|
|
|
167
164
|
}
|
|
168
165
|
},
|
|
169
166
|
"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 : {
|
|
167
|
+
}, tabProps), {
|
|
176
168
|
default: function _default() {
|
|
177
|
-
return [
|
|
169
|
+
return [tabList.map(function (item) {
|
|
170
|
+
return (0, _vue.createVNode)(_antDesignVue.Tabs.TabPane, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
171
|
+
"tab": tabPane(item),
|
|
172
|
+
"key": item.key
|
|
173
|
+
}), null);
|
|
174
|
+
})];
|
|
178
175
|
}
|
|
179
176
|
});
|
|
180
177
|
}
|
|
@@ -235,7 +232,7 @@ var ProPageHeader = function ProPageHeader(props) {
|
|
|
235
232
|
var backProps = {};
|
|
236
233
|
if (showBack) {
|
|
237
234
|
// @ts-ignore
|
|
238
|
-
backProps.backIcon = (0, _vue.createVNode)(
|
|
235
|
+
backProps.backIcon = (0, _vue.createVNode)(_antDesignVue.Button, null, {
|
|
239
236
|
default: function _default() {
|
|
240
237
|
return [contextLocale.value.pageContainer.back];
|
|
241
238
|
}
|
|
@@ -250,7 +247,7 @@ var ProPageHeader = function ProPageHeader(props) {
|
|
|
250
247
|
} : {};
|
|
251
248
|
return (0, _vue.createVNode)("div", {
|
|
252
249
|
"class": "".concat(prefixedClassName, "-wrap")
|
|
253
|
-
}, [(0, _vue.createVNode)(
|
|
250
|
+
}, [(0, _vue.createVNode)(_antDesignVue.PageHeader, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
254
251
|
"style": styles
|
|
255
252
|
}, backProps), restProps), {}, {
|
|
256
253
|
"title": pageHeaderTitle,
|
|
@@ -281,11 +278,18 @@ var PageContainer = (0, _vue.defineComponent)({
|
|
|
281
278
|
var value = (0, _RouteContext.useRouteContext)();
|
|
282
279
|
var getPrefixCls = value.getPrefixCls;
|
|
283
280
|
var prefixCls = props.prefixCls || getPrefixCls();
|
|
281
|
+
var stylePrefixCls = (0, _vue.computed)(function () {
|
|
282
|
+
return 'pro-layout';
|
|
283
|
+
});
|
|
284
|
+
var _useProLayoutStyle = (0, _style.default)(stylePrefixCls),
|
|
285
|
+
_useProLayoutStyle2 = (0, _slicedToArray2.default)(_useProLayoutStyle, 2),
|
|
286
|
+
wrapSSR = _useProLayoutStyle2[0],
|
|
287
|
+
hashId = _useProLayoutStyle2[1];
|
|
284
288
|
var prefixedClassName = (0, _vue.computed)(function () {
|
|
285
289
|
return "".concat(prefixCls, "-page-container");
|
|
286
290
|
});
|
|
287
291
|
var classNames = (0, _vue.computed)(function () {
|
|
288
|
-
return (0, _defineProperty2.default)((0, _defineProperty2.default)({}, prefixedClassName.value, true), "".concat(prefixCls, "-page-container-ghost"), ghost.value);
|
|
292
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, hashId.value, true), prefixedClassName.value, true), "".concat(prefixCls, "-page-container-ghost"), ghost.value);
|
|
289
293
|
});
|
|
290
294
|
var headerDom = (0, _vue.computed)(function () {
|
|
291
295
|
// const tags = getSlotVNode<DefaultPropRender>(slots, props, 'tags');
|
|
@@ -315,7 +319,7 @@ var PageContainer = (0, _vue.defineComponent)({
|
|
|
315
319
|
}, [(_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)]) : (0, _vue.createVNode)("div", {
|
|
316
320
|
"class": classNames.value,
|
|
317
321
|
"style": (0, _objectSpread2.default)({}, attrs.style || {})
|
|
318
|
-
}, [fixedHeader && headerDom.value ? (0, _vue.createVNode)(
|
|
322
|
+
}, [fixedHeader && headerDom.value ? (0, _vue.createVNode)(_antDesignVue.Affix, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, affixProps.value), {}, {
|
|
319
323
|
"offsetTop": value.hasHeader && value.fixedHeader ? value.headerHeight : 0
|
|
320
324
|
}), {
|
|
321
325
|
default: function _default() {
|
|
@@ -323,8 +327,8 @@ var PageContainer = (0, _vue.defineComponent)({
|
|
|
323
327
|
}
|
|
324
328
|
}) : headerDom.value, (0, _vue.createVNode)("div", {
|
|
325
329
|
"class": "".concat(prefixedClassName.value, "-grid-content")
|
|
326
|
-
}, [loading.value ? (0, _vue.createVNode)(
|
|
327
|
-
"class": "".concat(prefixedClassName.value, "-children-content ").concat(childrenFullHeight.value ? 'children-full-height' : ''),
|
|
330
|
+
}, [loading.value ? (0, _vue.createVNode)(_antDesignVue.Spin, null, null) : slots.default ? (0, _vue.createVNode)("div", null, [(0, _vue.createVNode)("div", {
|
|
331
|
+
"class": "".concat(prefixedClassName.value, "-children-content ").concat(childrenFullHeight.value ? 'children-full-height' : '', " ").concat(hashId.value),
|
|
328
332
|
"style": (0, _objectSpread2.default)({}, props.contentStyle || {})
|
|
329
333
|
}, [slots.default()]), value.hasFooterToolbar && (0, _vue.createVNode)("div", {
|
|
330
334
|
"style": {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.genPageContainerStyle = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var genPageContainerStyle = exports.genPageContainerStyle = function genPageContainerStyle(config) {
|
|
10
|
+
var token = config.token;
|
|
11
|
+
var proLayoutPageContainerCls = "".concat(token.antCls, "-pro-page-container");
|
|
12
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(proLayoutPageContainerCls, "-children-content"), {
|
|
13
|
+
margin: '24px 24px 0'
|
|
14
|
+
}), "".concat(proLayoutPageContainerCls), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(proLayoutPageContainerCls, "-warp"), (0, _defineProperty2.default)({
|
|
15
|
+
backgroundColor: token.colorBgContainer
|
|
16
|
+
}, "".concat(token.antCls, "-tabs-bar"), {
|
|
17
|
+
margin: 0
|
|
18
|
+
})), "".concat(proLayoutPageContainerCls, "-ghost"), (0, _defineProperty2.default)({}, "".concat(proLayoutPageContainerCls, "-warp"), {
|
|
19
|
+
backgroundColor: token.colorBgContainer
|
|
20
|
+
}))), "".concat(proLayoutPageContainerCls, "-main"), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(proLayoutPageContainerCls, "-detail"), {
|
|
21
|
+
display: 'flex'
|
|
22
|
+
}), "".concat(proLayoutPageContainerCls, "-row"), {
|
|
23
|
+
display: 'flex',
|
|
24
|
+
width: '100%'
|
|
25
|
+
}), "".concat(proLayoutPageContainerCls, "-title-content"), {
|
|
26
|
+
marginBottom: '16px'
|
|
27
|
+
}), "".concat(proLayoutPageContainerCls, "-title,").concat(proLayoutPageContainerCls, "-content"), {
|
|
28
|
+
flex: 'auto'
|
|
29
|
+
}), "".concat(proLayoutPageContainerCls, "-extraContent,").concat(proLayoutPageContainerCls, "-main"), {
|
|
30
|
+
flex: '0 1 auto'
|
|
31
|
+
}), "".concat(proLayoutPageContainerCls, "-title"), {
|
|
32
|
+
marginBottom: '16px'
|
|
33
|
+
}), "".concat(proLayoutPageContainerCls, "-logo"), {
|
|
34
|
+
marginBottom: '16px'
|
|
35
|
+
}), "".concat(proLayoutPageContainerCls, "-extraContent"), {
|
|
36
|
+
minWidth: '242px',
|
|
37
|
+
marginLeft: '88px',
|
|
38
|
+
textAlign: 'right'
|
|
39
|
+
})), "@media screen and (max-width: ".concat(token.screenXl, "px)"), (0, _defineProperty2.default)({}, "".concat(proLayoutPageContainerCls, "-main"), (0, _defineProperty2.default)({}, "".concat(proLayoutPageContainerCls, "-extraContent"), {
|
|
40
|
+
marginLeft: '44px'
|
|
41
|
+
}))), "@media screen and (max-width: ".concat(token.screenLG, "px)"), (0, _defineProperty2.default)({}, "".concat(proLayoutPageContainerCls, "-main"), (0, _defineProperty2.default)({}, "".concat(proLayoutPageContainerCls, "-extraContent"), {
|
|
42
|
+
marginLeft: '20px'
|
|
43
|
+
}))), "@media screen and (max-width: ".concat(token.screenMD, "px)"), (0, _defineProperty2.default)({}, "".concat(proLayoutPageContainerCls, "-main"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(proLayoutPageContainerCls, "-row"), {
|
|
44
|
+
display: 'block'
|
|
45
|
+
}), "".concat(proLayoutPageContainerCls, "-extraContent,").concat(proLayoutPageContainerCls, "-action"), {
|
|
46
|
+
marginLeft: 0,
|
|
47
|
+
textAlign: 'left'
|
|
48
|
+
}))), "@media screen and (max-width: ".concat(token.screenSM, "px)"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(proLayoutPageContainerCls, "-detail"), {
|
|
49
|
+
display: 'block'
|
|
50
|
+
}), "".concat(proLayoutPageContainerCls, "-extraContent"), {
|
|
51
|
+
marginLeft: 0
|
|
52
|
+
}));
|
|
53
|
+
};
|
|
@@ -6,20 +6,17 @@ 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");
|
|
16
16
|
var _Icon = _interopRequireDefault(require("../../Icon"));
|
|
17
17
|
var _utils = require("@jetlinks-web/utils");
|
|
18
|
-
var
|
|
18
|
+
var _antDesignVue = require("ant-design-vue");
|
|
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,22 +133,14 @@ 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
|
-
|
|
152
|
-
return [menuTitle];
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
return (0, _vue.createVNode)(_lib.Menu.SubMenu, {
|
|
142
|
+
}, [menuTitle]);
|
|
143
|
+
return (0, _vue.createVNode)(_antDesignVue.Menu.SubMenu, {
|
|
156
144
|
"title": defaultTitle,
|
|
157
145
|
"key": item.path,
|
|
158
146
|
"popupClassName": "".concat(prefixCls, "-menu-popup"),
|
|
@@ -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
|
}
|
|
@@ -175,18 +163,17 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
175
163
|
item: item,
|
|
176
164
|
title: title,
|
|
177
165
|
icon: icon
|
|
178
|
-
}) || (0, _vue.createVNode)(
|
|
166
|
+
}) || (0, _vue.createVNode)(_antDesignVue.Menu.Item, {
|
|
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 _slot2;
|
|
190
177
|
var _item$meta9, _item$meta10, _item$meta11, _item$meta12, _item$meta13;
|
|
191
178
|
var meta = (0, _objectSpread2.default)({}, item.meta);
|
|
192
179
|
var target = meta.target || null;
|
|
@@ -209,27 +196,19 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
209
196
|
"icon": (_item$meta10 = item.meta) === null || _item$meta10 === void 0 ? void 0 : _item$meta10.icon
|
|
210
197
|
}, null) || undefined;
|
|
211
198
|
var menuTitle = locale && locale((_item$meta11 = item.meta) === null || _item$meta11 === void 0 ? void 0 : _item$meta11.title) || ((_item$meta12 = item.meta) === null || _item$meta12 === void 0 ? void 0 : _item$meta12.title);
|
|
212
|
-
var defaultTitle = (
|
|
199
|
+
var defaultTitle = (_item$meta13 = item.meta) !== null && _item$meta13 !== void 0 && _item$meta13.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,8 +246,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
267
246
|
emit('click', args);
|
|
268
247
|
};
|
|
269
248
|
return function () {
|
|
270
|
-
|
|
271
|
-
return (0, _vue.createVNode)(_lib.Menu, (0, _objectSpread2.default)({
|
|
249
|
+
return (0, _vue.createVNode)(_antDesignVue.Menu, (0, _objectSpread2.default)({
|
|
272
250
|
"key": "Menu",
|
|
273
251
|
"inlineIndent": 16,
|
|
274
252
|
"mode": props.mode,
|
|
@@ -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
|
};
|
|
@@ -8,20 +8,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.siderMenuProps = exports.defaultRenderLogoAndTitle = exports.defaultRenderLogo = exports.defaultRenderCollapsedButton = exports.default = void 0;
|
|
9
9
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
12
|
var _vue = require("vue");
|
|
12
13
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
13
|
-
var
|
|
14
|
+
var _antDesignVue = require("ant-design-vue");
|
|
14
15
|
var _BaseMenu = _interopRequireWildcard(require("./BaseMenu"));
|
|
15
16
|
var _defaultSettings = require("../defaultSettings");
|
|
16
|
-
var _vueTypes = _interopRequireDefault(require("ant-design-vue/
|
|
17
|
+
var _vueTypes = _interopRequireDefault(require("ant-design-vue/es/_util/vue-types"));
|
|
17
18
|
var _Icon = _interopRequireDefault(require("../../Icon"));
|
|
18
19
|
var _RouteContext = require("../RouteContext");
|
|
19
20
|
require("../typings");
|
|
21
|
+
var _style = _interopRequireDefault(require("../style"));
|
|
20
22
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
23
|
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
|
-
}
|
|
25
24
|
var siderMenuProps = exports.siderMenuProps = (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, _defaultSettings.defaultSettingProps), _BaseMenu.baseMenuProps), {}, {
|
|
26
25
|
logo: {
|
|
27
26
|
type: [Object, String, Function],
|
|
@@ -105,7 +104,7 @@ var defaultRenderLogo = exports.defaultRenderLogo = function defaultRenderLogo(l
|
|
|
105
104
|
return logo();
|
|
106
105
|
}
|
|
107
106
|
if (typeof logo === 'string') {
|
|
108
|
-
return application.length ? (0, _vue.createVNode)(
|
|
107
|
+
return application.length ? (0, _vue.createVNode)(_antDesignVue.Tooltip, {
|
|
109
108
|
"placement": "rightTop",
|
|
110
109
|
"color": "#fff",
|
|
111
110
|
"arrowPointAtCenter": true
|
|
@@ -154,11 +153,7 @@ var defaultRenderLogoAndTitle = exports.defaultRenderLogoAndTitle = function def
|
|
|
154
153
|
if (layout === 'mix' && renderFunction === false) {
|
|
155
154
|
return null;
|
|
156
155
|
}
|
|
157
|
-
var titleDom = (0, _vue.createVNode)("h1", null,
|
|
158
|
-
default: function _default() {
|
|
159
|
-
return [title];
|
|
160
|
-
}
|
|
161
|
-
});
|
|
156
|
+
var titleDom = (0, _vue.createVNode)("h1", null, [title]);
|
|
162
157
|
if (renderKey === 'menuHeaderRender') {
|
|
163
158
|
return null;
|
|
164
159
|
}
|
|
@@ -168,11 +163,7 @@ var defaultRenderLogoAndTitle = exports.defaultRenderLogoAndTitle = function def
|
|
|
168
163
|
return renderFunction(logoDom, props.collapsed ? null : titleDom, props);
|
|
169
164
|
}
|
|
170
165
|
if (Array.isArray(renderFunction)) {
|
|
171
|
-
return (0, _vue.createVNode)(_vue.Fragment, null,
|
|
172
|
-
default: function _default() {
|
|
173
|
-
return [renderFunction];
|
|
174
|
-
}
|
|
175
|
-
});
|
|
166
|
+
return (0, _vue.createVNode)(_vue.Fragment, null, [renderFunction]);
|
|
176
167
|
}
|
|
177
168
|
return (0, _vue.createVNode)("a", null, [logoDom, props.collapsed ? null : titleDom]);
|
|
178
169
|
};
|
|
@@ -184,7 +175,6 @@ var defaultRenderCollapsedButton = exports.defaultRenderCollapsedButton = functi
|
|
|
184
175
|
}, null);
|
|
185
176
|
};
|
|
186
177
|
var SiderMenu = function SiderMenu(props) {
|
|
187
|
-
var _slot;
|
|
188
178
|
var collapsed = props.collapsed,
|
|
189
179
|
siderWidth = props.siderWidth,
|
|
190
180
|
breakpoint = props.breakpoint,
|
|
@@ -198,6 +188,13 @@ var SiderMenu = function SiderMenu(props) {
|
|
|
198
188
|
collapsedButtonRender = _props$collapsedButto === void 0 ? defaultRenderCollapsedButton : _props$collapsedButto,
|
|
199
189
|
linksRender = props.linksRender,
|
|
200
190
|
theme = props.theme;
|
|
191
|
+
var prefixCls = (0, _vue.computed)(function () {
|
|
192
|
+
return 'pro-layout';
|
|
193
|
+
});
|
|
194
|
+
var _useProLayoutStyle = (0, _style.default)(prefixCls),
|
|
195
|
+
_useProLayoutStyle2 = (0, _slicedToArray2.default)(_useProLayoutStyle, 2),
|
|
196
|
+
wrapSSR = _useProLayoutStyle2[0],
|
|
197
|
+
hashId = _useProLayoutStyle2[1];
|
|
201
198
|
var context = (0, _RouteContext.useRouteContext)();
|
|
202
199
|
var getPrefixCls = context.getPrefixCls;
|
|
203
200
|
var baseClassName = getPrefixCls('sider');
|
|
@@ -208,7 +205,7 @@ var SiderMenu = function SiderMenu(props) {
|
|
|
208
205
|
return props.collapsed ? props.collapsedWidth : props.siderWidth;
|
|
209
206
|
});
|
|
210
207
|
var classNames = (0, _vue.computed)(function () {
|
|
211
|
-
return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, baseClassName, true), "".concat(baseClassName, "-fixed"), context.fixSiderbar), "".concat(baseClassName, "-").concat(theme), true), "".concat(baseClassName, "-layout-").concat(props.layout), props.layout);
|
|
208
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, baseClassName, true), "".concat(baseClassName, "-fixed"), context.fixSiderbar), "".concat(baseClassName, "-").concat(theme), true), "".concat(baseClassName, "-layout-").concat(props.layout), props.layout), hashId.value, true);
|
|
212
209
|
});
|
|
213
210
|
var logCls = (0, _vue.computed)(function () {
|
|
214
211
|
return (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(baseClassName, "-logo"), true), "".concat(baseClassName, "-logo-card"), props.layoutType === _defaultSettings.LayoutType.CARD);
|
|
@@ -260,7 +257,7 @@ var SiderMenu = function SiderMenu(props) {
|
|
|
260
257
|
minWidth: "".concat(sSideWidth.value, "px"),
|
|
261
258
|
transition: "background-color 0.3s, min-width 0.3s, max-width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)"
|
|
262
259
|
}
|
|
263
|
-
}, null), (0, _vue.createVNode)(
|
|
260
|
+
}, null), (0, _vue.createVNode)(_antDesignVue.LayoutSider, {
|
|
264
261
|
"collapsible": true,
|
|
265
262
|
"trigger": null,
|
|
266
263
|
"collapsed": collapsed,
|
|
@@ -285,22 +282,14 @@ var SiderMenu = function SiderMenu(props) {
|
|
|
285
282
|
"onClick": props.layout !== 'mix' ? props.onMenuHeaderClick : undefined,
|
|
286
283
|
"id": "logo",
|
|
287
284
|
"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", {
|
|
285
|
+
}, [headerDom]), extraDom && (0, _vue.createVNode)("div", {
|
|
293
286
|
"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", {
|
|
287
|
+
}, [extraDom]), (0, _vue.createVNode)("div", {
|
|
299
288
|
"class": "".concat(baseClassName, "-body"),
|
|
300
289
|
"style": "flex: 1; overflow: hidden auto;"
|
|
301
290
|
}, [props.layoutType !== _defaultSettings.LayoutType.CARD ? menuContentRender && menuContentRender(props, defaultMenuDom) || defaultMenuDom : null]), (0, _vue.createVNode)("div", {
|
|
302
291
|
"class": "".concat(baseClassName, "-links")
|
|
303
|
-
}, [linksRender ? linksRender() : collapsedButtonRender !== false ? (0, _vue.createVNode)(
|
|
292
|
+
}, [linksRender ? linksRender() : collapsedButtonRender !== false ? (0, _vue.createVNode)(_antDesignVue.Menu, {
|
|
304
293
|
"class": "".concat(baseClassName, "-link-menu"),
|
|
305
294
|
"inlineIndent": 16,
|
|
306
295
|
"theme": theme,
|
|
@@ -312,17 +301,17 @@ var SiderMenu = function SiderMenu(props) {
|
|
|
312
301
|
props.onCollapse(!props.collapsed);
|
|
313
302
|
}
|
|
314
303
|
}
|
|
315
|
-
}, _isSlot(_slot = (0, _vue.createVNode)(_lib.Menu.Item, {
|
|
316
|
-
"key": 'collapsed-button',
|
|
317
|
-
"class": "".concat(baseClassName, "-collapsed-button"),
|
|
318
|
-
"title": false
|
|
319
304
|
}, {
|
|
320
305
|
default: function _default() {
|
|
321
|
-
return [
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
306
|
+
return [(0, _vue.createVNode)(_antDesignVue.Menu.Item, {
|
|
307
|
+
"key": 'collapsed-button',
|
|
308
|
+
"class": "".concat(baseClassName, "-collapsed-button"),
|
|
309
|
+
"title": false
|
|
310
|
+
}, {
|
|
311
|
+
default: function _default() {
|
|
312
|
+
return [collapsedButtonRender && typeof collapsedButtonRender === 'function' ? collapsedButtonRender(collapsed) : collapsedButtonRender];
|
|
313
|
+
}
|
|
314
|
+
})];
|
|
326
315
|
}
|
|
327
316
|
}) : null])];
|
|
328
317
|
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.genSiderMenuStyle = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _antDesignVue = require("ant-design-vue");
|
|
10
|
+
var genSiderMenuStyle = exports.genSiderMenuStyle = function genSiderMenuStyle(config) {
|
|
11
|
+
var _$concat8;
|
|
12
|
+
var token = config.token;
|
|
13
|
+
var proLayoutSiderMenuCls = "".concat(token.antCls, "-pro-sider");
|
|
14
|
+
var proLayoutHeaderHeight = '48px';
|
|
15
|
+
var proLayoutTitleHideKeyframes = new _antDesignVue.Keyframes('pro-layout-title-hide', {
|
|
16
|
+
'0%': {
|
|
17
|
+
display: 'none',
|
|
18
|
+
opacity: 0
|
|
19
|
+
},
|
|
20
|
+
'80%': {
|
|
21
|
+
display: 'none',
|
|
22
|
+
opacity: 0
|
|
23
|
+
},
|
|
24
|
+
'100%': {
|
|
25
|
+
display: 'unset',
|
|
26
|
+
opacity: 1
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(proLayoutSiderMenuCls), (_$concat8 = {
|
|
30
|
+
position: 'relative',
|
|
31
|
+
backgroundColor: '#001529',
|
|
32
|
+
borderRight: 0,
|
|
33
|
+
// FIXME: 临时修正(可能不会做兼容)
|
|
34
|
+
zIndex: 20
|
|
35
|
+
}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_$concat8, "".concat(token.antCls, "-menu"), {
|
|
36
|
+
background: 'transparent'
|
|
37
|
+
}), "&".concat(token.antCls, "-layout-sider-light"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(token.antCls, "-menu-item a"), {
|
|
38
|
+
color: token.colorTextHeading
|
|
39
|
+
}), "".concat(token.antCls, "-menu-item-selected a, ").concat(token.antCls, "-menu-item a:hover"), {
|
|
40
|
+
color: token.colorPrimary
|
|
41
|
+
})), "".concat(proLayoutSiderMenuCls, "-logo"), {
|
|
42
|
+
position: 'relative',
|
|
43
|
+
display: 'flex',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
padding: '16px 16px',
|
|
46
|
+
cursor: 'pointer',
|
|
47
|
+
transition: 'padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)',
|
|
48
|
+
'> a': {
|
|
49
|
+
display: 'flex',
|
|
50
|
+
alignItems: 'center',
|
|
51
|
+
justifyContent: 'center',
|
|
52
|
+
minHeight: 32
|
|
53
|
+
},
|
|
54
|
+
'img': {
|
|
55
|
+
display: 'inline-block',
|
|
56
|
+
height: 32,
|
|
57
|
+
verticalAlign: 'middle'
|
|
58
|
+
},
|
|
59
|
+
'h1': {
|
|
60
|
+
display: 'inline-block',
|
|
61
|
+
height: '32px',
|
|
62
|
+
margin: '0 0 0 12px',
|
|
63
|
+
color: 'white',
|
|
64
|
+
fontWeight: 600,
|
|
65
|
+
fontSize: '18px',
|
|
66
|
+
lineHeight: '32px',
|
|
67
|
+
verticalAlign: 'middle',
|
|
68
|
+
animationName: proLayoutTitleHideKeyframes,
|
|
69
|
+
animationDuration: '0.3s'
|
|
70
|
+
}
|
|
71
|
+
}), "".concat(proLayoutSiderMenuCls, "-logo-card"), {
|
|
72
|
+
padding: '16px 0',
|
|
73
|
+
justifyContent: 'center'
|
|
74
|
+
}), "".concat(proLayoutSiderMenuCls, "-extra"), (0, _defineProperty2.default)({
|
|
75
|
+
marginBottom: '16px',
|
|
76
|
+
padding: '0 16px'
|
|
77
|
+
}, "".concat(proLayoutSiderMenuCls, "-extra-no-logo"), {
|
|
78
|
+
marginTop: '16px'
|
|
79
|
+
})), "".concat(proLayoutSiderMenuCls, "-menu"), {
|
|
80
|
+
position: 'relative',
|
|
81
|
+
zIndex: 10,
|
|
82
|
+
minHeight: '100%',
|
|
83
|
+
boxShadow: '2px 0 6px rgba(0, 21, 41, 0.35)'
|
|
84
|
+
}), "".concat(token.antCls, "-layout-sider-children"), {
|
|
85
|
+
display: 'flex',
|
|
86
|
+
flexDirection: 'column',
|
|
87
|
+
height: '100%',
|
|
88
|
+
'::-webkit-scrollbar': {
|
|
89
|
+
width: '6px',
|
|
90
|
+
height: '6px'
|
|
91
|
+
},
|
|
92
|
+
'::webkit-scrollbar-track': {
|
|
93
|
+
background: 'rgba(255, 255, 255, 0.15)',
|
|
94
|
+
borderRadius: '3px',
|
|
95
|
+
boxShadow: 'inset 0 0 5px rgba(37, 37, 37, 0.05)'
|
|
96
|
+
},
|
|
97
|
+
/* 滚动条滑块 */
|
|
98
|
+
'::-webkit-scrollbar-thumb': {
|
|
99
|
+
background: 'rgba(255, 255, 255, 0.2)',
|
|
100
|
+
borderRadius: '3px',
|
|
101
|
+
boxShadow: 'inset 0 0 5px rgba(255, 255, 255, 0.05)'
|
|
102
|
+
}
|
|
103
|
+
}), "&".concat(token.antCls, "-layout-sider-collapsed"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(token.antCls, "-menu-inline-collapsed"), {
|
|
104
|
+
width: '48px'
|
|
105
|
+
}), "".concat(proLayoutSiderMenuCls), (0, _defineProperty2.default)({}, "".concat(proLayoutSiderMenuCls, "-logo"), {
|
|
106
|
+
padding: '16px 24px'
|
|
107
|
+
}))), "&".concat(token.antCls, "-layout-sider").concat(proLayoutSiderMenuCls, "-fixed"), (0, _defineProperty2.default)({
|
|
108
|
+
position: 'fixed',
|
|
109
|
+
top: 0,
|
|
110
|
+
left: 0,
|
|
111
|
+
zIndex: 99,
|
|
112
|
+
height: '100%',
|
|
113
|
+
overflow: 'auto',
|
|
114
|
+
overflowX: 'hidden',
|
|
115
|
+
boxShadow: '2px 0 8px 0 rgba(29, 35, 41, 0.05)'
|
|
116
|
+
}, "> ".concat(token.antCls, "-menu-root"), (0, _defineProperty2.default)({}, ":not".concat(proLayoutSiderMenuCls, "-link-menu"), {
|
|
117
|
+
height: "calc(100vh - ".concat(proLayoutHeaderHeight, ")"),
|
|
118
|
+
overflowY: 'auto'
|
|
119
|
+
}))), "".concat(proLayoutSiderMenuCls, "-light"), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
120
|
+
backgroundColor: token.colorBgContainer,
|
|
121
|
+
boxShadow: '2px 0 8px 0 rgba(29, 35, 41, 0.05)'
|
|
122
|
+
}, "".concat(token.antCls, "-layout-sider-children"), {
|
|
123
|
+
'::webkit-scrollbar-track': {
|
|
124
|
+
background: 'rgba(0, 0, 0, 0.06)',
|
|
125
|
+
borderRadius: '3px',
|
|
126
|
+
boxShadow: 'inset 0 0 5px rgba(0, 21, 41, 0.05)',
|
|
127
|
+
/* 滚动条滑块 */
|
|
128
|
+
'::-webkit-scrollbar-thumb': {
|
|
129
|
+
background: 'rgba(0, 0, 0, 0.12)',
|
|
130
|
+
borderRadius: '3px',
|
|
131
|
+
boxShadow: 'inset 0 0 5px rgba(0, 21, 41, 0.05)'
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}), "".concat(proLayoutSiderMenuCls, "-logo"), {
|
|
135
|
+
'h1': {
|
|
136
|
+
color: token.colorPrimary
|
|
137
|
+
}
|
|
138
|
+
}), "".concat(token.antCls, "-menu-light"), {
|
|
139
|
+
borderRightColor: 'transparent'
|
|
140
|
+
}), "".concat(proLayoutSiderMenuCls, "-collapsed-button"), {
|
|
141
|
+
borderTop: "".concat(token.lineWidth, " solid ").concat(token.colorSplit)
|
|
142
|
+
})), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_$concat8, "".concat(proLayoutSiderMenuCls, "-icon"), {
|
|
143
|
+
width: '14px',
|
|
144
|
+
verticalAlign: 'baseline'
|
|
145
|
+
}), "".concat(proLayoutSiderMenuCls, "-link"), (0, _defineProperty2.default)({
|
|
146
|
+
width: '100%'
|
|
147
|
+
}, "ul".concat(token.antCls, "-menu-root"), {
|
|
148
|
+
height: 'auto'
|
|
149
|
+
})), "".concat(proLayoutSiderMenuCls, "-collapsed-button"), {
|
|
150
|
+
borderTop: "".concat(token.lineWidth, " solid rgba(0, 0, 0, 0.25)"),
|
|
151
|
+
'.anticon': {
|
|
152
|
+
fontSize: '16px'
|
|
153
|
+
}
|
|
154
|
+
}), ".top-nav-menu li".concat(token.antCls, "-menu-item"), {
|
|
155
|
+
height: '100%',
|
|
156
|
+
lineHeight: 1
|
|
157
|
+
}), '.drawer .drawer-content', {
|
|
158
|
+
background: "#001529"
|
|
159
|
+
}))), "".concat(token.antCls, "-pro-menu-item"), (0, _defineProperty2.default)({}, ".anticon".concat(token.antCls, "-pro-menu-item-title"), {
|
|
160
|
+
marginLeft: '10px'
|
|
161
|
+
})), '.sider-app-menus', {
|
|
162
|
+
width: '100px',
|
|
163
|
+
backgroundColor: '#fff',
|
|
164
|
+
cursor: 'pointer',
|
|
165
|
+
padding: '6px',
|
|
166
|
+
transition: 'all .3s',
|
|
167
|
+
borderRadius: '4px',
|
|
168
|
+
color: '#333',
|
|
169
|
+
'&:hover': {
|
|
170
|
+
backgroundColor: '#efefef'
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
};
|