mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 13:47:02 +08:00
site: fix links
This commit is contained in:
parent
07c1ef05d3
commit
90083433b3
@ -38,11 +38,11 @@ export function jsonmlToComponent(pathname, jsonml) {
|
||||
[(node) => getTagName(node) === 'video', (node, index) =>
|
||||
<VideoPlayer video={getAttributes(node)} key={index} />,
|
||||
],
|
||||
[(node) => isElement(node) && getTagName(node) === 'a', (node, index) => {
|
||||
if (getAttributes(node).class ||
|
||||
(getAttributes(node).href && getAttributes(node).href.indexOf('http') === 0)) {
|
||||
return toReactComponent(node);
|
||||
}
|
||||
[(node) => isElement(node) && getTagName(node) === 'a' && !(
|
||||
getAttributes(node).class ||
|
||||
(getAttributes(node).href &&
|
||||
getAttributes(node).href.indexOf('http') === 0)
|
||||
), (node, index) => {
|
||||
return <Link to={getAttributes(node).href} key={index}>{toReactComponent(getChildren(node)[0])}</Link>;
|
||||
}],
|
||||
[(node) => {
|
||||
|
Loading…
Reference in New Issue
Block a user