Skip to content

Commit 7e7d6f2

Browse files
committed
doc: 更新示例
1 parent 6fbacbc commit 7e7d6f2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/BootstrapBlazor.Server/Components/Samples/Messages.razor.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ private async Task ShowMessage()
2323
Message.SetPlacement(Placement.Top);
2424
await MessageService.Show(new MessageOption()
2525
{
26-
Content = "This is a reminder message"
26+
Content = "This is a reminder message",
27+
DismissMode = MessageDismissMode.DeleteSource,
28+
ShowDismiss = true
2729
});
2830
}
2931

@@ -33,16 +35,16 @@ private async Task ShowAsyncMessage()
3335
_option.IsAutoHide = false;
3436
_option.Delay = 3000;
3537
_option.Content = Localizer["MessagesAsyncDemoStep1Text"];
36-
_option.Color = Color.Info;
38+
_option.Color = Color.Primary;
3739
await MessageService.Show(_option);
3840

3941
await Task.Delay(3000);
4042
_option.Content = Localizer["MessagesAsyncDemoStep2Text"];
41-
_option.IsAutoHide = true;
4243
_option.Color = Color.Info;
4344
await MessageService.Show(_option);
4445

4546
await Task.Delay(2000);
47+
_option.IsAutoHide = true;
4648
_option.Content = Localizer["MessagesAsyncDemoStep3Text"];
4749
_option.Color = Color.Success;
4850

0 commit comments

Comments
 (0)