fix(Dialog): do not remove when browser go back/forward (#3816)

* fix: 修复浏览器后退前进时弹窗不消失问题

* chore: bump version 8.7.2-beta03
This commit is contained in:
Argo Zhang 2024-07-09 11:00:37 +08:00 committed by GitHub
parent 824d08edcf
commit d64937744d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 8 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<Version>8.7.2-beta02</Version>
<Version>8.7.2-beta03</Version>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">

View File

@ -9,13 +9,8 @@ export function init(id, invoke, shownCallback, closeCallback) {
shownCallback,
closeCallback,
pop: () => {
if (modal.modal) {
modal.modal._dialog.remove()
modal.modal.dispose()
modal.modal = null
document.body.classList.remove('modal-open');
document.body.style.paddingRight = '';
document.body.style.overflow = '';
if (modal) {
modal.hide();
}
}
}