ant-design-vue
ant-design-vue copied to clipboard
固定列和嵌套子表格一起使用时,展开子集,错位问题
- [ ] I have searched the issues of this repository and believe that this is not a duplicate.
Version
1.7.2
Environment
win10 "vue": "^2.6.11"
Reproduction link
Steps to reproduce
首先固定左侧第一列,然后展开子表格,页面错位了
What is expected?
固定左侧列后,展开子表格,页面正常展示
What is actually happening?
固定左侧列后,展开子表格,页面错位,出现了两个子表格
我看antd在4.0.0-rc.0版本修复了该问题
Is there any help to fix this issue?
我的也是,固定列错位,因为固定列自己就是个表格,所以展开的时候,固定列没有跟随嵌套表格展开,希望能解决这个问题
同样的问题,希望能得到解决
同样的问题
@tangjinzhou #2470 这个问题2020年也有人提出来了,请问有计划解决这个问题吗
也遇到了嵌套子表格,展开后,固定列错位问题 @tangjinzhou
expandedOneRow(expanded, rec) {
this.expandedRowKeys = expanded ? [rec.key] : []
this.$nextTick(() => {
setTimeout(() => {
const element = document.querySelectorAll([data-row-key='${rec.id}-extra-row'])
// 25 是td 的 padding 值 加 border值
const height = element[0].getBoundingClientRect().height - 25
element[1].childNodes[0].innerHTML = <div style="height: ${height}px;"></div>
}, 0)
})
},
expandedOneRow(expanded, rec) { this.expandedRowKeys = expanded ? [rec.key] : [] this.$nextTick(() => { setTimeout(() => { const element = document.querySelectorAll(
[data-row-key='${rec.id}-extra-row']) // 25 是td 的 padding 值 加 border值 const height = element[0].getBoundingClientRect().height - 25 element[1].childNodes[0].innerHTML =<div style="height: ${height}px;"></div>}, 0) }) },
太牛了,亲测可用