Skip to content

Commit 9571e31

Browse files
committed
refactor: 增加 border 宽度
1 parent ba8b3a5 commit 9571e31

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/BootstrapBlazor/Components/Table/Table.razor.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,8 +785,7 @@ const calcCellWidth = cell => {
785785
document.body.appendChild(div);
786786

787787
const cellStyle = getComputedStyle(cell);
788-
const width = div.offsetWidth + parseFloat(cellStyle.getPropertyValue('padding-left')) + parseFloat(cellStyle.getPropertyValue('padding-right'));
789-
div.remove();
788+
const width = div.offsetWidth + parseFloat(cellStyle.getPropertyValue('padding-left')) + parseFloat(cellStyle.getPropertyValue('padding-right')) + parseFloat(cellStyle.getPropertyValue('border-left-width')) + parseFloat(cellStyle.getPropertyValue('border-right-width')) + 1;
790789
return width;
791790
}
792791

0 commit comments

Comments
 (0)