优秀的编程知识分享平台

网站首页 > 技术文章 正文

ant design pro请问一下点击按钮如何跳转到外部链接?

nanyue 2024-07-18 04:07:08 技术文章 7 ℃

这么写会跳转到/page1/https://github.com,会自动加上page1项目地址,
用window.location.href也是同样会加上项目地址,改如何跳转到外部地址呢?
jumpDetail = (matchId) => {
this.props.dispatch(routerRedux.push({
pathname: '
https://github.com',
}))
}


找到问题了,location.href的地址要带上htttp,我写的www就会跳转到项目地址。多谢了

https://github.com/ant-design/ant-design-pro/issues/5813

天坑,不上github绝对找不到答案

Tags:

最近发表
标签列表