layui数据表格添加鼠标hover效果

当单元格数据内容显示不全时,需要有鼠标hover上去显示单元格内容的需求。

解决:在列后面添加templet模板自定义,如下(chrome浏览器需要加display:block;,要不不起作用)

{field:'serviceInterface',  title: '接口类名',width:500,align: 'center',templet:'<div><span title="{{d.serviceInterface}}";display:block;>{{d.serviceInterface}}</span></div>'}

猜你喜欢

转载自www.cnblogs.com/ligh-test/p/9852244.html