ClientSet.vue 757 B

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