Skip to content

Commit c39c91e

Browse files
authored
Merge pull request #13 from zaxlct/patch-3
修正语法错误和缩进
2 parents 8252cd1 + e479d25 commit c39c91e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

v1/zh-cn/tutorial/05-组件设计实践.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ const UserList = ({
148148
title: '姓名',
149149
dataIndex: 'name',
150150
key: 'name',
151-
render: (text) => <a href="#">{text}</a>,
151+
render(text) => <a href="#">{text}</a>,
152152
}, {
153153
title: '年龄',
154154
dataIndex: 'age',
@@ -160,7 +160,7 @@ const UserList = ({
160160
}, {
161161
title: '操作',
162162
key: 'operation',
163-
render: (text, record) => (
163+
render(text, record) => (
164164
<p>
165165
<a onClick={()=>{}}>编辑</a>
166166
&nbsp;
@@ -172,7 +172,7 @@ const UserList = ({
172172
}];
173173

174174
// 定义分页对象
175-
const pagination = {
175+
const pagination = {
176176
total,
177177
current,
178178
pageSize: 10,
@@ -200,7 +200,7 @@ export default UserList;
200200
需要注意的是,由于我们采用了 antd,所以我们需要在我们的代码中添加样式,可以在 `./src/index.jsx` 中添加一行:
201201

202202
```jsx
203-
+ import 'antd/dist/antd.css';
203+
import 'antd/dist/antd.css';
204204
```
205205

206206
这样我们使用的的 antd 组件就可以展示出样子了:

0 commit comments

Comments
 (0)