修改vue-cli iframe 目录是url的地址新窗口打开

找到 router 文件夹下 avue-router.js  修改处理路由

 getPath: function (params) {
      let {src} = params;
      let result = src || '/';
      if (isURL(src)) {
        // result = `/myiframe/urlPath?${objToform(params)}`;
        //  console.log(result)
        const newWindow = window.open(result); //新窗口打开
        if (window.focus) {
          newWindow.focus()
        }
         return false;
      }
      // console.log(result)
       return result;
    },

这是我的笨方法 可能不对欢迎指正

posted @ 2020-05-28 11:15  ±小马哥  阅读(646)  评论(0编辑  收藏  举报