thirdScriptError
Cannot read property 'get' of undefined;at SelectorQuery callback function
TypeError: Cannot read property 'get' of undefined
at new e (http://127.0.0.1:59524/appservice/miniprogram_npm/@antv/wx-f2/index.js:5414:74)
at e.a.interaction (http://127.0.0.1:59524/appservice/miniprogram_npm/@antv/wx-f2/index.js:817:75)
at http://127.0.0.1:59524/appservice/pages/device/detail/detail.js:147:15
at n.<anonymous> (http://127.0.0.1:59524/appservice/miniprogram_npm/@antv/f2-canvas/index.js:179:27)
at Function.<anonymous> (WAService.js:1:738266)
at WAService.js:1:102572
at WAService.js:1:738549
at Array.forEach (<anonymous>)
at WAService.js:1:738522
at WAService.js:1:739700
具体涉及到的语句是下面index.js的s.hammer.get("pinch")
function e(e, i) {
var a,
s = n(n(a = t.call(this, e, i) || this));return s.hammer.get("pinch").set({ enable: !0 }), i.registerPlugins([c, { changeData: function changeData() {
s.limitRange = {}, s.originTicks = null;
}, clear: function clear() {
s.limitRange = {}, s.originTicks = null;
} }]), r.mix(s, h, l), s._bindPress(), a;
使用小程序版本的f2, 叠加interaction的时候,只要出现pinch动作就报错
Cannot read property 'get' of undefined;
.引入方法, 参照 https://github.com/antvis/wx-f2 使用 npm install --production,然后在小程序内部用
程序中的出错部分的配置代码,其中swipe和pan都没有问题,只有pinch出现问题:
报错信息:
具体涉及到的语句是下面index.js的s.hammer.get("pinch")