File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
src/BootstrapBlazor/Components/IFrame Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,12 @@ public partial class IFrame
2828 [ Parameter ]
2929 public Func < object ? , Task > ? OnPostDataAsync { get ; set ; }
3030
31+ /// <summary>
32+ /// 获得/设置 页面加载完毕后回调方法
33+ /// </summary>
34+ [ Parameter ]
35+ public Func < Task > ? OnReadyAsync { get ; set ; }
36+
3137 private string ? ClassString => CssBuilder . Default ( "bb-frame" )
3238 . AddClassFromAttributes ( AdditionalAttributes )
3339 . Build ( ) ;
@@ -75,4 +81,17 @@ public async Task TriggerPostData(object? data)
7581 await OnPostDataAsync ( data ) ;
7682 }
7783 }
84+
85+ /// <summary>
86+ /// 由 JavaScript 调用
87+ /// </summary>
88+ /// <returns></returns>
89+ [ JSInvokable ]
90+ public async Task TriggerLoaded ( )
91+ {
92+ if ( OnReadyAsync != null )
93+ {
94+ await OnReadyAsync ( ) ;
95+ }
96+ }
7897}
You can’t perform that action at this time.
0 commit comments