Skip to content

Commit 61769ed

Browse files
refactor(Toast): update javascript logic (#6042)
* refactor: 更新弹窗脚本 * chore: bump version 9.6.4-beta01 Co-Authored-By: Symin <[email protected]> --------- Co-authored-by: Symin <[email protected]>
1 parent d5cbb73 commit 61769ed

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/BootstrapBlazor/BootstrapBlazor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>9.6.3</Version>
4+
<Version>9.6.4-beta01</Version>
55
</PropertyGroup>
66

77
<ItemGroup>

src/BootstrapBlazor/Components/Toast/Toast.razor.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ export function init(id, invoke, callback) {
3030
invoke.invokeMethodAsync(toast.callback)
3131
})
3232
EventHandler.on(progressElement, 'transitionend', e => {
33-
toast.toast.hide();
33+
if (toast.toast._config.autohide === false) {
34+
toast.toast.hide();
35+
}
3436
});
3537

3638
toast.toast.show();
@@ -42,8 +44,6 @@ export function update(id) {
4244
const autoHide = element.getAttribute('data-bs-autohide') !== 'false';
4345
if (autoHide) {
4446
const delay = parseInt(element.getAttribute('data-bs-delay'));
45-
46-
toast._config.autohide = autoHide;
4747
toast._config.delay = delay;
4848

4949
progressElement.style.width = '100%';

0 commit comments

Comments
 (0)