vue.js鼠标滑动事件
//template<div id="canvas" v-on:mousemove="mousemove"></div>//scriptmethods: {mousemove: function (event) {this.x = event.offsetXthis....
·
//template
<div id="canvas" v-on:mousemove="mousemove"></div>
//script
methods: {
mousemove: function (event) {
this.x = event.offsetX
this.y = event.offsetY
}
}
更多推荐
已为社区贡献3条内容
所有评论(0)