<canvas
class="canvas"
type="2d"
canvas-id="canvas"
@touchstart="touchStart"
@touchmove="touchMove"
@touchend="touchEnd"
@error="error"
</canvas>
methods: {
touchStart(e) {
console.log('start')
},
touchMove(e) {
console.log('move')
},
touchEnd(e) {
console.log('end')
}
}
1 个回复
CODE_XU
PC 端是无法使用 touch 事件的,你需要绑定 mouse 事件去模拟滑动