把学到的vue2知识用来实战一下
先确定路由导航和目录结构
目录结构
导航路由index.js
import Vue from 'vue' import VueRouter from 'vue-router' import HomeView from '../views/HomeView.vue' import AboutView from '@/views/AboutView' import NoteUpdate from '@/views/NoteUpdate' import NoteAdd from '@/views/NoteAdd' import Login from '@/views/Login' Vue.use(VueRouter) const routes = [ { path: '/', component: Login, }, { path: '/about', name: 'about', component:AboutView, }, { path:'/noteUpdate', component:NoteUpdate, }, { path:'/noteAdd', component:NoteAdd, }, { path:'/home', component:HomeView, } ] const router = new VueRouter({ routes }) export default router
标签:views,component,家庭,开发,记账,NoteUpdate,VueRouter,path,import From: https://www.cnblogs.com/daniel350-wang/p/18036089