Skip to content

Commit 3aa2f51

Browse files
committed
* proj: initialize zui component on libPage load, enhancing dynamic content rendering and interactivity.
1 parent 20cbf2f commit 3aa2f51

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ if (import.meta.hot) {
5555
const libPage = document.getElementById('libPage');
5656
if (libPage) {
5757
libPage.innerHTML = data.content;
58+
59+
if ((window as unknown as {$: (element: Element) => ({zuiInit: () => void})}).$) {
60+
(window as unknown as {$: (element: Element) => ({zuiInit: () => void})}).$(libPage).zuiInit();
61+
}
62+
5863
libPage.classList.add('is-loaded');
5964
document.dispatchEvent(new CustomEvent('dev-page-update', {detail: {libName: data.libName}}));
6065
}

0 commit comments

Comments
 (0)