@zjlab-fe/data-hub-ui 0.26.4 → 0.27.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { MenuUnfoldOutlined, MenuFoldOutlined } from '@ant-design/icons';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import { useNavigate, useLocation } from 'react-router-dom';
|
|
5
5
|
import { "side-menu" as side_menu, "menu-content" as menu_content, "menu-content-contain" as menu_content_contain, "menu-content-title" as menu_content_title, "menu-content-subcontain" as menu_content_subcontain, icon, "trigger-icon" as trigger_icon, "menu-content-item" as menu_content_item, active, expanded, "link-type" as link_type } from './index.module.scss.js';
|
|
@@ -30,11 +30,16 @@ const MainLayoutSider = (props) => {
|
|
|
30
30
|
onSelect === null || onSelect === void 0 ? void 0 : onSelect(currentSelectedKey);
|
|
31
31
|
}, [currentSelectedKey, onSelect]);
|
|
32
32
|
const TriggerIcon = () => {
|
|
33
|
-
|
|
33
|
+
const itemStyle = {
|
|
34
|
+
height: internalCollapsed ? '34px' : '38px',
|
|
35
|
+
width: internalCollapsed ? '34px' : '150px',
|
|
36
|
+
};
|
|
37
|
+
const triggerIcon = (jsxs("div", { className: `${trigger_icon} ${menu_content_item}`, style: itemStyle, onClick: () => {
|
|
34
38
|
const newCollapsed = !internalCollapsed;
|
|
35
39
|
setInternalCollapsed(newCollapsed);
|
|
36
40
|
onCollapse === null || onCollapse === void 0 ? void 0 : onCollapse(newCollapsed);
|
|
37
|
-
}, children:
|
|
41
|
+
}, children: [internalCollapsed ? jsx(MenuUnfoldOutlined, {}) : jsx(MenuFoldOutlined, {}), !internalCollapsed && jsx("span", { style: { marginLeft: '8px' }, children: "\u6536\u8D77\u5BFC\u822A" })] }));
|
|
42
|
+
return internalCollapsed ? (jsx(Tooltip, { placement: "right", title: "\u5C55\u5F00\u5BFC\u822A", children: triggerIcon })) : (triggerIcon);
|
|
38
43
|
};
|
|
39
44
|
const onMenuClick = (item) => {
|
|
40
45
|
propsonClick === null || propsonClick === void 0 ? void 0 : propsonClick(item);
|
|
@@ -40,31 +40,41 @@ style.textContent = `@charset "UTF-8";
|
|
|
40
40
|
border-right: 1px solid #f1f3f7;
|
|
41
41
|
}
|
|
42
42
|
.index-module__trigger-icon___LwUuZ {
|
|
43
|
-
|
|
43
|
+
font-style: normal;
|
|
44
|
+
font-weight: 400;
|
|
44
45
|
font-size: 14px;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
line-height: 20px;
|
|
47
|
+
color: #222427;
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: row;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: flex-start;
|
|
53
|
+
padding: 8px;
|
|
52
54
|
cursor: pointer;
|
|
53
55
|
position: absolute;
|
|
54
56
|
z-index: 999;
|
|
55
|
-
display: flex;
|
|
56
|
-
align-items: center;
|
|
57
|
-
justify-content: center;
|
|
58
57
|
background: #ffffff;
|
|
59
|
-
|
|
60
|
-
border-
|
|
58
|
+
border-top: 1px solid #f5f5f5;
|
|
59
|
+
border-right: none;
|
|
60
|
+
border-left: none;
|
|
61
|
+
border-bottom: none;
|
|
62
|
+
bottom: 14px;
|
|
63
|
+
left: 8px;
|
|
61
64
|
}
|
|
62
65
|
.index-module__trigger-icon___LwUuZ:hover {
|
|
63
66
|
color: #1775fe;
|
|
67
|
+
background: #e8f1ff;
|
|
68
|
+
border: 1px solid #dbeaff;
|
|
69
|
+
font-family: "AlibabaPuHuiTi-3-65-Medium";
|
|
70
|
+
border-radius: 8px;
|
|
64
71
|
}
|
|
65
72
|
.index-module__menu-content___ZdUR3 {
|
|
66
73
|
overflow-y: scroll;
|
|
67
|
-
height: 100vh;
|
|
74
|
+
height: calc(100vh - 60px);
|
|
75
|
+
padding-bottom: 60px !important;
|
|
76
|
+
scrollbar-width: none;
|
|
77
|
+
-ms-overflow-style: none;
|
|
68
78
|
}
|
|
69
79
|
.index-module__menu-content___ZdUR3::-webkit-scrollbar {
|
|
70
80
|
display: none;
|
|
@@ -121,7 +131,6 @@ style.textContent = `@charset "UTF-8";
|
|
|
121
131
|
order: 1;
|
|
122
132
|
align-self: stretch;
|
|
123
133
|
flex-grow: 0;
|
|
124
|
-
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
125
134
|
}
|
|
126
135
|
.index-module__menu-content___ZdUR3 .index-module__menu-content-item___sRn7B .anticon {
|
|
127
136
|
font-size: 16px !important;
|