监听滚动条、上下联动

document.getElementById('scrollTopFormp').addEventListener('scroll',(e)=>{
          var left = e.target.scrollLeft;
          this.$refs.tableOne.scrollLeft = left;
        })
        this.$refs.tableOne.addEventListener('scroll',(e)=>{
          var bottom = e.target.scrollLeft;
          document.getElementById('scrollTopFormp').scrollLeft = bottom;

        })

 

posted @ 2021-11-03 15:16  骅骝漫轻舞01  阅读(44)  评论(0编辑  收藏  举报