Skip to content

Commit

Permalink
added in api doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcaufy committed Jan 2, 2018
1 parent 60a73d7 commit 6f77e79
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/md/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,29 @@ export class App extends wepy.app {
});
```

* `$nextTick([func:Function])`:组件数据绑定完成后的回调事件,v1.6.1以上可用。

数据绑定后的回调事件,在不传入function时,返回一个promise对象

使用方法如下:

```javascript
this.userName = 'Gcaufy';
this.$nextTick(function () {
console.log('UI updated');
});
```

或者:

```javascript
this.userName = 'Gcaufy';
this.$nextTick().then(function () {
console.log('UI updated');
});
```


### wepy.page Class

页面类,继承自`wepy.component`,拥有页面所有的属性与方法。
Expand Down

0 comments on commit 6f77e79

Please sign in to comment.