From 5da16ee5a02a7123e01ad711be2f2ef03c59d138 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 25 Sep 2024 13:25:43 +0800 Subject: [PATCH] * [task#129160,done,2h] fix js error. --- module/editor/js/index.ui.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/editor/js/index.ui.js b/module/editor/js/index.ui.js index 497f3af2da..6ab70fd44c 100644 --- a/module/editor/js/index.ui.js +++ b/module/editor/js/index.ui.js @@ -1,7 +1,9 @@ window.initModuleTree = function() { + $('#moduleTree').replaceWith(''); + $('#extendWin').attr('src', '') data = appendClickEvent(moduleTree); - zui.create("tree", "#moduleTree", {items: data}); + tree = new zui.Tree("#moduleTree", {items: data}); }; window.appendClickEvent = function(moduleTree) @@ -26,4 +28,4 @@ window.openInExtend = function(event, node) $this.closest('li.tree-item.has-nested-menu').addClass('active'); }; -initModuleTree(); +window.waitDom('#moduleTree', initModuleTree);