update readme

This commit is contained in:
张磊 2018-10-26 16:05:24 +08:00
parent 0a64b9621d
commit 29fdaf1150
2 changed files with 16 additions and 16 deletions

View File

@ -314,13 +314,13 @@ render(<my-app></my-app>, 'body')
```js
tag('my-ele', function (props) {
return (
<ul>
{props.items.map(item => (
<li key={item.id}>{item.text}</li>
))}
</ul>
)
return (
<ul>
{props.items.map(item => (
<li key={item.id}>{item.text}</li>
))}
</ul>
)
})
```
@ -328,7 +328,7 @@ tag('my-ele', function (props) {
```js
<my-ele
items={[{ text: 'Omi', id: 1 }, { text: "Tencent", id: 2 }]}
items={[{ text: 'Omi', id: 1 }, { text: "Tencent", id: 2 }]}
/>
```

View File

@ -325,13 +325,13 @@ render(<my-app></my-app>, 'body')
```js
tag('my-ele', function (props) {
return (
<ul>
{props.items.map(item => (
<li key={item.id}>{item.text}</li>
))}
</ul>
)
return (
<ul>
{props.items.map(item => (
<li key={item.id}>{item.text}</li>
))}
</ul>
)
})
```
@ -339,7 +339,7 @@ Use it:
```js
<my-ele
items={[{ text: 'Omi', id: 1 }, { text: "Tencent", id: 2 }]}
items={[{ text: 'Omi', id: 1 }, { text: "Tencent", id: 2 }]}
/>
```