VUE(二)•公共组件

Header.vue






 

Lateral.vue






 

Footer.vue






 

 

APP.vue






 

index.js

import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Home from '@/components/Home'
import Test from '@/components/Test'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'login',
      component: Login,
      meta: {
        keepAlive: false
      }
    },

    {
      path: '/home',
      name: 'home',
      component: Home,
      meta: {
        requireAuth: true,
        keepAlive: true
      }
    },

    {
      path: '/test',
      name: 'test',
      component: Test,
      meta: {
        requireAuth: true,
        keepAlive: false
      }
    },


  ]
})

 

你可能感兴趣的:(#,VUE)