add.vue 怎么添加,我看了好多遍,也不行。http://localhost:8080/add 我刷不出来
http://localhost:8080/add 我刷不出来,有其他的源代码吗?还有标题和文章怎么分离的。
http://localhost:8080/add 我刷不出来,有其他的源代码吗?还有标题和文章怎么分离的。
2019-11-02
import Vue from 'vue' import VueRouter from 'vue-router' import Login from "../views/Login"; import Home from "../views/Home"; import Add from "../views/Add"; Vue.use(VueRouter) const routes = [ { path: '/', name: 'login', component: Login }, { path: '/home', name: 'home', component: Home, children: [ { path: 'list', name: 'list', component: () => import(/* webpackChunkName: "about" */ '../views/List.vue') }, { path: 'user', name: 'user', component: () => import(/* webpackChunkName: "user" */ '../views/User.vue') } ] }, { path: '/add', name: 'add', component: Add } // { // path: '/about', // name: 'About', // // route level code-splitting // // this generates a separate chunk (about.[hash].js) for this route // // which is lazy-loaded when the route is visited. //component: () => import(/* webpackChunkName: "list" */ '../views/About.vue') // } ] const router = new VueRouter({ mode: 'history', base: process.env.BASE_URL, routes }) export default router
举报