<template>
  <div class="page">
    <div class="top">
      <div class="logo">我是logo</div>
      <!-- 住菜单 -->
      <menuZj :menu="menu" :menuIndex="menuIndex"></menuZj>
    </div>

    <!-- 主显示区域 -->
    <div class="main">
      <VueScroll>
        <!--
          <keep-alive> 包裹动态组件时，会缓存不活动的组件实例，而不是销毁它们
          当组件在 <keep-alive> 内被切换，它的 activated 和 deactivated 这两个生命周期钩子函数将会被对应执行。
        -->
        <keep-alive v-if="$route.meta.keepAlive || $route.meta.keepAlive === undefined">
          <router-view></router-view>
        </keep-alive>
        <router-view v-else></router-view>
      </VueScroll>
    </div>
  </div>
</template>


<script>
  import main from '@assets/js/main'
  export default main
</script>

<style lang="scss" scoped>
  @import "@assets/css/main.scss";
</style>
