Problems with weex manually adding event snooping

problem description

within the vue single-file component of weex, @ click is usually used to listen for gesture events on the component.

now I"m thinking of integrating antv/F2 and weex gcanvas, and find that gesture events for antv/F2 need to be added in a way similar to el.addEventListener in the browser DOM.

component references can now be obtained through $refs ["ref"] in weex, but I can"t find an api that uses dom el.addEventListener like dom el.addEventListener in weex. What great gods know how to do this? Please give me some advice.

Mar.28,2021

by looking at the source code, you can listen for events like this:

//
let demoRef = this.$refs.demo;
//
demoRef.addEvent("touchstart", function(e) {});
//
demoRef.removeEvent("touchstart");
Menu