first commit

This commit is contained in:
“yuanmengy”
2026-06-10 17:31:01 +08:00
parent a2e7fbdba3
commit 69785c214f
14 changed files with 20262 additions and 5121 deletions

View File

@@ -180,11 +180,17 @@ function createModal({ title, content, onConfirm, confirmText = '确认', cancel
</div>
</div>`;
document.body.appendChild(overlay);
document.body.classList.add('modal-open');
lucide.createIcons({ elements: [overlay] });
const close = () => {
overlay.classList.remove('open');
setTimeout(() => overlay.remove(), 200);
setTimeout(() => {
overlay.remove();
if (!document.querySelector('.modal-overlay')) {
document.body.classList.remove('modal-open');
}
}, 200);
};
overlay.querySelector('.modal-close').addEventListener('click', close);