当前位置:网站首页>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)
})
}
}
边栏推荐
- C#去水印软件源代码
- JVM学习——2——内存加载过程(类加载器)
- 产品说明丨如何使用MobPush快速创建应用
- Zhaoqi Technology Innovation High-level Talent Entrepreneurship Competition Platform
- 网络工程师的背包(EDC总结推荐)
- Lilac Garden
- Community News——Congratulations to Dolphin Scheduling China User Group for 9 new "Community Administrators"
- LeetCode_2598_剑指Offer Ⅱ 091.粉刷房子
- 程序员=加班??——掌握时间才能掌握人生
- 华为云DevCloud获信通院首批云原生技术架构成熟度评估的最高级认证
猜你喜欢
不爱生活的段子手不是好设计师|ONES 人物
嵌入式开发:嵌入式基础——使用指针数组映射外设
软件测试用例篇
web安全入门-Kill Chain测试流程
【教程】HuggingFace的Optimum组件已支持加速Graphcore和英特尔Habana芯片
A test tool for ABAP Development Tool custom service endpoint
关于“算力”,这篇文章值得一看
Oracle database backup DMP file is too big, what method can be split into multiple DMP when backup?
易基因|深度综述:m6A RNA甲基化在大脑发育和疾病中的表观转录调控作用
xlink解读
随机推荐
关于async\await 的理解和思考
一文让你快速了解大小端概念!
不爱生活的段子手不是好设计师|ONES 人物
5G NR MIB Detailed Explanation
第贰章模块大全之《 collections模块》
Detailed understanding of all built-in functions (Part 2)
NPM - Cannot read properties of null (reading 'pickAlgorithm') 解决方案
scala集合
scala basics
fastposter v2.9.1 programmer must-have poster generator
Opencv 图像超像素分割(SLIC、SEEDS、LSC)
Servlet简单项目操作
TCP为什么是三次握手和四次挥手?
【服务器数据恢复】raid5崩溃导致lvm信息和VXFS文件系统损坏的数据恢复案例
Ameya360成为稳先微电子中国区域授权代理!
fuse简介
5G NR MIB详解
一个 ABAP 开发的新浪微博语义情感分析工具
网络工程师的背包(EDC总结推荐)
Yann LeCun转推:参数减少50倍,性能还更好,MetaAI推出Atlas信息检索模型