Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.1k views
in Technique[技术] by (71.8m points)

antd table中如何使用ref获取dom元素

image.png
如图 写在columns中的ref获取不到

这里要做一个判断文本是否溢出 溢出显示tooltip的功能,要获取盒子宽度

因为用的老版本的antd , 表格还没有支持ellipsis showTitle 只能判断


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

方法里面用this.$refs.xxx


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...