...
|
...
|
@@ -277,6 +277,26 @@ export default { |
|
|
|
|
|
emit('handleSelectAll',selection)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 表格组件,超过2行展示tooltip
|
|
|
* @param e
|
|
|
* @param item
|
|
|
*/
|
|
|
const tableColMouseenter = (e, item) => {
|
|
|
const ev = e.target;
|
|
|
var height = $(ev).scroll().height()
|
|
|
console.log(height);
|
|
|
// 超过2行
|
|
|
if (height > 45) {
|
|
|
// 实际高度 > 可视高度 文字溢出
|
|
|
item.isShowTooltip = true;
|
|
|
} else {
|
|
|
// 否则为不溢出
|
|
|
item.isShowTooltip = false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 挂载完
|
|
|
Vue.onMounted(() => {
|
|
|
//callback();
|
...
|
...
|
@@ -305,7 +325,8 @@ export default { |
|
|
prePage,
|
|
|
nextPage,
|
|
|
getWidth,
|
|
|
getTextContent
|
|
|
getTextContent,
|
|
|
tableColMouseenter
|
|
|
}
|
|
|
}
|
|
|
} |
...
|
...
|
|