添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
瘦瘦的钢笔  ·  用于 TCR-pMHC ...·  1 年前    · 
聪明的风衣  ·  SteamVR 2.0 ...·  2 年前    · 
淡定的松树  ·  shell定义列表-掘金·  2 年前    · 

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account
  • 在router核心文件内填写重定向配置,如{ path: "*", redirect: "/home" },重定向至home.vue。
  • 在home.vue页面组件的created等初始化生命周期函数中写入window.location.href="指定网站"或window.open(指定网站)。
  • 在APP.vue中的created生命周期函数中写入window.location.href="指定网站"或window.open(指定网站)。
  • 在浏览器地址输入框输入 http://localhost:8080并按下回车。
    结果:先执行home.vue生命周期函数created中的重定向代码。而其他相关逻辑则是先执行APP.vue生命周期created中的代码再执行home.vue中的逻辑。
  • What is expected?

    执行APP.vue的重定向代码

    What is actually happening?

    执行home.vue中的重定向代码

    home being mounted after App, its code gets executed later. This is normal but the order is definitely not something you should rely on to execute side effects

    Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum , the Discord server or StackOverflow .