ClientSet.vue 813 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <div class="client-set">
  3. <div class="set-navs">
  4. <div
  5. :class="[
  6. 'set-navs-item',
  7. { 'set-navs-item-act': curNav.name === nav.name },
  8. ]"
  9. v-for="(nav, index) in navs"
  10. :key="index"
  11. @click="switchNav(nav)"
  12. >
  13. {{ nav.title }}
  14. </div>
  15. </div>
  16. <router-view />
  17. </div>
  18. </template>
  19. <script>
  20. import { clientSet } from "@/constants/authority";
  21. import menuMixins from "@/components/homeMenuMixins";
  22. export default {
  23. name: "client-set",
  24. mixins: [menuMixins],
  25. data() {
  26. return {
  27. navs: clientSet,
  28. curNav: {},
  29. };
  30. },
  31. watch: {
  32. $route: {
  33. handler(val) {
  34. this.actCurNav(val);
  35. },
  36. },
  37. },
  38. mounted() {
  39. this.actCurNav(this.$route);
  40. },
  41. methods: {},
  42. };
  43. </script>