/
用户提供:
const {match} = this.props;
let len = match.url.length;
match.url = (match.url[len - 1] === "/") ? match.url.substring(0, len-1) : match.url;
...
pages.map(page =>
<Link to={match.url+'/'+page.id()+'/info'}>
Go to info page for {page.title()}
</Link>)
或者,如果您可以添加缺失:
match.url = (match.url[len - 1] === "/") ? match.url : match.url + "/";
pages....
<Link to={match.url + page.id() ....}
...