@@ -21,9 +21,11 @@ public partial class Dialog : IDisposable
2121 /// </summary>
2222 private Dictionary < Dictionary < string , object > , ( bool IsKeyboard , bool IsBackdrop ) > DialogParameters { get ; } = [ ] ;
2323
24- private bool IsKeyboard { get ; set ; }
24+ private bool _isKeyboard = false ;
2525
26- private bool IsBackdrop { get ; set ; }
26+ private bool _isBackdrop = false ;
27+
28+ private bool _isFade = true ;
2729
2830 /// <summary>
2931 /// DialogServices 服务实例
@@ -92,15 +94,16 @@ private async Task Show(DialogOption option)
9294 // 多弹窗支持
9395 var p = DialogParameters . LastOrDefault ( ) ;
9496 CurrentParameter = p . Key ;
95- IsKeyboard = p . Value . IsKeyboard ;
96- IsBackdrop = p . Value . IsBackdrop ;
97+ _isKeyboard = p . Value . IsKeyboard ;
98+ _isBackdrop = p . Value . IsBackdrop ;
9799
98100 StateHasChanged ( ) ;
99101 }
100102 } ;
101103
102- IsKeyboard = option . IsKeyboard ;
103- IsBackdrop = option . IsBackdrop ;
104+ _isKeyboard = option . IsKeyboard ;
105+ _isBackdrop = option . IsBackdrop ;
106+ _isFade = option . IsFade ;
104107
105108 option . Modal = ModalContainer ;
106109
@@ -167,7 +170,7 @@ private async Task Show(DialogOption option)
167170 CurrentParameter = parameters ;
168171
169172 // 添加 ModalDialog 到容器中
170- DialogParameters . Add ( parameters , ( IsKeyboard , IsBackdrop ) ) ;
173+ DialogParameters . Add ( parameters , ( _isKeyboard , _isBackdrop ) ) ;
171174 await InvokeAsync ( StateHasChanged ) ;
172175 }
173176
0 commit comments