@jetlinks-web/components 3.0.0-rc → 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 +13 -9
- package/es/BadgeStatus/Badge.js +1 -2
- package/es/BadgeStatus/color.js +3 -3
- package/es/CardSelect/CardSelect.js +23 -13
- 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/DragModal/DragModal.js +14 -8
- package/es/DragModal/style/index.js +64 -1
- package/es/EditTable/Body.js +10 -3
- package/es/EditTable/EditTable.js +13 -7
- package/es/EditTable/FormItem.js +18 -19
- package/es/EditTable/Header.js +16 -6
- package/es/EditTable/components/ContextMenu/Menu.js +11 -5
- package/es/EditTable/components/Search/search.js +1 -2
- package/es/EditTable/components/Search/sort.js +1 -3
- package/es/EditTable/group.js +23 -18
- 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 +30 -3
- package/es/Ellipsis/Ellipsis.js +10 -2
- package/es/Ellipsis/style/index.js +24 -1
- package/es/FullPage/FullPage.js +1 -2
- package/es/LocaleProvider/index.js +1 -2
- package/es/PermissionButton/index.js +3 -4
- package/es/ProLayout/Basic/BasicLayout.js +45 -41
- package/es/ProLayout/Basic/BasicLayoutStyle.js +39 -0
- package/es/ProLayout/Basic/Header.js +3 -7
- package/es/ProLayout/Basic/HeaderStyle.js +10 -0
- package/es/ProLayout/PageContainer/index.js +21 -17
- package/es/ProLayout/PageContainer/style.js +46 -0
- package/es/ProLayout/SiderMenu/BaseMenu.js +13 -37
- package/es/ProLayout/SiderMenu/SiderMenu.js +24 -36
- package/es/ProLayout/SiderMenu/style.js +166 -0
- package/es/ProLayout/TopHeader/index.js +13 -12
- 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 +12 -4
- package/es/ProTable/Content.js +108 -28
- package/es/ProTable/Header.js +21 -11
- package/es/ProTable/Pagination.js +12 -4
- package/es/ProTable/ProTable.js +42 -26
- package/es/ProTable/hooks/index.js +2 -0
- package/es/ProTable/hooks/useTableInject.js +5 -0
- package/es/ProTable/hooks/useTableSelection.js +95 -0
- 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 +23 -16
- package/es/Search/Advanced/SaveHistory.js +1 -2
- package/es/Search/Advanced/index.js +213 -292
- 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 +44 -39
- package/es/components.js +1 -4
- package/es/locale/en-US.js +3 -7
- package/es/locale/zh-CN.js +3 -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 +13 -9
- package/lib/BadgeStatus/Badge.js +1 -2
- package/lib/BadgeStatus/color.js +3 -3
- package/lib/CardSelect/CardSelect.js +23 -13
- 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/DragModal/DragModal.js +14 -8
- 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 +18 -19
- package/lib/EditTable/Header.js +16 -6
- package/lib/EditTable/components/ContextMenu/Menu.js +11 -5
- package/lib/EditTable/components/Search/search.js +1 -2
- package/lib/EditTable/components/Search/sort.js +1 -3
- package/lib/EditTable/group.js +23 -18
- 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 +31 -3
- package/lib/Ellipsis/Ellipsis.js +10 -2
- package/lib/Ellipsis/style/index.js +29 -1
- package/lib/FullPage/FullPage.js +1 -2
- package/lib/LocaleProvider/index.js +1 -2
- package/lib/PermissionButton/index.js +3 -4
- package/lib/ProLayout/Basic/BasicLayout.js +44 -40
- package/lib/ProLayout/Basic/BasicLayoutStyle.js +46 -0
- package/lib/ProLayout/Basic/Header.js +2 -6
- package/lib/ProLayout/Basic/HeaderStyle.js +17 -0
- package/lib/ProLayout/PageContainer/index.js +19 -15
- package/lib/ProLayout/PageContainer/style.js +53 -0
- package/lib/ProLayout/SiderMenu/BaseMenu.js +14 -37
- package/lib/ProLayout/SiderMenu/SiderMenu.js +23 -35
- package/lib/ProLayout/SiderMenu/style.js +173 -0
- package/lib/ProLayout/TopHeader/index.js +14 -12
- package/lib/ProLayout/TopHeader/style.js +133 -0
- package/lib/ProLayout/style/index.js +12 -1
- package/lib/ProLayout/util.js +5 -5
- package/lib/ProTable/Alert.js +12 -4
- package/lib/ProTable/Content.js +108 -28
- package/lib/ProTable/Header.js +21 -11
- package/lib/ProTable/Pagination.js +12 -4
- package/lib/ProTable/ProTable.js +42 -26
- package/lib/ProTable/hooks/index.js +27 -0
- package/lib/ProTable/hooks/useTableInject.js +11 -0
- package/lib/ProTable/hooks/useTableSelection.js +102 -0
- package/lib/ProTable/setting.js +1 -1
- 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 +23 -16
- package/lib/Search/Advanced/SaveHistory.js +1 -2
- package/lib/Search/Advanced/index.js +213 -292
- 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 +44 -39
- package/lib/components.js +0 -21
- package/lib/locale/en-US.js +3 -7
- package/lib/locale/zh-CN.js +3 -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 +10 -13
- 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/FlameGraph/FlameGraph.js +0 -136
- package/es/FlameGraph/index.js +0 -5
- package/es/FlameGraph/style/index.css +0 -43
- package/es/FlameGraph/style/index.js +0 -1
- package/es/FlameGraph/style/index.less +0 -52
- 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 -139
- 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 -5234
- 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/FlameGraph/FlameGraph.js +0 -136
- package/lib/FlameGraph/index.js +0 -12
- package/lib/FlameGraph/style/index.css +0 -43
- package/lib/FlameGraph/style/index.js +0 -3
- package/lib/FlameGraph/style/index.less +0 -52
- 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 -139
- 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 -5234
- package/lib/style/index.less +0 -13
- package/lib/style/variable.css +0 -4
- package/lib/style/variable.less +0 -4
|
@@ -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,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,10 +17,6 @@ var _Icon = _interopRequireDefault(require("../../Icon"));
|
|
|
17
17
|
var _utils = require("@jetlinks-web/utils");
|
|
18
18
|
var _antDesignVue = require("ant-design-vue");
|
|
19
19
|
var _iconsVue = require("@ant-design/icons-vue/lib/icons");
|
|
20
|
-
require("ant-design-vue/es/_util/vue-types");
|
|
21
|
-
function _isSlot(s) {
|
|
22
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
|
|
23
|
-
}
|
|
24
20
|
var baseMenuProps = exports.baseMenuProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _defaultSettings.defaultSettingProps), {}, {
|
|
25
21
|
prefixCls: {
|
|
26
22
|
type: String,
|
|
@@ -124,8 +120,7 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
124
120
|
});
|
|
125
121
|
(0, _defineProperty2.default)(this, "getSubMenuOrItem", function (item) {
|
|
126
122
|
var _item$meta, _item$meta2, _item$meta7, _item$meta8;
|
|
127
|
-
if (Array.isArray(item.children) && item.children.length > 0 && !(item
|
|
128
|
-
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)) {
|
|
129
124
|
var _item$meta3, _item$meta4, _item$meta5, _item$meta6;
|
|
130
125
|
if (_this.props.subMenuItemRender) {
|
|
131
126
|
var subMenuItemRender = (0, _vue.withCtx)(_this.props.subMenuItemRender, _this.ctx);
|
|
@@ -138,21 +133,13 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
138
133
|
prefixCls = _this$props.prefixCls,
|
|
139
134
|
locale = _this$props.locale;
|
|
140
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);
|
|
141
|
-
var defaultTitle = (
|
|
136
|
+
var defaultTitle = (_item$meta5 = item.meta) !== null && _item$meta5 !== void 0 && _item$meta5.icon ? (0, _vue.createVNode)("span", {
|
|
142
137
|
"class": "".concat(prefixCls, "-menu-item")
|
|
143
138
|
}, [(0, _vue.createVNode)("span", {
|
|
144
139
|
"class": "".concat(prefixCls, "-menu-item-title")
|
|
145
|
-
},
|
|
146
|
-
default: function _default() {
|
|
147
|
-
return [menuTitle];
|
|
148
|
-
}
|
|
149
|
-
})]) : (0, _vue.createVNode)("span", {
|
|
140
|
+
}, [menuTitle])]) : (0, _vue.createVNode)("span", {
|
|
150
141
|
"class": "".concat(prefixCls, "-menu-item")
|
|
151
|
-
},
|
|
152
|
-
default: function _default() {
|
|
153
|
-
return [menuTitle];
|
|
154
|
-
}
|
|
155
|
-
});
|
|
142
|
+
}, [menuTitle]);
|
|
156
143
|
return (0, _vue.createVNode)(_antDesignVue.Menu.SubMenu, {
|
|
157
144
|
"title": defaultTitle,
|
|
158
145
|
"key": item.path,
|
|
@@ -161,9 +148,9 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
161
148
|
"iconUrl": _this.props.iconfontUrl,
|
|
162
149
|
"icon": (_item$meta6 = item.meta) === null || _item$meta6 === void 0 ? void 0 : _item$meta6.icon
|
|
163
150
|
}, null)
|
|
164
|
-
},
|
|
151
|
+
}, {
|
|
165
152
|
default: function _default() {
|
|
166
|
-
return [
|
|
153
|
+
return [_this.getNavMenuItems(item.children)];
|
|
167
154
|
}
|
|
168
155
|
});
|
|
169
156
|
}
|
|
@@ -180,14 +167,13 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
180
167
|
"disabled": (_item$meta7 = item.meta) === null || _item$meta7 === void 0 ? void 0 : _item$meta7.disabled,
|
|
181
168
|
"danger": (_item$meta8 = item.meta) === null || _item$meta8 === void 0 ? void 0 : _item$meta8.danger,
|
|
182
169
|
"key": item.path
|
|
183
|
-
},
|
|
170
|
+
}, {
|
|
184
171
|
default: function _default() {
|
|
185
172
|
return [title];
|
|
186
173
|
}
|
|
187
174
|
});
|
|
188
175
|
});
|
|
189
176
|
(0, _defineProperty2.default)(this, "getMenuItem", function (item) {
|
|
190
|
-
var _slot2;
|
|
191
177
|
var _item$meta9, _item$meta10, _item$meta11, _item$meta12, _item$meta13;
|
|
192
178
|
var meta = (0, _objectSpread2.default)({}, item.meta);
|
|
193
179
|
var target = meta.target || null;
|
|
@@ -210,27 +196,19 @@ var MenuUtil = /*#__PURE__*/(0, _createClass2.default)(function MenuUtil(_props,
|
|
|
210
196
|
"icon": (_item$meta10 = item.meta) === null || _item$meta10 === void 0 ? void 0 : _item$meta10.icon
|
|
211
197
|
}, null) || undefined;
|
|
212
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);
|
|
213
|
-
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), {}, {
|
|
214
200
|
"class": "".concat(prefixCls, "-menu-item")
|
|
215
201
|
}), {
|
|
216
202
|
default: function _default() {
|
|
217
203
|
return [icon, (0, _vue.createVNode)("span", {
|
|
218
204
|
"class": "".concat(prefixCls, "-menu-item-title")
|
|
219
|
-
},
|
|
220
|
-
default: function _default() {
|
|
221
|
-
return [menuTitle];
|
|
222
|
-
}
|
|
223
|
-
})];
|
|
205
|
+
}, [menuTitle])];
|
|
224
206
|
}
|
|
225
207
|
}) : (0, _vue.createVNode)(CustomTag, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, attrs), props), {}, {
|
|
226
208
|
"class": "".concat(prefixCls, "-menu-item")
|
|
227
|
-
}),
|
|
228
|
-
default: function _default() {
|
|
229
|
-
return [menuTitle];
|
|
230
|
-
}
|
|
231
|
-
})) ? _slot2 : {
|
|
209
|
+
}), {
|
|
232
210
|
default: function _default() {
|
|
233
|
-
return [
|
|
211
|
+
return [(0, _vue.createVNode)("span", null, [menuTitle])];
|
|
234
212
|
}
|
|
235
213
|
});
|
|
236
214
|
return [defaultTitle, icon];
|
|
@@ -268,7 +246,6 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
268
246
|
emit('click', args);
|
|
269
247
|
};
|
|
270
248
|
return function () {
|
|
271
|
-
var _slot3;
|
|
272
249
|
return (0, _vue.createVNode)(_antDesignVue.Menu, (0, _objectSpread2.default)({
|
|
273
250
|
"key": "Menu",
|
|
274
251
|
"inlineIndent": 16,
|
|
@@ -279,9 +256,9 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
|
|
|
279
256
|
"onOpenChange": handleOpenChange,
|
|
280
257
|
"onSelect": handleSelect,
|
|
281
258
|
"onClick": handleClick
|
|
282
|
-
}, props.menuProps),
|
|
259
|
+
}, props.menuProps), {
|
|
283
260
|
default: function _default() {
|
|
284
|
-
return [
|
|
261
|
+
return [menuUtil.getNavMenuItems(props.menuData)];
|
|
285
262
|
}
|
|
286
263
|
});
|
|
287
264
|
};
|
|
@@ -8,6 +8,7 @@ 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
14
|
var _antDesignVue = require("ant-design-vue");
|
|
@@ -17,11 +18,9 @@ var _vueTypes = _interopRequireDefault(require("ant-design-vue/es/_util/vue-type
|
|
|
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],
|
|
@@ -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);
|
|
@@ -251,7 +248,6 @@ var SiderMenu = function SiderMenu(props) {
|
|
|
251
248
|
},
|
|
252
249
|
'onUpdate:selectedKeys': handleSelect
|
|
253
250
|
}, null);
|
|
254
|
-
console.log('context', context.fixSiderbar);
|
|
255
251
|
return (0, _vue.createVNode)(_vue.Fragment, null, [context.fixSiderbar && (0, _vue.createVNode)("div", {
|
|
256
252
|
"style": {
|
|
257
253
|
width: "".concat(sSideWidth.value, "px"),
|
|
@@ -286,17 +282,9 @@ var SiderMenu = function SiderMenu(props) {
|
|
|
286
282
|
"onClick": props.layout !== 'mix' ? props.onMenuHeaderClick : undefined,
|
|
287
283
|
"id": "logo",
|
|
288
284
|
"style": props === null || props === void 0 ? void 0 : props.logoStyle
|
|
289
|
-
},
|
|
290
|
-
default: function _default() {
|
|
291
|
-
return [headerDom];
|
|
292
|
-
}
|
|
293
|
-
}), extraDom && (0, _vue.createVNode)("div", {
|
|
285
|
+
}, [headerDom]), extraDom && (0, _vue.createVNode)("div", {
|
|
294
286
|
"class": (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(baseClassName, "-extra"), true), "".concat(baseClassName, "-extra-no-logo"), !headerDom)
|
|
295
|
-
},
|
|
296
|
-
default: function _default() {
|
|
297
|
-
return [extraDom];
|
|
298
|
-
}
|
|
299
|
-
}), (0, _vue.createVNode)("div", {
|
|
287
|
+
}, [extraDom]), (0, _vue.createVNode)("div", {
|
|
300
288
|
"class": "".concat(baseClassName, "-body"),
|
|
301
289
|
"style": "flex: 1; overflow: hidden auto;"
|
|
302
290
|
}, [props.layoutType !== _defaultSettings.LayoutType.CARD ? menuContentRender && menuContentRender(props, defaultMenuDom) || defaultMenuDom : null]), (0, _vue.createVNode)("div", {
|
|
@@ -313,17 +301,17 @@ var SiderMenu = function SiderMenu(props) {
|
|
|
313
301
|
props.onCollapse(!props.collapsed);
|
|
314
302
|
}
|
|
315
303
|
}
|
|
316
|
-
}, _isSlot(_slot = (0, _vue.createVNode)(_antDesignVue.Menu.Item, {
|
|
317
|
-
"key": 'collapsed-button',
|
|
318
|
-
"class": "".concat(baseClassName, "-collapsed-button"),
|
|
319
|
-
"title": false
|
|
320
304
|
}, {
|
|
321
305
|
default: function _default() {
|
|
322
|
-
return [
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
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
|
+
})];
|
|
327
315
|
}
|
|
328
316
|
}) : null])];
|
|
329
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
|
+
};
|
|
@@ -5,21 +5,20 @@ 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 _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _vue = require("vue");
|
|
10
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
12
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
|
-
var _vcResizeObserver = _interopRequireDefault(require("ant-design-vue/
|
|
13
|
+
var _vcResizeObserver = _interopRequireDefault(require("ant-design-vue/lib/vc-resize-observer"));
|
|
13
14
|
var _SiderMenu = require("../SiderMenu/SiderMenu");
|
|
14
|
-
var _vueTypes = _interopRequireDefault(require("ant-design-vue/
|
|
15
|
+
var _vueTypes = _interopRequireDefault(require("ant-design-vue/lib/_util/vue-types"));
|
|
15
16
|
var _defaultSettings = require("../defaultSettings");
|
|
16
17
|
var _RouteContext = require("../RouteContext");
|
|
17
18
|
var _BaseMenu = _interopRequireDefault(require("../SiderMenu/BaseMenu"));
|
|
18
19
|
var _util = require("../util");
|
|
20
|
+
var _style = _interopRequireDefault(require("../style"));
|
|
19
21
|
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
22
|
var baseHeaderProps = exports.baseHeaderProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _defaultSettings.defaultSettingProps), {}, {
|
|
24
23
|
prefixCls: _vueTypes.default.string.def('ant-pro'),
|
|
25
24
|
collapsed: _vueTypes.default.looseBool,
|
|
@@ -104,6 +103,13 @@ var TopNavHeader = exports.TopNavHeader = function TopNavHeader(props) {
|
|
|
104
103
|
mode = props.mode;
|
|
105
104
|
var context = (0, _RouteContext.useRouteContext)();
|
|
106
105
|
var prefixCls = "".concat(propPrefixCls || _RouteContext.defaultPrefixCls, "-top-nav-header");
|
|
106
|
+
var stylePrefixCls = (0, _vue.computed)(function () {
|
|
107
|
+
return 'pro-layout';
|
|
108
|
+
});
|
|
109
|
+
var _useProLayoutStyle = (0, _style.default)(stylePrefixCls),
|
|
110
|
+
_useProLayoutStyle2 = (0, _slicedToArray2.default)(_useProLayoutStyle, 2),
|
|
111
|
+
wrapSSR = _useProLayoutStyle2[0],
|
|
112
|
+
hashId = _useProLayoutStyle2[1];
|
|
107
113
|
var headerDom = (0, _SiderMenu.defaultRenderLogoAndTitle)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
108
114
|
collapsed: false
|
|
109
115
|
}),
|
|
@@ -126,7 +132,7 @@ var TopNavHeader = exports.TopNavHeader = function TopNavHeader(props) {
|
|
|
126
132
|
return props.layout === 'mix' && props.splitMenus ? 'horizontal' : mode;
|
|
127
133
|
});
|
|
128
134
|
var className = (0, _vue.computed)(function () {
|
|
129
|
-
return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, prefixCls, true), "light", props.theme === 'light'), "dark", props.theme === 'dark');
|
|
135
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, prefixCls, true), hashId.value, true), "light", props.theme === 'light'), "dark", props.theme === 'dark');
|
|
130
136
|
});
|
|
131
137
|
var paddingLeft = (0, _vue.computed)(function () {
|
|
132
138
|
return context.layoutType === _defaultSettings.LayoutType.PAD && props.collapsed ? context.headerLeftWidth + 'px' : 0;
|
|
@@ -146,11 +152,7 @@ var TopNavHeader = exports.TopNavHeader = function TopNavHeader(props) {
|
|
|
146
152
|
"class": "".concat(prefixCls, "-logo"),
|
|
147
153
|
"key": "logo",
|
|
148
154
|
"id": "logo"
|
|
149
|
-
},
|
|
150
|
-
default: function _default() {
|
|
151
|
-
return [headerDom];
|
|
152
|
-
}
|
|
153
|
-
})]), (0, _vue.createVNode)("div", {
|
|
155
|
+
}, [headerDom])]), (0, _vue.createVNode)("div", {
|
|
154
156
|
"style": {
|
|
155
157
|
flex: 1
|
|
156
158
|
},
|