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 9
9
10
10
``` bash
11
11
# 本地预览
12
- # 先安装 http://www.mkdocs.org/
12
+ # 先安装 mkdocs,了解更多:http://www.mkdocs.org/
13
+ # 选择版本 0.16.3,pip install mkdocs==0.16.3
13
14
# 然后
14
15
mkdocs serve
15
-
16
16
```
17
17
18
18
bug 或者交流建议等请反馈到 [ 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({
96
96
97
97
** 注意点:**
98
98
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 ` 也会是未定义的。
100
100
101
101
2 . 微信小程序的页面的 ` query ` 参数是通过 ` onLoad ` 获取的,mpvue 对此进行了优化,直接通过 ` this.$root.$mp.query ` 获取相应的参数数据,其调用需要在 ` onLoad ` 生命周期触发之后使用,比如 ` onShow ` 等,具体生命周期调用顺序,见下图。
102
102
@@ -387,8 +387,7 @@ mpvue 可以支持小程序的原生组件,比如: `picker,map` 等,需要
387
387
<view class =" picker" >
388
388
当前选择: {{date}}
389
389
</view >
390
- </picker >
391
-
390
+ </picker >
392
391
```
393
392
394
393
## 最佳实践
You can’t perform that action at this time.
0 commit comments