Reactjs 使用语义UI';s修复了React中的菜单和侧边栏

Reactjs 使用语义UI';s修复了React中的菜单和侧边栏,reactjs,semantic-ui,Reactjs,Semantic Ui,我试图将语义UI的固定菜单和侧边栏与React框架结合使用。我希望实现与语义UI的文档页面(在平板电脑和移动显示器中)相同的结果,在顶部有一个固定的菜单,在切换时有一个覆盖的左侧边栏 我在这里举了一个例子: 它可以工作,但语义UI不喜欢布局,并且在控制台中提供以下错误: Sidebar: Had to add pusher element. For optimal performance make sure body content is inside a pusher element Sid

我试图将语义UI的固定菜单和侧边栏与React框架结合使用。我希望实现与语义UI的文档页面(在平板电脑和移动显示器中)相同的结果,在顶部有一个固定的菜单,在切换时有一个覆盖的左侧边栏

我在这里举了一个例子:

它可以工作,但语义UI不喜欢布局,并且在控制台中提供以下错误:

Sidebar: Had to add pusher element. For optimal performance make sure body content is inside a pusher element
Sidebar: Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag <div class=​"ui inverted left vertical sidebar menu" data-reactid=​".0.0">​…​</div>​
(请参阅JSFIDLE的第四版,我无法发布更多链接,因为代表性较低)


这修复了错误消息,但现在顶部菜单不再是固定的,侧边栏会随着内容一起滚动。我已经尽我所能获得语义用户界面,并做出反应,以便很好地配合,但我显然遗漏了一些东西

我对Ember也有同样的问题,它会生成以下div:

<div data-label="layer-div" style="display: none;"></div>
<div data-label="preview-div" style="pointer-events: none; display: none;"></div> 

。。。在您的内容之前,这会给边栏带来问题,因为内容需要在PUSHER类中进行包装,以便边栏可以在打开时将其推过来

所以,React在pusher类之外添加了一些额外的内容,这就是它所抱怨的

{{!-- Pusher means that the sidebar will push it out of the way --}}
<div class="ui grid pusher">
{{!--Pusher意味着边栏将把它推出--}

如果在pusher类之前有任何内容,除了边栏div之外,您将得到错误。看看你的源代码,你会发现语义用户界面已经创建了第二个推送类来包装react生成的内容。

你有没有这样做过?同样的问题。仍然没有解决办法
{{!-- Pusher means that the sidebar will push it out of the way --}}
<div class="ui grid pusher">