Vue.js allow apply event on element:
<div id="app">
<button @click="play()">Play</button>
</div>
But how to apply event on window
object? it is not in DOM.
for example:
<div id="app">
<div @mousedown="startDrag()" @mousemove="move($event)">Drag me</div>
</div>
in this example, how to listen mousemove event on window
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…