vue 获取节点

一般用的是

document.getElementsByClassName(`tb-${this.className}`)[0].querySelectorAll('th, td')

vue获取当前的子元素:

this.$refs.elTableRef.$el.querySelectorAll('th, td')

 

posted @ 2020-11-14 17:37  小番茄酱  阅读(931)  评论(0编辑  收藏  举报