Cannot read property 'getContext' of null
Closed this issue · 2 comments
1uokun commented
小程序this.createSelectorQuery()
有时候会拿不到DOM
有人推荐写在nextTick
里,但还是会存在拿不到,有更好的写法吗🐶
wx.nextTick(() => {
...
this.createSelectorQuery()
.exec(res => {
const canvas = res[0].node;
})
...
}
Gitjinfeiyang commented
生命周期放的对嘛 ,之前还没遇到过这种情况🐶
Gitjinfeiyang commented
微信相关问题