@@ -5,6 +5,7 @@ Layout 布局
55[ ![ Build & Deploy] ( https://github.com/uiwjs/react-layout/actions/workflows/ci.yml/badge.svg )] ( https://github.com/uiwjs/react-layout/actions/workflows/ci.yml )
66[ ![ Open in unpkg] ( https://img.shields.io/badge/Open%20in-unpkg-blue )] ( https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-layout/file/README.md )
77[ ![ npm version] ( https://img.shields.io/npm/v/@uiw/react-layout.svg )] ( https://www.npmjs.com/package/@uiw/react-layout )
8+ [ ![ Coverage Status] ( https://uiwjs.github.io/react-layout/badges.svg )] ( https://uiwjs.github.io/react-layout/coverage/lcov-report/ )
89
910协助进行页面级整体布局。
1011
@@ -29,8 +30,8 @@ import Layout from '@uiw/react-layout';
2930const { Header , Footer , Sider , Content } = Layout;
3031
3132const stylHeader = { color: ' #fff' }
32- const stylSider = { background: ' #484a4e' , color: ' #fff' , lineHeight : ` 120px ` , textAlign : ' center' }
33- const stylConten = { textAlign : ' center ' , background : ' rgba(16, 142, 233, 1) ' , minHeight : 120 , lineHeight : ' 120px ' , color: ' #fff' }
33+ const stylSider = { background: ' #484a4e' , color: ' #fff' , display : ' flex ' , justifyContent : ' center ' , alignItems : ' center' }
34+ const stylConten = { background : ' #108ee9 ' , minHeight : 120 , display : ' flex ' , justifyContent : ' center ' , alignItems : ' center ' , color: ' #fff' }
3435
3536function Demo () {
3637 const [collapsed , setCollapsed ] = React .useState (false )
@@ -70,7 +71,7 @@ import Layout from '@uiw/react-layout';
7071const { Header , Footer , Sider , Content } = Layout;
7172
7273const stylHeader = { color: ' #fff' }
73- const stylConten = { textAlign : ' center ' , background : ' rgba(16, 142, 233, 1) ' , minHeight : 120 , lineHeight : ' 120px ' , color: ' #fff' }
74+ const stylConten = { background : ' #108ee9 ' , minHeight : 120 , display : ' flex ' , justifyContent : ' center ' , alignItems : ' center ' , color: ' #fff' }
7475
7576function Demo () {
7677 const [collapsed , setCollapsed ] = React .useState (false )
@@ -96,8 +97,8 @@ import Layout from '@uiw/react-layout';
9697const { Header , Footer , Sider , Content } = Layout;
9798
9899const stylHeader = { color: ' #fff' }
99- const stylSider = { background: ' #484a4e' , color: ' #fff' , lineHeight : ` 120px ` , textAlign : ' center' }
100- const stylConten = { textAlign : ' center ' , background : ' rgba(16, 142, 233, 1) ' , minHeight : 120 , lineHeight : ' 120px ' , color: ' #fff' }
100+ const stylSider = { background: ' #484a4e' , color: ' #fff' , display : ' flex ' , justifyContent : ' center ' , alignItems : ' center' }
101+ const stylConten = { background : ' #108ee9 ' , minHeight : 120 , display : ' flex ' , justifyContent : ' center ' , alignItems : ' center ' , color: ' #fff' }
101102
102103function Demo () {
103104 const [collapsed , setCollapsed ] = React .useState (false )
@@ -118,8 +119,6 @@ function Demo() {
118119ReactDOM .render (< Demo / > , _mount_);
119120```
120121
121-
122-
123122## Layout
124123
125124布局容器,其下可嵌套 ` Header ` ` Sider ` ` Content ` ` Footer ` 或 ` Layout ` 本身,可以放在任何父容器中。
0 commit comments