<template>
  <div class="client-set">
    <div class="set-navs">
      <div
        :class="[
          'set-navs-item',
          { 'set-navs-item-act': curNav.name === nav.name },
        ]"
        v-for="(nav, index) in navs"
        :key="index"
        @click="switchNav(nav)"
      >
        {{ nav.title }}
      </div>
    </div>

    <router-view />
  </div>
</template>

<script>
import { clientSet } from "@/constants/authority";
import menuMixins from "@/components/homeMenuMixins";

export default {
  name: "client-set",
  mixins: [menuMixins],
  data() {
    return {
      navs: clientSet,
      curNav: {},
    };
  },
  watch: {
    $route: {
      handler(val) {
        this.actCurNav(val);
      },
    },
  },
  mounted() {
    this.actCurNav(this.$route);
  },
  methods: {},
};
</script>
