Skip to content

Commit

Permalink
Merge pull request #5 from Pines-Cheng/master
Browse files Browse the repository at this point in the history
docs: 文档更新
  • Loading branch information
luckyadam authored Jun 1, 2018
2 parents d275231 + fe21b16 commit 81ac5bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/GETTING-STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

```bash
$ npm install -g @tarojs/cli
$ yarn add global @tarojs/cli
$ yarn global add @tarojs/cli
```

## 使用
Expand Down
6 changes: 3 additions & 3 deletions docs/event.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Taro 中稍稍有点不同:
</button>
```

在 Taro 中另一个不同是你不能使用 `catchEvent` 的方式阻止时间冒泡。你必须明确的使用 `stopPropagation`。例如,阻止时间冒泡你可以这样写
在 Taro 中另一个不同是你不能使用 `catchEvent` 的方式阻止事件冒泡。你必须明确的使用 `stopPropagation`。例如,阻止事件冒泡你可以这样写

```javascript
class Toggle extends React.Component {
Expand Down Expand Up @@ -65,7 +65,7 @@ class Popper extends Component{
this.state = {name:'Hello world!'};
}

// 你可以通过 bind 传入多个参数
// 你可以通过 bind 传入多个参数
preventPop(name, test, e){ //事件对象e要放在最后
e.preventDefault();
}
Expand All @@ -76,7 +76,7 @@ class Popper extends Component{
}
```

> Taro 目前暂时不支持通过匿名函数传值,也不支持多层 lambdas 嵌套。当你有传参需求时,请全部使用 `bind` 来处理。
> Taro 目前暂时不支持通过匿名函数传值,也不支持多层 lambda 嵌套。当你有传参需求时,请全部使用 `bind` 来处理。
## 任何组件的事件传递都要以 `on` 开头

Expand Down

0 comments on commit 81ac5bf

Please sign in to comment.