新增一个div
<div class="my-panel gjs-pn-panel ">css
</div>
.my-panel{js
position: absolute;
z-index:4;
right: 0;
top: 40px;
height: calc(100% - 40px);
width: 15%;
}
const myPanel = editor.Panels.addPanel({pannel显示与隐藏代码
id: 'my-panel',
el: '.my-panel',
visible: true,
});
const myPanel = editor.Panels.getPanel('my-panel');
myPanel && myPanel.set('visible', false);//改成true为显示
网友回复