首页 > 其他 > 详细

Vue 路由

时间:2020-12-16 18:54:06      阅读:24      评论:0      收藏:0      [点我收藏+]

 

import { createRouter, createWebHistory } from ‘vue-router‘

import cnp1 from ‘cnp1‘
import cnp2 from ‘cnp2‘


const routes = [
  {
    path:‘‘,
    name:‘‘,
    component: cnp1,
  },
  {
    path:‘‘,
    name:‘‘,
    component: cnp2,
    children:[
      {
        path:‘‘,
        name:‘‘,
        component: cnp2-1,
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router

 

技术分享图片

Vue 路由

原文:https://www.cnblogs.com/zs96/p/14144323.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!