Skip to content

Commit 53b67c3

Browse files
authored
fix(Table): update style for ScrollingDialogContent (#6577)
* refactor: 增加 form-body 节点 * style: 增加样式 * chore: bump version 9.9.2-beta04
1 parent 299e143 commit 53b67c3

File tree

4 files changed

+23
-26
lines changed

4 files changed

+23
-26
lines changed

src/BootstrapBlazor/BootstrapBlazor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>9.9.2-beta03</Version>
4+
<Version>9.9.2-beta04</Version>
55
</PropertyGroup>
66

77
<ItemGroup>

src/BootstrapBlazor/Components/EditorForm/EditorForm.razor

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,35 @@
22
@typeparam TModel
33
@inherits BootstrapComponentBase
44

5-
<div class="@ClassString">
5+
<div @attributes="AdditionalAttributes" class="bb-editor">
66
<CascadingValue Value="@_editorItems" IsFixed="false">
77
@FieldItems?.Invoke(Model)
88
</CascadingValue>
99
<CascadingValue Value="this" Name="EditorForm">
10-
@if (ShowUnsetGroupItemsOnTop)
11-
{
12-
if (UnsetGroupItems.Any())
13-
{
14-
@RenderUnsetGroupItems
15-
}
16-
@foreach (var g in GroupItems)
10+
<div class="form-body">
11+
@if (ShowUnsetGroupItemsOnTop)
1712
{
18-
@RenderGroupItems(g)
19-
}
20-
}
21-
else
22-
{
23-
@foreach (var g in GroupItems)
24-
{
25-
@RenderGroupItems(g)
13+
if (UnsetGroupItems.Any())
14+
{
15+
@RenderUnsetGroupItems
16+
}
17+
@foreach (var g in GroupItems)
18+
{
19+
@RenderGroupItems(g)
20+
}
2621
}
27-
if (UnsetGroupItems.Any())
22+
else
2823
{
29-
@RenderUnsetGroupItems
24+
@foreach (var g in GroupItems)
25+
{
26+
@RenderGroupItems(g)
27+
}
28+
if (UnsetGroupItems.Any())
29+
{
30+
@RenderUnsetGroupItems
31+
}
3032
}
31-
}
33+
</div>
3234
</CascadingValue>
3335

3436
@if (Buttons != null)

src/BootstrapBlazor/Components/EditorForm/EditorForm.razor.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,9 @@ namespace BootstrapBlazor.Components;
1111
/// <summary>
1212
/// 编辑表单基类
1313
/// </summary>
14-
#if NET6_0_OR_GREATER
1514
[CascadingTypeParameter(nameof(TModel))]
16-
#endif
1715
public partial class EditorForm<TModel> : IShowLabel
1816
{
19-
private string? ClassString => CssBuilder.Default("bb-editor form-body")
20-
.AddClassFromAttributes(AdditionalAttributes)
21-
.Build();
22-
2317
/// <summary>
2418
/// 支持每行多少个控件功能
2519
/// </summary>

src/BootstrapBlazor/Components/Table/Table.razor.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,7 @@ form .table .table-cell > textarea {
921921
overflow-y: auto;
922922
overflow-x: hidden;
923923
padding: 1rem;
924+
max-height: calc(100vh - 133px);
924925
}
925926

926927
.modal-dialog-table.modal-dialog-scrollable .modal-body .form-footer {

0 commit comments

Comments
 (0)