使用vue-router,以下url可以正常定位到我的页面:
http://localhost:8080/#/contactIndex
但是,在弹窗组件中的成功回调函数中,因为用不了vue-router,我使用以下url:
window.location.href = '/contactIndex'
不能正常跳转到上面的这个页面,请问如何修改能够正常跳转到上面的页面?
使用vue-router,以下url可以正常定位到我的页面:
http://localhost:8080/#/contactIndex
但是,在弹窗组件中的成功回调函数中,因为用不了vue-router,我使用以下url:
window.location.href = '/contactIndex'
不能正常跳转到上面的这个页面,请问如何修改能够正常跳转到上面的页面?
不能使用路由的跳转函数吗
this.$router.push({path:'/contactIndex'})
不行的话
window.location.hash = "#/contactIndex"
9 回答1.7k 阅读✓ 已解决
6 回答1.5k 阅读
3 回答1.4k 阅读✓ 已解决
4 回答1.3k 阅读✓ 已解决
3 回答1.1k 阅读
2 回答1.2k 阅读✓ 已解决
3 回答1.3k 阅读✓ 已解决
可以写个绝对链接: