Skip to content

Commit 1b34819

Browse files
committed
Merge branch 'master' of https://github.com/mpvue/mpvue-docs into develop
2 parents d8536bb + baa1fef commit 1b34819

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
``` bash
1111
# 本地预览
12-
# 先安装 http://www.mkdocs.org/
12+
# 先安装 mkdocs,了解更多:http://www.mkdocs.org/
13+
# 选择版本 0.16.3,pip install mkdocs==0.16.3
1314
# 然后
1415
mkdocs serve
15-
1616
```
1717

1818
bug 或者交流建议等请反馈到 [mpvue/issues](https://github.com/Meituan-Dianping/mpvue/issues)

docs/mpvue/index.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ new Vue({
9696

9797
**注意点:**
9898

99-
1. 不要选项属性或回调上使用箭头函数,比如 `created: () => console.log(this.a)``vm.$watch('a', newValue => this.myMethod())`。因为箭头函数是和父级上下文绑定在一起的,`this` 不会是如你做预期的 Vue 实例,且 `this.a``this.myMethod` 也会是未定义的。
99+
1. 不要在选项属性或回调上使用箭头函数,比如 `created: () => console.log(this.a)``vm.$watch('a', newValue => this.myMethod())`。因为箭头函数是和父级上下文绑定在一起的,`this` 不会是如你做预期的 Vue 实例,且 `this.a``this.myMethod` 也会是未定义的。
100100

101101
2. 微信小程序的页面的 `query` 参数是通过 `onLoad` 获取的,mpvue 对此进行了优化,直接通过 `this.$root.$mp.query` 获取相应的参数数据,其调用需要在 `onLoad` 生命周期触发之后使用,比如 `onShow` 等,具体生命周期调用顺序,见下图。
102102

@@ -387,8 +387,7 @@ mpvue 可以支持小程序的原生组件,比如: `picker,map` 等,需要
387387
<view class="picker">
388388
当前选择: {{date}}
389389
</view>
390-
</picker>
391-
390+
</picker>
392391
```
393392

394393
## 最佳实践

0 commit comments

Comments
 (0)