我在单页应用程序中使用黄金布局。金色布局正常“在新窗口中打开”效果很好(https://jsfiddle.net/shafaq_kazmi/xs5r6mma/6/)
var myLayout = new GoldenLayout({
content: []
}, $('#layoutContainer'));
myLayout.registerComponent('example', function(container, state) {
container.getElement().html('<h2>Hello World</h2>');
});
myLayout.createDragSource($("#button"), {
type: 'component',
componentName: 'example',
componentState: {
text: 'Button'
}
});
myLayout.init();
但是当我试图将它集成到 SPA 中时,当我弹出任何小部件时,整个应用程序都会加载到弹出窗口而不是特定的小部件中。我是否需要一些特定的配置来解决此问题?我怎样才能实现实际的弹出功能。
对此有什么帮助吗?