版权声明:转载请评论留言 https://blog.csdn.net/solocao/article/details/88773649
直接贴出解决方案,需要在vue文件里面拷贝f2-canvas.js
里面的代码:
F2.Util.addEventListener = function (source, type, listener) {
source.addListener(type, listener);
};
F2.Util.removeEventListener = function (source, type, listener) {
source.removeListener(type, listener);
};
F2.Util.createEvent = function (event, chart) {
const type = event.type;
let x = 0;
let y = 0;
const touches = event.touches;
if (touches && touches.length > 0) {
x = touches[0].x;
y = touches[0].y;
}
return {
type,
chart,
x,
y
};
};
放到引入f2.js文件代码的下面,就解决了。