Skip to content

Commit

Permalink
fix: antdp-base 菜单为topleft时,组件页和列表页跳转异常
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenlingasMx committed Jun 10, 2023
1 parent b1f9a2f commit 720edd5
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 41 deletions.
2 changes: 2 additions & 0 deletions examples/antdp-base/config/router.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"side": true,
"routes": [
{
"index": true,
"path": "/components/proform",
"name": "高级表单",
"locale": "proform",
Expand Down Expand Up @@ -65,6 +66,7 @@
"side": true,
"routes": [
{
"index": true,
"path": "/list/tablelist",
"name": "高级表格",
"locale": "tablelist",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ const App = () => {
border: '1px solid #D9D9D9',
padding: '1px 2px',
fontSize: 12,
background: '#FAFAFA',
}}
>
{a}
Expand Down
24 changes: 11 additions & 13 deletions examples/antdp-base/src/pages/Person/PersonalCenter/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,16 @@ export default function User() {
url: serviceProject,
});
return (
<div>
<Card bordered={false}>
<PageHeaderContent
currentUser={{
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png',
name: 'xxx',
userid: '00000001',
email: '[email protected]',
signature: '海纳百川,有容乃大',
}}
/>
</Card>
</div>
<Card bordered={false}>
<PageHeaderContent
currentUser={{
avatar: 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png',
name: 'xxx',
userid: '00000001',
email: '[email protected]',
signature: '海纳百川,有容乃大',
}}
/>
</Card>
);
}
29 changes: 9 additions & 20 deletions examples/antdp-base/src/pages/Person/PersonalCenter/index.jsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,23 @@
import { Layout, Space } from 'antd';
import { ProCard } from '@ant-design/pro-components';
import Contents from './Contents';
import User from './User';
const { Sider } = Layout;

const contentStyle = {
textAlign: 'center',
backgroundColor: '#fff',
};
const siderStyle = {
textAlign: 'center',
color: '#fff',
backgroundColor: '#fff',
};

const App = () => (
<Space
direction="vertical"
style={{
width: '100%',
}}
size={[0, 48]}
>
<Layout>
<Sider width={400} style={siderStyle}>
<User />
</Sider>
<Layout style={contentStyle}>
<Contents />
</Layout>
</Layout>
</Space>
<ProCard>
<ProCard width={400} style={siderStyle}>
<User />
</ProCard>
<ProCard style={contentStyle}>
<Contents />
</ProCard>
</ProCard>
);
export default App;
12 changes: 5 additions & 7 deletions examples/antdp-base/src/pages/Person/PersonalCenter/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
}

.describe {
margin: 20px;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: flex-start;
margin: 20px;

.title {
font-weight: bold;
margin-bottom: 10px;
font-weight: bold;
}

.labels {
Expand All @@ -61,10 +61,9 @@

.labelsItem {
margin: 6px;
border: 1px solid #d9d9d9;
padding: 1px 2px;
font-size: 12px;
background: #fafafa;
border: 1px solid #d9d9d9;
}

.teamsItem {
Expand All @@ -75,6 +74,8 @@
}

.extraContent {
float: right;
white-space: nowrap;
zoom: 1;

&::before,
Expand All @@ -90,9 +91,6 @@
visibility: hidden;
}

float: right;
white-space: nowrap;

.statItem {
position: relative;
display: inline-block;
Expand Down

0 comments on commit 720edd5

Please sign in to comment.