Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

侧边布局当内容过长时Sider与子Layout变为垂直排列 #4459

Closed
aarryy opened this issue Jan 3, 2017 · 2 comments · Fixed by #4506
Closed

侧边布局当内容过长时Sider与子Layout变为垂直排列 #4459

aarryy opened this issue Jan 3, 2017 · 2 comments · Fixed by #4506
Assignees
Labels
🐛 Bug Ant Design Team had proved that this is a bug.

Comments

@aarryy
Copy link

aarryy commented Jan 3, 2017

Environment(required)

  • antd version: 2.6.0
  • OS and its version: MacOS 10.12.2
  • Browser and its version: Google Chrome 55.0.2883.95, Safari 10.0.2

What did you do? Please provide steps to re-produce your problem.

使用布局中的侧边布局,在Content部件中放入一段长一点的文字

What do you expected?

Sider与子Layout水平排列

What happen?

Sider与子Layout垂直排列, 原来子Layout所占据位置空白

Re-producible online demo

http://codepen.io/aarryy/pen/WRNzQg

@benjycui benjycui added the 🐛 Bug Ant Design Team had proved that this is a bug. label Jan 4, 2017
@zhenzong
Copy link
Contributor

zhenzong commented Jan 4, 2017

我也遇到这个问题了。
临时解决方式,覆盖antd的样式:

.ant-layout {
    flex-wrap: nowrap;
}

.ant-layout-header,
.ant-layout-footer {
    flex: 0 1 auto;
}

然后侧边布局里的.ant-layout改为垂直方向排列:

#main-container.ant-layout {
    flex-direction: column;
}

ps:
如果Sider中有多个层级的SubMenu的话,折叠起来的样式不是很好看。只能通过监听折叠的事件,然后当折叠的时候把SubMenu处理为MenuItem,当不是折叠的时候再用SubMenu。

ddcat1115 added a commit to ddcat1115/ant-design that referenced this issue Jan 7, 2017
afc163 pushed a commit that referenced this issue Jan 8, 2017
@lock
Copy link

lock bot commented May 2, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 Bug Ant Design Team had proved that this is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants