mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
site: solve rebase problems
This commit is contained in:
parent
be2bac4b25
commit
665a4aa3b2
@ -92,21 +92,24 @@ export default class Header extends React.Component {
|
||||
activeMenuItem = activeMenuItem === 'components' ? 'docs/react' : activeMenuItem;
|
||||
|
||||
const locale = this.context.intl.locale;
|
||||
const options = Object.keys(componentsList).map((key) => {
|
||||
const value = componentsList[key];
|
||||
return value.localized ? value[locale] : value;
|
||||
}).filter(({ meta }) => {
|
||||
return /^component/.test(meta.fileName);
|
||||
}).map(({ meta }) => {
|
||||
const pathSnippet = meta.fileName.split('/')[1];
|
||||
const url = `/components/${pathSnippet}`;
|
||||
return (
|
||||
<Option value={url} key={url} data-label={`${(meta.title || meta.english).toLowerCase()} ${meta.subtitle || meta.chinese}`}>
|
||||
<strong>{meta.title || meta.english}</strong>
|
||||
<span className="ant-component-decs">{meta.subtitle || meta.chinese}</span>
|
||||
</Option>
|
||||
);
|
||||
});
|
||||
const options = Object.keys(componentsList)
|
||||
.map((key) => {
|
||||
const value = componentsList[key];
|
||||
return value.localized ? value[locale] : value;
|
||||
})
|
||||
.filter(({ meta }) => {
|
||||
return /^component/.test(meta.fileName);
|
||||
})
|
||||
.map(({ meta }) => {
|
||||
const pathSnippet = meta.fileName.split('/')[1];
|
||||
const url = `/components/${pathSnippet}`;
|
||||
return (
|
||||
<Option value={url} key={url} data-label={`${(meta.title || meta.english).toLowerCase()} ${meta.subtitle || meta.chinese}`}>
|
||||
<strong>{meta.title || meta.english}</strong>
|
||||
<span className="ant-component-decs">{meta.subtitle || meta.chinese}</span>
|
||||
</Option>
|
||||
);
|
||||
});
|
||||
|
||||
const menuStyle = {
|
||||
display: this.state.menuVisible ? 'block' : '',
|
||||
|
@ -49,7 +49,7 @@ export default class MainContent extends React.Component {
|
||||
const text = isTop ?
|
||||
item.chinese || item.english : [
|
||||
<span key="english">{item.title || item.english}</span>,
|
||||
<span className="chinese" key="chinese">{item.subtitle || item.chinese}</span>
|
||||
<span className="chinese" key="chinese">{item.subtitle || item.chinese}</span>,
|
||||
];
|
||||
const disabled = item.disabled;
|
||||
const url = item.fileName.replace(/(\/index)?((\.zh-CN)|(\.en-US))?\.md$/i, '');
|
||||
|
@ -99,9 +99,10 @@ ReactDOM.render(
|
||||
<Route path=":children"
|
||||
onEnter={utils.getEnterHandler(resource)}
|
||||
component={utils.getChildrenWrapper(resource)} />
|
||||
</Route>
|
||||
<Route path="*" component={NotFound} />
|
||||
</Router>
|
||||
</Route>
|
||||
<Route path="*" component={NotFound} />
|
||||
</Route>
|
||||
</Router>
|
||||
</IntlProvider>
|
||||
, document.getElementById('react-content')
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user