原生小程序语法直接在onshow生命周期里使用this.options
// 以下$wx是被wepy封装了一层.
onShow () {
console.log(this)
let { $wx: { options } } = this
this.recommendList(options.id)
},
本文探讨了原生小程序语法中,在onShow生命周期如何利用this.options获取参数,并通过实例展示了如何在wepy封装环境下使用$wx来访问options对象。
原生小程序语法直接在onshow生命周期里使用this.options
// 以下$wx是被wepy封装了一层.
onShow () {
console.log(this)
let { $wx: { options } } = this
this.recommendList(options.id)
},
1797
561

被折叠的 条评论
为什么被折叠?