mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-10 16:13:42 +08:00
适配移动端
This commit is contained in:
@@ -95,7 +95,7 @@ let headerButtons = [
|
|||||||
// }
|
// }
|
||||||
];
|
];
|
||||||
|
|
||||||
const HeaderBar = () => {
|
const SiderBar = () => {
|
||||||
const [userState, userDispatch] = useContext(UserContext);
|
const [userState, userDispatch] = useContext(UserContext);
|
||||||
let navigate = useNavigate();
|
let navigate = useNavigate();
|
||||||
const [selectedKeys, setSelectedKeys] = useState(['home']);
|
const [selectedKeys, setSelectedKeys] = useState(['home']);
|
||||||
@@ -119,6 +119,7 @@ const HeaderBar = () => {
|
|||||||
<Nav
|
<Nav
|
||||||
// mode={'horizontal'}
|
// mode={'horizontal'}
|
||||||
// bodyStyle={{ height: 100 }}
|
// bodyStyle={{ height: 100 }}
|
||||||
|
defaultIsCollapsed={isMobile()}
|
||||||
selectedKeys={selectedKeys}
|
selectedKeys={selectedKeys}
|
||||||
renderWrapper={({itemElement, isSubNav, isInSubNav, props}) => {
|
renderWrapper={({itemElement, isSubNav, isInSubNav, props}) => {
|
||||||
const routerMap = {
|
const routerMap = {
|
||||||
@@ -166,4 +167,4 @@ const HeaderBar = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default HeaderBar;
|
export default SiderBar;
|
||||||
|
|||||||
@@ -15,6 +15,20 @@ body {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 767px) {
|
||||||
|
.semi-table-tbody, .semi-table-row, .semi-table-row-cell {
|
||||||
|
display: block!important;
|
||||||
|
width: auto!important;
|
||||||
|
padding: 2px!important;
|
||||||
|
}
|
||||||
|
.semi-table-row-cell {
|
||||||
|
border-bottom: 0!important;
|
||||||
|
}
|
||||||
|
.semi-table-tbody>.semi-table-row {
|
||||||
|
border-bottom: 1px solid rgba(0,0,0,.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.semi-layout {
|
.semi-layout {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user