Skip to content

Commit 77c83dd

Browse files
committed
feat: 使用 CheckboxColumnCompactWidth 值渲染选择列宽度
1 parent 3028387 commit 77c83dd

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/BootstrapBlazor/Components/Table/Table.razor.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -877,12 +877,9 @@ private void OnInitParameters()
877877

878878
if (CheckboxColumnWidth == 0)
879879
{
880-
CheckboxColumnWidth = op.TableSettings.CheckboxColumnWidth;
881-
882-
if(TableSize == TableSize.Compact)
883-
{
884-
CheckboxColumnWidth = (int)(CheckboxColumnWidth * 0.8);
885-
}
880+
CheckboxColumnWidth = TableSize == TableSize.Normal
881+
? op.TableSettings.CheckboxColumnWidth
882+
: op.TableSettings.CheckboxColumnCompactWidth;
886883
}
887884

888885
if (op.TableSettings.TableRenderMode != null && RenderMode == TableRenderMode.Auto)

0 commit comments

Comments
 (0)