Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
尝试优化卡顿
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou-hao committed Oct 17, 2018
1 parent 526a6d8 commit 22e1b46
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions hsweb-ui/admin/form/designer-drag/designer.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,10 @@
} else {
$(".main-panel").append(component.render());
}
reloadMiniui();
initComponentList();
setTimeout(function () {
reloadMiniui();
initComponentList();
}, 10);
return component;
};

Expand Down Expand Up @@ -336,7 +338,9 @@
// initPropertiesEditor(component);
me.doEvent("configChanged", me);
me.nowEditComponent = component;
mini.parse();
window.setTimeout(function () {
mini.parse();
}, 1)
if (component.onInit) {
component.onInit();
}
Expand All @@ -350,7 +354,9 @@
item.replaceWith(children);
initDroppable();
children.find('.form-label,legend,input,.component-info,.edit-on-focus').first().click();
initComponentList();
window.setTimeout(function () {
initComponentList();
}, 1)
}
},
connectWith: ".component"
Expand Down

0 comments on commit 22e1b46

Please sign in to comment.