fix(modal): route refresh modal through runtime

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-04 23:28:13 +08:00
co-authored by Claude Fable 5
parent d79b063bf9
commit bdfe3a461d
3 changed files with 53 additions and 93 deletions
+6
View File
@@ -136,6 +136,10 @@
var bottom = options.bottom === true || (options.mobileBottom !== false && isMobile());
var heightStyle = options.height ? "min-height:" + parseInt(options.height, 10) + "px;" : "";
var initialHtml = options.html !== undefined ? options.html : skeleton(options);
var titleId = "aksrt-modal-title-" + String(sequence + 1);
var titleHtml = options.title
? '<header class="aksrt-remote-modal__header"><h3 class="aksrt-remote-modal__title" id="' + titleId + '">' + escapeHtml(options.title) + '</h3><button type="button" class="aksrt-remote-modal__close" data-aksrt-modal-close aria-label="关闭">&times;</button></header>'
: "";
shell.className =
"aksrt-remote-modal" +
@@ -143,10 +147,12 @@
(options.className ? " " + options.className : "");
shell.setAttribute("role", "dialog");
shell.setAttribute("aria-modal", "true");
if (options.title) shell.setAttribute("aria-labelledby", titleId);
shell.setAttribute("tabindex", "-1");
shell.innerHTML =
'<div class="aksrt-remote-modal__overlay" data-aksrt-remote-modal-close></div>' +
'<div class="aksrt-remote-modal__dialog" style="' + heightStyle + '">' +
titleHtml +
'<div class="aksrt-remote-modal__content">' + initialHtml + "</div></div>";
var session = {