Skip to content

Commit 0d447b7

Browse files
committed
test: 增加功能测试
1 parent 4bb21df commit 0d447b7

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

src/BootstrapBlazor.Server/Components/Samples/Affixs.razor

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@page "/affix"
2+
@using Microsoft.AspNetCore.Components.Rendering
23

34
<h3>@Localizer["AffixTitle"]</h3>
45

@@ -29,3 +30,6 @@
2930
</Affix>
3031
</div>
3132
</DemoBlock>
33+
34+
<ClassTest Value2="Test"></ClassTest>
35+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the Apache 2.0 License
3+
// See the LICENSE file in the project root for more information.
4+
// Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone
5+
6+
using Microsoft.AspNetCore.Components.Rendering;
7+
8+
namespace BootstrapBlazor.Server.Components.Samples;
9+
10+
public class ClassBase : ComponentBase
11+
{
12+
[Parameter]
13+
[EditorRequired]
14+
public string? Value { get; set; }
15+
}
16+
17+
public class ClassTest : ClassBase
18+
{
19+
[Parameter]
20+
public string? Value2 { get; set; }
21+
22+
protected override void BuildRenderTree(RenderTreeBuilder builder)
23+
{
24+
builder.AddContent(0, Value);
25+
builder.AddContent(1, Value2);
26+
}
27+
}

0 commit comments

Comments
 (0)