Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

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

external-link 外链的问题 #3171

Closed
yoyoidea opened this issue May 9, 2020 · 8 comments
Closed

external-link 外链的问题 #3171

yoyoidea opened this issue May 9, 2020 · 8 comments

Comments

@yoyoidea
Copy link

yoyoidea commented May 9, 2020

Question(提问)

外链放在外面可以,多级之后会多出‘/’

  {
    path: '/soc',
    component: Layout,
    meta: {
      icon: 'component',
      title: 'SOC'
    },
    children: [
      {
        path: 'src',
        component: () => import('@/views/soc/bsrc'),
        name: 'src',
        meta: { title: 'src' }
      }, {
        path: 'security-scanning',
        component: () => import('@/views/soc/security-scanning'),
        name: 'security-scanning',
        meta: { title: 'securityScanning' }
      },
     //多出斜杠
      {
        path: 'https://github.com/PanJiaChen/vue-element-admin',
        name: 'github-scanning',
        meta: { title: 'githubScanning' }
      }
    ]
  },
 // 没有问题
  {
    path: 'external-link',
    component: Layout,
    children: [
      {
        path: 'https://github.com/PanJiaChen/vue-element-admin',
        meta: { title: 'githubScanning' }
      }
    ]
  },

Steps to reproduce(问题复现步骤)

Screenshot or Gif(截图或动态图)

image

Link to minimal reproduction(最小可在线还原demo)

Other relevant information(格外信息)

  • Your OS:
  • Node.js version:
  • vue-element-admin version:
@PanJiaChen
Copy link
Owner

PanJiaChen commented May 11, 2020

没能重现你的问题,external-link 的判断其实可层级没啥关系。
你能在最新的线上代码中重现你的问题么?

@Minitiai
Copy link

path: '/soc'改成
path: 'soc'试试

@yoyoidea
Copy link
Author

image
image
我用官网最简单的例子,在二级目录中加外链, 也有同样的问题

@PanJiaChen
Copy link
Owner

PanJiaChen commented May 12, 2020

#1870

你确定是最新版本?之前已经处理过这个问题了

@yoyoidea
Copy link
Author

确定 tag是v4.0.0

@yoyoidea
Copy link
Author

yoyoidea commented May 13, 2020

image
而且我并没有设置awaysShow: true

@PanJiaChen
Copy link
Owner

所以你并不是最新版本,把我上面贴的代码,合入你的代码就好了。

@yoyoidea
Copy link
Author

解决了 非常感谢 我一只以为我的是最新版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants