我正在开发一个反应应用程序,我最近开始使用语义 ui 反应模块。
不幸的是,我无法使 Tab 对象响应...
显示这一点的一个非常简单的脚本是:
import React from 'react'
import { withRouter } from 'react-router-dom'
import {Tab} from 'semantic-ui-react';
// import NavSection from './NavSection'
var sections = ["SectionA","SectionB","SectionC","SectionD","SectionE","SectionF"]
const NavigatorHeader = () => (
<div>
<h1>Navigator</h1>
<div>
<Tab menu={{ pointing: true }} panes={getPanes(sections)} />
</div>
</div>
)
export default withRouter(NavigatorHeader)
function getPanes(sections){
return sections.map( function(section){
return {
menuItem: section,
render: () =>
<Tab.Pane attacched="false">
<div>
<p>
Some Text that we can change tab from tab. E.g. with the title: <b>{section}</b>
</p>
</div>
</Tab.Pane>
}
})
}
选项卡看起来很棒,内联,但如果我缩小屏幕,它们就会溢出,而我原以为它们会移动到第二行。
看起来这来自我正在使用的 Selenium-ui css ( https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.3.1/semantic.min.css )。当前版本是 2.3.1 但如果我回去使用 2.0.0 之前的版本,它是响应式的.. 有没有办法获得与新版本相同的行为?
谢谢,米歇尔。谢谢,米歇尔。