React Ant design 中新开一个新的浏览器标签页window.open
window.open('新的标签页的内容')
如果直接写www.baidu.com的话,会出错,会在原有的路由路径中拼接上新的url
如果浏览器中url显示http://172.16.3.111:8000/chat/chatBot/index
在使用window.open('www.baidu.com')后,新开的页面url为:http://172.16.3.111:8000/chat/chatBot/www.baidu.com
这个显然不是想要的,需要使用在url中http的头
所以需要.
原创
2021-09-03 10:57:56 ·
2278 阅读 ·
0 评论