Vue2.0 Gets the method of mouse position

      #canvas {width: 500px; Height: 500px; Text-align: center; line-height: 500px; border: 1px solid # e5e5; margin: 0 auto; margin-top: 100px;}    {{x}} {{y}}    New Vue ({EL: '# app', data: {x: 0, y : 0}, methods: {updatexy: function (event) {this.x = event.offsetx; this.y = event.offsety}}})   
The above Vue 2.0 method for obtaining the mouse location is the full content of Xiaobian sharing, I hope to give you a reference, I hope everyone will support Tumi Cloud.
© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment