fix Layout demo, update documentation.

This commit is contained in:
乐仪 2017-02-24 16:34:10 +08:00
parent 6df92ce16f
commit 70ec413537
3 changed files with 12 additions and 12 deletions

View File

@ -45,11 +45,11 @@ ReactDOM.render(
<Layout>
<Sider>Sider</Sider>
<Content>
<Layout>
<Header>Header</Header>
<Content>Content</Content>
<Footer>Footer</Footer>
</Content>
</Layout>
</Layout>
</div>
, mountNode);

View File

@ -9,11 +9,11 @@ When you are handling the overall layout of a page, this component might be help
## Overview
- `Layout`: The layout wrapper, in which `Header` `Sider` `Content` `Footer` or `Layout` itself can be nested.
- `Header`: The top layout with default style.
- `Sider`: The sidebar with default style and basic functions.
- `Content`: The content layout with default style.
- `Footer`: The bottom layout with default style.
- `Layout`: The layout wrapper, in which `Header` `Sider` `Content` `Footer` or `Layout` itself can be nested, and can be placed in any parent container.
- `Header`: The top layout with default style, in which any element can be nested, and must be placed in `Layout`.
- `Sider`: The sidebar with default style and basic functions, in which any element can be nested, and must be placed in `Layout`.
- `Content`: The content layout with default style, in which any element can be nested, and must be placed in `Layout`.
- `Footer`: The bottom layout with default style, in which any element can be nested, and must be placed in `Layout`.
> Base on `flex layout`, please pay attention to the [compatibility](http://caniuse.com/#search=flex).

View File

@ -10,11 +10,11 @@ title: Layout
## 概述
- `Layout`:布局容器,其下可嵌套 `Header` `Sider` `Content` `Footer``Layout` 本身。
- `Header`:顶部布局,自带默认样式。
- `Sider`:侧边栏,自带默认样式及基本功能。
- `Content`:内容部分,自带默认样式。
- `Footer`:底部布局,自带默认样式。
- `Layout`:布局容器,其下可嵌套 `Header` `Sider` `Content` `Footer``Layout` 本身,可以放在任何父容器中
- `Header`:顶部布局,自带默认样式,其下可嵌套任何元素,只能放在 `Layout`
- `Sider`:侧边栏,自带默认样式及基本功能,其下可嵌套任何元素,只能放在 `Layout`
- `Content`:内容部分,自带默认样式,其下可嵌套任何元素,只能放在 `Layout`
- `Footer`:底部布局,自带默认样式,其下可嵌套任何元素,只能放在 `Layout`
> 注意:采用 flex 布局实现,请注意[浏览器兼容性](http://caniuse.com/#search=flex)问题。