<template>
  <div class="app-container">
    <div class="layout-content">
      <keep-alive v-if="$route.meta.keepAlive">
        <router-view></router-view>
      </keep-alive>
      <router-view v-else></router-view>
    </div>
    <!--  <div class="layout-footer">
      <TabBar :data="tabbars" @change="handleChange" />
    </div> -->
  </div>
</template>

<script>
/* import TabBar from '@/components/TabBar'; */
export default {
  name: 'AppLayout',
  data() {
    return {
      tabbars: [
        {
          title: '成长',
          to: {
            name: 'Development'
          },
          icon: 'guide-o'
        },
        {
          title: '今日',
          to: {
            name: 'Today'
          },
          icon: 'notes-o'
        },
        {
          title: '洞悉',
          to: {
            name: 'Insight'
          },
          icon: 'apps-o'
        },
        {
          title: '优化',
          to: {
            name: 'Optimize'
          },
          icon: 'diamond-o'
        },
        {
          title: '我的',
          to: {
            name: 'Myself'
          },
          icon: 'user-circle-o'
        }
      ]
    };
  },
  components: {
    /* TabBar */
  },
  methods: {
    handleChange(v) {
      console.log('tab value:', v);
    }
  }
};
</script>
