zoukankan      html  css  js  c++  java
  • vue router.app.$store undefined

    router.beforeEach((to, from, next) => {
      //这个是路由切换的时候可以获取到值,当前页面刷新获取不到 console.log(router.app.$store)
    //undefined }

    解决方法:router.js

    // Vue.use(Router);  //这行注释,替换下面的代码
    
    //这我也没看懂是什么,你们研究到告诉我
    const routerPush = Router.prototype.push;
    Router.prototype.push = function push(location) {
      return routerPush.call(this, location).catch(error => error);
    };
    交流扣扣:1328542512
  • 相关阅读:
    notebook笔记
    from __future__ import absolute_import
    GUI
    version_info
    函数参数
    None
    exec、eval
    os
    IGeometry接口
    IGeometry接口
  • 原文地址:https://www.cnblogs.com/codeDevotee/p/14957076.html
Copyright © 2011-2022 走看看