How do I return to the previous page using vuex?

this.$router.back (- 1) in the method when vuex is not used. This returns the previous page. After using vuex, mutations reported an error Cannot read property "back" of undefined

.
methods: {
    release () {
      this.$router.back(-1)
    }
  }
mutations: {
    RELEASE () {
      this.$router.back(-1)  //Cannot read property "back" of undefined
    }
  }
Aug.16,2021

cannot be written this way (Vuex is just state management), you can only use this.$router in * .vue.

Menu