实现elemenu-ui中el-tabs的hover切换效果

 1 this.$nextTick(() => {
 2       this.$refs.navTabs.$refs.nav.$nextTick(() => {
 3         var target = document.getElementsByClassName("el-tabs__item");
 4         for (let i = 0; i < target.length; i++) {
 5           target[i].addEventListener("mouseover", () => {
 6             this.activeName = target[i].getAttribute('id').split('-')[1]
 7             this.getFundList(this.activeName)
 8           });
 9         }
10       });
11     });

 

posted @ 2021-07-08 18:04  流弊的小涛  阅读(524)  评论(0编辑  收藏  举报