vue路由配置

配置方法一

 import Customerfrom '@/components/Customer/edit.vue'
 routes: [ 
    {
      path:"/Customer/edit",
      name:"Edit",
      redirect:Customer 
    },
]

配置方法二

	{ 
      path: '/Customer/edit',
      name: 'customer',
      component: () => import('@/components/Customer/edit.vue')
    },

路由跳转传值

this.$router.push({ path: "/Customer/edit",query:{id:erpids}}) //vue跳转页面传值
var ids = this.$route.query.id;//vue跳转页面拿值
this.$router.push({ path: "/Customer/edit"}) //vue跳转页面

你可能感兴趣的:(vue路由配置)