0

我在单页应用程序中使用黄金布局。金色布局正常“在新窗口中打开”效果很好(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 中时,当我弹出任何小部件时,整个应用程序都会加载到弹出窗口而不是特定的小部件中。我是否需要一些特定的配置来解决此问题?我怎样才能实现实际的弹出功能。

对此有什么帮助吗?

4

1 回答 1

0

这是与 SPA 一起使用时解决了 GL 问题的 PR。使用来自 github 的最新 js 并重试

https://github.com/deepstreamIO/golden-layout/pull/152

于 2017-01-12T20:06:31.067 回答