File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 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# 然后
1415mkdocs serve
15-
1616```
1717
1818bug 或者交流建议等请反馈到 [ mpvue/issues] ( https://github.com/Meituan-Dianping/mpvue/issues ) 。
Original file line number Diff line number Diff 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
1011012 . 微信小程序的页面的 ` 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## 最佳实践
You can’t perform that action at this time.
0 commit comments