Skip to content

Commit 9e10ab2

Browse files
committed
refactor: 重构代码
1 parent 4c89567 commit 9e10ab2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/BootstrapBlazor/Components/Message/MessageService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public async Task Show(MessageOption option, Message? message = null)
2222
{
2323
if (!option.ForceDelay)
2424
{
25-
if (Options.MessageDelay != 0)
25+
if (Options.MessageDelay > 0)
2626
{
2727
option.Delay = Options.MessageDelay;
2828
}

src/BootstrapBlazor/Components/SweetAlert/SwalService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class SwalService(IOptionsMonitor<BootstrapBlazorOptions> options) : Boot
1717
/// <param name="swal">指定弹窗组件 默认为 null 使用 <see cref="BootstrapBlazorRoot"/> 组件内置弹窗组件</param>
1818
public async Task Show(SwalOption option, SweetAlert? swal = null)
1919
{
20-
if (!option.ForceDelay && options.CurrentValue.SwalDelay != 0)
20+
if (!option.ForceDelay && options.CurrentValue.SwalDelay > 0)
2121
{
2222
option.Delay = options.CurrentValue.SwalDelay;
2323
}

0 commit comments

Comments
 (0)