<template>
  <div class="mark-home home">
    <div class="home-header">
      <view-header>
        <div class="home-navs" slot="info">
          <ul>
            <li
              :class="{ act: curNav.name === nav.name }"
              v-for="(nav, index) in navs"
              :key="index"
              @click="switchNav(nav)"
            >
              <span class="nav-item-cont">{{ nav.title }}</span>
            </li>
          </ul>
        </div>
      </view-header>
    </div>

    <div class="home-body">
      <div class="home-main">
        <router-view />

        <view-footer></view-footer>
      </div>
    </div>
  </div>
</template>

<script>
import { navs } from "@/routers/mark";
import menuMixins from "@/components/homeMenuMixins";

export default {
  name: "mark-home",
  mixins: [menuMixins],
  data() {
    return {
      navs,
      curNav: {}
    };
  },
  mounted() {
    const router = this.$route.matched.filter(item => item.name !== "Mark")[0];
    this.actCurNav(router);
  },
  methods: {}
};
</script>
