Closed kimsupin closed 1 year ago
Vue.$router
is not a thing, there's no such feature/API. The prototype extension is making the router available in all components as this.$router
, so that code is fine and correct the way it is.
If you need to access it outside of a compoent, you can do so by either just importing the router instance from where you created it, or accessing Vue.prototype.$router
Version
3.6.0
Steps to reproduce
What is expected?
What is actually happening?
undefined
I check vue-router/install.js
I think it's gonna work to write this.
new attributes is need to be assigned Vue, not Vue.property.