顶部链接-外链

This commit is contained in:
caishi 2021-04-26 18:20:04 +08:00
parent 0717ec8fbb
commit 523c8b36e4
1 changed files with 8 additions and 1 deletions

View File

@ -35,7 +35,14 @@ function Nav({ users, headData , successFunc , quitFunc , match }){
{
navs && navs.length>0 && navs.map((i,k)=>{
return(
<li><Link to={i.link} className={i.link===(match && match.url) ? "color-blue":""}>{i.name}</Link></li>
<li>
{
i.link.indexOf("http") > -1 ?
<a href={i.link} target="_blank">{i.name}</a>
:
<Link to={i.link} className={i.link===(match && match.url) ? "color-blue":""}>{i.name}</Link>
}
</li>
)
})
}