2021-07-19
*## vue 文字超出隐藏,点击显示全部
1.加入css样式*
width: 200px; overflow :hidden; text-overflow: ellipsis;Ï white-space: normal
2.main.js
Vue.directive('showTips', {
// el {element} 当前元素
componentUpdated (el) {
const curStyle = window.getComputedStyle(el, '') // 获取
原创
2021-07-19 18:13:29 ·
148 阅读 ·
0 评论