Skip to content

Commit 6d10281

Browse files
ArgoZhangA5196060densen2014
authored
doc(ComponentLayout): refactor scroll behavior (#5091)
* style: 移除样式 * doc: 重构注释 * refactor: 重构脚本 * chore: bump version 9.2.7-beta05 Co-Authored-By: Zeus <[email protected]> Co-Authored-By: Alex chow <[email protected]> * chore: bump version 9.2.7-beta06 --------- Co-authored-by: Zeus <[email protected]> Co-authored-by: Alex chow <[email protected]>
1 parent 6f64911 commit 6d10281

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

src/BootstrapBlazor.Server/Components/Layout/ComponentLayout.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
108108
}
109109
if (Module != null)
110110
{
111-
await Module.InvokeVoidAsync("init");
111+
await Module.InvokeVoidAsync("scrollToAnchor");
112112
}
113113
}
114114

src/BootstrapBlazor.Server/Components/Layout/ComponentLayout.razor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export function init() {
1+
export function scrollToAnchor() {
22
const hash = decodeURI(location.hash)
33
if (hash) {
44
const anchor = hash.split('-')[0]

src/BootstrapBlazor.Server/Components/Layout/MainLayout.razor.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
}
9999

100100
.main {
101-
height: 100%;
102101
width: calc(100% - var(--bb-sidebar-width));
103102
}
104103

src/BootstrapBlazor/BootstrapBlazor.csproj

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

33
<PropertyGroup>
4-
<Version>9.2.7-beta04</Version>
4+
<Version>9.2.7-beta05</Version>
55
</PropertyGroup>
66

77
<ItemGroup>

src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ public abstract class IdComponentBase : BootstrapComponentBase
1515
/// </summary>
1616
[Parameter]
1717
[NotNull]
18-
public virtual string? Id { get; set; }
18+
public string? Id { get; set; }
1919

2020
/// <summary>
21-
/// 获得 IComponentIdGenerator 实例
21+
/// 获得 <see cref="IComponentIdGenerator"/> 实例
2222
/// </summary>
2323
[Inject]
2424
[NotNull]

0 commit comments

Comments
 (0)