element-ui的table控件得到所有的表头label值

可以通过ref得到

this.$refs.XXX.$children可以得到所有的表头数据,

这个时候用this.$refs.XXX.$children.forEach(obj => { values.push(obj.label) })

values里面就有全部的表头label啦~

猜你喜欢

转载自www.cnblogs.com/pjw233/p/12808473.html