1
0
mirror of https://github.com/sahadev/vue-component-creater-ui.git synced 2025-06-07 21:54:05 +08:00

修复el-table在编辑模式下不显示的问题

This commit is contained in:
shangbin 2021-11-09 17:01:55 +08:00
parent 8e801ba1a5
commit bdc944d981

View File

@ -259,12 +259,15 @@ export class MainPanelProvider {
*/
enableEditMode() {
const renderControlPanel = this.getControlPanelRoot();
// 加一个延迟的作用是给el-table这种绘制需要时间的组件留出充足的时间否则会造成el-table渲染不到页面上
setTimeout(() => {
// 这种方式可以禁用原节点所有的事件
const elClone = renderControlPanel.cloneNode(true);
renderControlPanel.parentNode.replaceChild(elClone, renderControlPanel);
this.eventEmitter.emit("mounted", elClone);
// 事件初始化
this.initComonentsEvent();
}, 500);
}
/**