家庭记账本1

把学到的vue2知识和springboot知识用来实战一下

先确定路由导航和目录结构

目录结构

 导航路由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

 

posted on 2024-02-21 23:21  Daniel350  阅读(6)  评论(0编辑  收藏  举报