/**
* Created by Xinhe on 2018/2/9.
*/
<template>
  <div>
    <Nav @menuSelect="menuSelect" :menus="menus"></Nav>
    <router-view/>
  </div>
</template>

<script>
  import components from '../../components/index'
  export default {
    data(){
      return {
        menus:[
          {
            name: 'a',
            path: '/nav/a',
          },
          {
            name: 'b',
            path: '/nav/b',
          },
          {
            name:'c',
            children:[
              {
                name: 'c1',
                path: '/nav/c1',
              },
              {
                name: 'c2',
                path: '/nav/c2',
              },
            ]
          }
        ]
      }
    },
    components,
    methods:{
      menuSelect(key){
        console.log(key)
      }
    }
  }
</script>

<style>
</style>
