Jquey 修改 元素 CSS 樣式
阿新 • • 發佈:2021-06-24
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') // 將第一行、第一列單元格中的文字顯示出來 })