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

Categories

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

el-transfer内容过长,鼠标悬浮显示完整内容

image
网上查了一个方法说可以这样写,但是我放到vue项目里就报错了,也试过了这样的写法,
renderFunc(h, option) {

        return `<span title=${option.addr}>${option.addr}</span>`
   },
   不报错了,但是不显示内容,要怎么写才对?
   还有一种方法是 @mouseover.native="addTitle"
   addTitle(e) {
      //手动给鼠标划过的元素添加一个title
      let target_el = e.target;
      if (target_el.title) return;
      target_el.title = target_el.innerText;
    },
这个方法是可以显示的,也不报错,但是美中不足的是不该显示的内容都显示了。



    

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

1 Answer

0 votes
by (71.8m points)

嗯。。。文档写法是在

data(){
    return{
    }
}

image.png

||

image.png


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

2.1m questions

2.1m answers

28 comments

37.2k users

...