vue,后台前端使用了左右通用布局,有一个页面不想嵌套通用布局怎么办

 

src/router/index.js

const _import = require('./import-views')
// 全局路由(无需嵌套上左右整体布局)
const globalRoutes = [
  { path: '/404', component: () => import('@/views/common/404'), name: '404', meta: { title: '404未找到' } },
  { path: '/login', component: () => import('@/views/common/login'), name: 'login', meta: { title: '登录' } },
  { path: '/template/template-editor', component: () => import('@/views/modules/template/template-editor'), name: 'editor', meta: { title: '模板设计' } },//zjh add 在新窗口中打开设计器,无左导航
]

  

在某个组件中,添加一个跳转

<router-link to="/template/template-editor" target="_blank">跳转</router-link>

  

这样打开的时候,就在新的浏览器标签页,并且没有左导航

posted @ 2023-12-13 09:17  牛大胆V5  阅读(57)  评论(0)    收藏  举报