当前位置:网站首页>h5开容器,新页面返回遇到的问题
h5开容器,新页面返回遇到的问题
2022-08-10 15:35:00 【LILEILEILOVE】
h5调用的原生方法开启新的页面,导致路由历史记录缺失
在新页面中判断路由是否缺失
created(){
if(window.history.length === 0){
this.$router.push({
path:"/reload"})
}
新增一个路由作为第一个路由记录
export default{
beforeRouteEnter(to,from,next){
next(vm=>{
vm.$router.replace(from.fullPath)
})
}
}
边栏推荐
- Zijin Example
- 异地多活方法论
- $'\r': command not found
- MySQL批量更新与批量更新多条记录的不同值实现方法
- fastposter v2.9.1 programmer must-have poster generator
- 哈希表应用:只出现一次的数字
- FP6378AS5CTR SOT - 23-5 effective 1 mhz2a synchronous buck regulator
- Chapter II Module Encyclopedia "collections Module"
- APP automation testing with Uiautomator2
- Rich Dad Poor Dad Reading Notes
猜你喜欢
随机推荐
【每日一题】【leetcode】26. 链表-链表中倒数第k个节点
[Data warehouse design] Why should enterprise data warehouses be layered?(six benefits)
IPC:Interrupts and Signals
程序员=加班??——掌握时间才能掌握人生
Yi Gene|In-depth review: epigenetic regulation of m6A RNA methylation in brain development and disease
请查收 2022华为开发者大赛备赛攻略
商业版SSL证书
Chapter II Module Encyclopedia "collections Module"
NPM - Cannot read properties of null (reading 'pickAlgorithm') 解决方案
易观千帆银行用户体验中心:聚焦银行APP用户体验
一文带你了解 HONOR Connect
多线程面试指南
2025年推出 奥迪透露将推出大型SUV产品
scala basics
Mini Program-Voice broadcast function
Exchange Online审计和监控
产品说明丨如何使用MobPush快速创建应用
Brainstorm: Goals and
xlink解读
Redis -- Nosql