将页面文件创建在views文件夹
在router目录的index.ts文件里填写路径

const routes: Array<RouteConfig> = [{path: '/', // 根目录自动跳转/moneyredirect: '/money'},{path: '/money',component: Money},{path: '/labels',component: Labels},{path: '/statistics',component: Statistics}];
使用router-view显示页面,router-link跳转
<template><div><router-view/><hr><router-link to="/labels">标签</router-link> |<router-link to="/money">记账</router-link> |<router-link to="/statistics">统计</router-link></div></template>
将导航栏注册为全局组件
import Nav from '@/components/Nav.vue';Vue.component('Nav', Nav)
添加404页面
在路由最后面添加路径,路由时从上到下一次判断的
{path: '*',component: NotFound}
fixed还是flex?
手机上千万不要用fixed
Vue
