test() {
console.log(‘running......‘)
console.log($(‘.el-table__header-wrapper tr>th:first‘))
$(‘.el-table__header-wrapper tr>th:first‘).css({‘position‘:‘sticky‘, ‘left‘:0, ‘z-index‘: 999})
console.log($(‘.el-table__header-wrapper tr>th:first>div:first‘))
$(‘.el-table__header-wrapper tr>th:first>div:first‘).css(‘visibility‘, ‘visible‘)
console.log($(‘.el-table__header-wrapper tr:eq(1)>th:first‘))
$(‘.el-table__header-wrapper tr:eq(1)>th:first‘).css({‘position‘:‘sticky‘, ‘left‘:0, ‘z-index‘: 999})
this.$forceUpdate()
console.log(‘ending.......‘)
}
this.$nextTick(()=>{
// 下面三个会导致左侧固定的列异常
$(‘.el-card__body‘).css(‘overflow‘,‘visible‘)
$(‘.el-card‘).css(‘overflow‘,‘visible‘)
$(‘.el-tabs__content‘).css(‘overflow‘,‘visible‘)
// el-table__fixed
// $(‘.el-table__fixed‘).css(‘z-index‘,‘800‘)
// 将第一行、第一列单元格中的文字显示出来
})
原文:https://www.cnblogs.com/csdqxh-lastday-ckt-online/p/14926407.html