33// See the LICENSE file in the project root for more information.
44// Maintainer: Argo Zhang([email protected] ) Website: https://www.blazor.zone 55
6- using Microsoft . AspNetCore . Components . Rendering ;
7-
86namespace BootstrapBlazor . Components ;
97
108/// <summary>
119/// BootstrapInputGroupLabel 组件
1210/// </summary>
13- public sealed class BootstrapInputGroupLabel : DisplayBase < string >
11+ public partial class BootstrapInputGroupLabel
1412{
1513 private string ? ClassString => CssBuilder . Default ( )
1614 . AddClass ( "input-group-text" , IsInputGroupLabel )
@@ -56,7 +54,7 @@ public sealed class BootstrapInputGroupLabel : DisplayBase<string>
5654 private bool IsInputGroupLabel => InputGroup != null ;
5755
5856 /// <summary>
59- /// <inheritdoc/>
57+ /// OnParametersSet 方法
6058 /// </summary>
6159 protected override void OnParametersSet ( )
6260 {
@@ -67,26 +65,4 @@ protected override void OnParametersSet()
6765 DisplayText ??= FieldIdentifier ? . GetDisplayName ( ) ;
6866 }
6967 }
70-
71- /// <summary>
72- /// <inheritdoc/>
73- /// </summary>
74- /// <param name="builder"></param>
75- protected override void BuildRenderTree ( RenderTreeBuilder builder )
76- {
77- builder . OpenElement ( 0 , TagName ) ;
78- builder . AddMultipleAttributes ( 1 , AdditionalAttributes ) ;
79- builder . AddAttribute ( 2 , "class" , ClassString ) ;
80- builder . AddAttribute ( 3 , "style" , StyleString ) ;
81- builder . AddAttribute ( 4 , "required" , Required ) ;
82- if ( ChildContent != null )
83- {
84- builder . AddContent ( 5 , ChildContent ) ;
85- }
86- else
87- {
88- builder . AddContent ( 6 , DisplayText ) ;
89- }
90- builder . CloseElement ( ) ;
91- }
9268}
0 commit comments