vue.js實現移入移出效果的方法:【methods:{enter(index){this.seen = true;this.current = index;},leave(){this.seen = false;this.cur...】。
vue.js實現移入移出事件的具體代碼:
html代碼:
<i class="icon" @mouseenter="enter(index)" @mouseleave="leave()"></i>
邏輯代碼:
methods:{ enter(index){ this.seen = true; this.current = index; }, leave(){ this.seen = false; this.current = null; } }