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

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