@@ -11,46 +11,50 @@ namespace BootstrapBlazor.Components;
1111/// </summary>
1212public static class MaskServiceExtensions
1313{
14-
15- /// <summary>
16- /// <para lang="zh">Show 扩展方法</para>
17- /// <para lang="en">Show extension method</para>
18- /// </summary>
19- /// <param name="maskService"></param>
20- /// <param name="parameters"></param>
21- /// <param name="containerId"></param>
22- /// <param name="backgroundColor"></param>
23- /// <param name="opacity"></param>
24- /// <param name="zIndex"></param>
25- /// <param name="mask"></param>
26- public static Task Show < TComponent > ( this MaskService maskService , IDictionary < string , object ? > ? parameters = null , string ? containerId = null , string ? backgroundColor = null , float opacity = 0.5f , int zIndex = 1050 , Mask ? mask = null ) where TComponent : ComponentBase => maskService . Show ( new MaskOption ( )
14+ extension ( MaskService maskService )
2715 {
28- BackgroundColor = backgroundColor ,
29- Opacity = opacity ,
30- ZIndex = zIndex ,
31- ContainerId = containerId ,
32- ChildContent = BootstrapDynamicComponent . CreateComponent < TComponent > ( parameters ) . Render ( )
33- } , mask ) ;
16+ /// <summary>
17+ /// <para lang="zh">Show 扩展方法</para>
18+ /// <para lang="en">Show extension method</para>
19+ /// </summary>
20+ /// <param name="parameters"></param>
21+ /// <param name="containerId"></param>
22+ /// <param name="backgroundColor"></param>
23+ /// <param name="opacity"></param>
24+ /// <param name="zIndex"></param>
25+ /// <param name="appendToBody"></param>
26+ /// <param name="mask"></param>
27+ public Task Show < TComponent > ( IDictionary < string , object ? > ? parameters = null , string ? containerId = null , string ? backgroundColor = null , float opacity = 0.5f , int zIndex = 1050 , bool appendToBody = true , Mask ? mask = null ) where TComponent : ComponentBase => maskService . Show ( new MaskOption ( )
28+ {
29+ BackgroundColor = backgroundColor ,
30+ Opacity = opacity ,
31+ ZIndex = zIndex ,
32+ ContainerId = containerId ,
33+ ChildContent = BootstrapDynamicComponent . CreateComponent < TComponent > ( parameters ) . Render ( ) ,
34+ AppendToBody = appendToBody
35+ } , mask ) ;
3436
3537
36- /// <summary>
37- /// <para lang="zh">Show 扩展方法</para>
38- /// <para lang="en">Show extension method</para>
39- /// </summary>
40- /// <param name="maskService"></param>
41- /// <param name="type"></param>
42- /// <param name="parameters"></param>
43- /// <param name="containerId"></param>
44- /// <param name="backgroundColor"></param>
45- /// <param name="opacity"></param>
46- /// <param name="zIndex"></param>
47- /// <param name="mask"></param>
48- public static Task Show ( this MaskService maskService , Type type , IDictionary < string , object ? > ? parameters = null , string ? containerId = null , string ? backgroundColor = null , float opacity = 0.5f , int zIndex = 1050 , Mask ? mask = null ) => maskService . Show ( new MaskOption ( )
49- {
50- BackgroundColor = backgroundColor ,
51- Opacity = opacity ,
52- ZIndex = zIndex ,
53- ContainerId = containerId ,
54- ChildContent = BootstrapDynamicComponent . CreateComponent ( type , parameters ) . Render ( )
55- } , mask ) ;
38+ /// <summary>
39+ /// <para lang="zh">Show 扩展方法</para>
40+ /// <para lang="en">Show extension method</para>
41+ /// </summary>
42+ /// <param name="type"></param>
43+ /// <param name="parameters"></param>
44+ /// <param name="containerId"></param>
45+ /// <param name="backgroundColor"></param>
46+ /// <param name="opacity"></param>
47+ /// <param name="zIndex"></param>
48+ /// <param name="appendToBody"></param>
49+ /// <param name="mask"></param>
50+ public Task Show ( Type type , IDictionary < string , object ? > ? parameters = null , string ? containerId = null , string ? backgroundColor = null , float opacity = 0.5f , int zIndex = 1050 , bool appendToBody = true , Mask ? mask = null ) => maskService . Show ( new MaskOption ( )
51+ {
52+ BackgroundColor = backgroundColor ,
53+ Opacity = opacity ,
54+ ZIndex = zIndex ,
55+ ContainerId = containerId ,
56+ ChildContent = BootstrapDynamicComponent . CreateComponent ( type , parameters ) . Render ( ) ,
57+ AppendToBody = appendToBody
58+ } , mask ) ;
59+ }
5660}
0 commit comments