feat(tabs): better usage

This commit is contained in:
ZhenShuo Leo
2025-12-01 20:48:12 +08:00
parent 20044af981
commit eda9fc9bc3
7 changed files with 173 additions and 214 deletions

View File

@@ -34,8 +34,8 @@ function activateTab(container, activeIndex) {
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', initTabs);
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", initTabs);
} else {
initTabs();
}