真机测试画布getContext('2d')无法使用?
wx.createSelectorQuery() .select( '#myCanvas' ) .fields({ node: true , size: true , }) .exec((res) => { console.log(res[0]) }) |
fields中读取node真机返回错误
Uncaught ( in promise) ReferenceError: NativeGlobal is not defined at n.value ([publib]:1) at n.value ([publib]:1) at t ([publib]:1) at n.value ([publib]:1) at eval ([publib]:1) atnew Promise (<anonymous>) at t ([publib]:1) at eval ([publib]:1) at Array.forEach (<anonymous>) at eval ([publib]:1) |
这是什么原因呢?测试机器 小米8、苹果X
2 回复
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)