vue.js如何实现移入移出效果

 3981

vue.js实现移入移出效果的方法:【methods:{enter(index){this.seen = true;this.current = index;},leave(){this.seen = false;this.cur...】。


vue.js如何实现移入移出效果


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;
    }
}


TAG标签:
本文网址:https://www.zztuku.com/detail-9454.html
站长图库 - vue.js如何实现移入移出效果
申明:如有侵犯,请 联系我们 删除。

评论(0)条

您还没有登录,请 登录 后发表评论!

提示:请勿发布广告垃圾评论,否则封号处理!!

    编辑推荐

    仿羊了个羊H5游戏源码