1.建一个空白的vue文件,添加上如下代码

data() {
  this.$router.go(-1)
  return {}
}
 
2.在需要横屏竖屏切换的页面中加入如下代码:
beforeMount() {
  window.addEventListener('orientationchange', () => {
    this.$router.push({ path: '/空vue的路由地址' })  
  })
}

相关文章:

  • 2021-12-02
  • 2021-12-03
  • 2021-09-30
  • 2022-12-23
  • 2021-07-26
  • 2021-07-18
  • 2022-03-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2021-10-30
相关资源
相似解决方案