File tree Expand file tree Collapse file tree
src/components/BootstrapBlazor.PdfReader Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,10 +134,17 @@ public partial class PdfReader
134134 [ Parameter ]
135135 public Func < Task < Stream ? > > ? OnGetStreamAsync { get ; set ; }
136136
137+ /// <summary>
138+ /// 获得/设置 是否显示组件 默认 true 显示
139+ /// </summary>
140+ [ Parameter ]
141+ public bool IsShow { get ; set ; } = true ;
142+
137143 [ Inject , NotNull ]
138144 private IStringLocalizer < PdfReader > ? Localizer { get ; set ; }
139145
140146 private string ? ClassString => CssBuilder . Default ( "bb-pdf-reader" )
147+ . AddClass ( "show" , IsShow )
141148 . AddClassFromAttributes ( AdditionalAttributes )
142149 . Build ( ) ;
143150
Original file line number Diff line number Diff line change 88 height : calc (var (--bb-pdf-view-height ) + var (--bb-pdf-toolbar-height ));
99}
1010
11+ .bb-pdf-reader : not (.show ) {
12+ overflow : hidden;
13+ height : 0 ;
14+ }
15+
1116.bb-view-progress {
1217 position : absolute;
1318 top : 0 ;
You can’t perform that action at this time.
0 commit comments