右边操作列的属性是固定的:'right',展开行时出现列错位问题。打开元素,发现column属性设置为fixed,在DOM中是独立的。解决方案:record.key":expanded-row-keys.sync="expandedRowKeys"@expand="expandedOneRow">模板>expandedOneRow(expanded,rec){if(expanded){this.expandedRowKeys=[];this.expandedRowKeys.push(rec.key)}else{this.expandedRowKeys=[];}this.$nextTick(()=>{setTimeout(()=>{constelement=document.querySelectorAll(`[data-row-key='${rec.key}-extra-row']`)//33为td的padding值添加border值constheight=element[0].getBoundingClientRect().height-33element[1].childNodes[0].innerHTML=`
`},0)})},最后贴出修改后的效果图