问题图片
* 各别 表格数据返回绑值完成后出现错位问题
描述问题:1.前三个加了fixed:left
1.表示已写过 来赋值高度 也销毁了
resizeHandler() {
this.screenHeight = document.body.clientHeight
},
beforeDestroy() {
window.removeEventListener('resize', this.resizeHandler)
}
2. 数据返回赋值
getTableData(params)
.then(data => {
this.total = data.total
this.tableData = data.pageList
// hack方法,不知道为什么数据出现后表格高度未撑
this.loading = false
})
3.解决方案
在其中 加 this.screenHeight -= 0.1 不管加减多少 只要改变就表格正常
这是新增列后出现白条
这个问题让我有点费解 不知道什么情况 那位朋友知道原因欢迎留言
更新由于 data中screenHeight: document.body.clientHeight 导致表格中超出当前视图的表格显示不全的问题,
如下图所示
解决方案:给页面的根元素加上滚轮事件 @wheel="resizeHandler"
resizeHandler(e) {
e = e || window.event
if (e.wheelDelta) { // 判断浏览器IE,谷歌滑轮事件
this.screenHeight -= 0.1
}
},