vue添加路由

login.vue文件

index.js文件
import Vue from ‘vue’
import VueRouter from ‘vue-router’
import login from ‘../components/login’

Vue.use(VueRouter)
const routes = [
{
path: ‘/’,
name: ‘login’,
component: login
}
]

const router = new VueRouter({
routes
})

export default router
app块内添加

222333

《vue添加路由》有2条留言

留下评论