Closed lim-enhui closed 5 years ago
how do i work with this??? i need to get the id but the tap doesnt pass args... this is generated in v-for example
circle(v-else :key='key' :r="getNodeSize(node) / 2" v-hammer:pan="onPan" v-hammer:tap="onTap" :id="node.id" :cx="node.x" :cy="node.y" :style='nodeStyle(node)' :title="node.name" :class="nodeClass(node)" :ref="'nodecircle ' + node.id" v-bind='node._svgAttrs' )
@lim-enhui you can follow:
<div hammer:tap="() => onTap(node.id)">
see: https://github.com/vuejs/vue/issues/5588#issuecomment-299138559
how do i work with this??? i need to get the id but the tap doesnt pass args... this is generated in v-for example
circle(v-else :key='key' :r="getNodeSize(node) / 2" v-hammer:pan="onPan" v-hammer:tap="onTap" :id="node.id" :cx="node.x" :cy="node.y" :style='nodeStyle(node)' :title="node.name" :class="nodeClass(node)" :ref="'nodecircle ' + node.id" v-bind='node._svgAttrs' )