Skip to content

Commit d8b710f

Browse files
committed
doc: Update README.md
1 parent 9c03a0d commit d8b710f

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

core/README-zh.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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';
2930
const { Header, Footer, Sider, Content } = Layout;
3031

3132
const 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

3536
function Demo() {
3637
const [collapsed, setCollapsed] = React.useState(false)
@@ -70,7 +71,7 @@ import Layout from '@uiw/react-layout';
7071
const { Header, Footer, Sider, Content } = Layout;
7172

7273
const 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

7576
function Demo() {
7677
const [collapsed, setCollapsed] = React.useState(false)
@@ -96,8 +97,8 @@ import Layout from '@uiw/react-layout';
9697
const { Header, Footer, Sider, Content } = Layout;
9798

9899
const 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

102103
function Demo() {
103104
const [collapsed, setCollapsed] = React.useState(false)
@@ -118,8 +119,6 @@ function Demo() {
118119
ReactDOM.render(<Demo />, _mount_);
119120
```
120121

121-
122-
123122
## Layout
124123

125124
布局容器,其下可嵌套 `Header` `Sider` `Content` `Footer``Layout` 本身,可以放在任何父容器中。

core/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ import Layout from '@uiw/react-layout';
3030
const { Header, Footer, Sider, Content } = Layout;
3131

3232
const stylHeader = { color: '#fff' }
33-
const stylSider = { background: '#484a4e', color: '#fff', lineHeight: `120px`, textAlign: 'center' }
34-
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' }
3535

3636
function Demo() {
3737
const [collapsed, setCollapsed] = React.useState(false)
@@ -71,7 +71,7 @@ import Layout from '@uiw/react-layout';
7171
const { Header, Footer, Sider, Content } = Layout;
7272

7373
const stylHeader = { color: '#fff' }
74-
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' }
7575

7676
function Demo() {
7777
const [collapsed, setCollapsed] = React.useState(false)
@@ -97,8 +97,8 @@ import Layout from '@uiw/react-layout';
9797
const { Header, Footer, Sider, Content } = Layout;
9898

9999
const stylHeader = { color: '#fff' }
100-
const stylSider = { background: '#484a4e', color: '#fff', lineHeight: `120px`, textAlign: 'center' }
101-
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' }
102102

103103
function Demo() {
104104
const [collapsed, setCollapsed] = React.useState(false)

0 commit comments

Comments
 (0)