Skip to content

Commit 464c880

Browse files
committed
refactor: 重构 ToastDelay 取值逻辑
1 parent 07a6ae2 commit 464c880

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,11 +1158,10 @@ private ToastOption GetToastOption(string title)
11581158
var option = new ToastOption()
11591159
{
11601160
Title = title,
1161-
Delay = Options.CurrentValue.ToastDelay
11621161
};
1163-
if (option.Delay == 0)
1162+
if (Options.CurrentValue.ToastDelay > 0)
11641163
{
1165-
option.Delay = Math.Max(1000, ToastDelay);
1164+
option.Delay = Options.CurrentValue.ToastDelay;
11661165
}
11671166
return option;
11681167
}

0 commit comments

Comments
 (0)