let current = this.$router.history.current; this.activeIndex = current.path; if (current.meta.parent) { this.activeIndex = current.meta.parent; }