export default {
  methods: {
    switchNav(item) {
      if (item.name === this.curNav.name) return;

      this.curNav = item;
      this.$router.push({
        name: item.name
      });
    },
    actCurNav(router) {
      this.curNav = this.navs.find(item => item.name === router.name);
    }
  }
};
