How does vue-router get the active routing elements when the component is initialized?

is to get the element with router-link-active class name, which can be obtained through dom operation. I would like to ask if there is a vue method?

  created() {
    this.$nextTick(() => {
      let activeElement = document.querySelector(".router-link-active")
    })
  }

mounted () {console.log (this.$route.matched)}

Menu