1.动态菜单配置xxxxxx.vue
<template> <div> </div> </template> <script> import envs from '../../config/env' export default { data () { return { } }, methods: { open(){ window.location.href = 'https://element.eleme.cn/#/zh-CN'; }, }, created () { this.open(); }} </script>
2.静态菜单配置 xxxxx.vue的js配置
let menu = { menus: [ { key: '1', desc: '菜单1', icon: 'iconxxxx', permission: 'xxxxx', subs: [ {key: '/aaa/bbb', desc: '菜单11', permission: 'xxxxx'}, {key: '/aaa/bbb', desc: '菜单12', permission: 'xxxxx'}, {key: '/aaa/bbb', desc: '菜单13', permission: 'xxxxx'}, ] }, { // 需要跳转的外部链接 key: '/xxxxxx/outLink', desc: '外部链接', icon: 'iconxxxx', permission: 'xxxxx', } ] }; export default menu;
主要使用 以下方式跳转外部页面,通过路由到指定页面后,再打开外部页面
window.location.href = 'https://element.eleme.cn/#/zh-CN'