mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 11:39:28 +08:00
site: fix url
This commit is contained in:
parent
5308308df9
commit
3f7cf472de
@ -52,10 +52,13 @@ export default class Header extends React.Component {
|
||||
|
||||
const options = Object.keys(componentsList).map((key) => {
|
||||
return componentsList[key];
|
||||
}).filter(({ meta }) => {
|
||||
return /^component/.test(meta.fileName);
|
||||
}).map(({ meta }) => {
|
||||
const url = `/components/${meta.english.toLowerCase()}`;
|
||||
const pathSnippet = meta.fileName.split('/')[1];
|
||||
const url = `/components/${pathSnippet}`;
|
||||
return (
|
||||
<Option value={url} key={url}>
|
||||
<Option value={url} key={url} data-label={`${meta.english} {meta.chinese}`}>
|
||||
<strong>{meta.english}</strong>
|
||||
<span className="ant-component-decs">{meta.chinese}</span>
|
||||
</Option>
|
||||
@ -86,6 +89,7 @@ export default class Header extends React.Component {
|
||||
dropdownClassName="component-select"
|
||||
searchPlaceholder="搜索组件..."
|
||||
optionLabelProp="nothing"
|
||||
optionFilterProp="data-label"
|
||||
onSelect={this.handleSearch.bind(this)}>
|
||||
{options}
|
||||
</Select>
|
||||
|
Loading…
Reference in New Issue
Block a user