修改sf表格样式

This commit is contained in:
黄焱
2024-01-08 16:28:49 +08:00
parent 31bb7f0c97
commit 4dde30f9f9
3 changed files with 16 additions and 13 deletions

View File

@@ -11,15 +11,16 @@ function setTableWidth() {
const tbody_tr = dom.find('tbody').children('tr')
dom.find('thead').children('tr').children().each(function () {
$('#widthTest').text($(this).text())
const width = $('#widthTest').width()
const width = $('#widthTest').width() + 10
const i = $(this).index()
console.log(111)
tbody_tr.each(function () {
if($(this).children().length > 2) {
$(this).children().eq(i).css('min-width', width + 'px')
}
})
})
const resizeEvent = new Event('resize');
window.dispatchEvent(resizeEvent);
}
$(function () {