fallback is a common function, so I encapsulated it as a global function
//assetes/global.js
import Vue from "vue"
import Router from "vue-router";
Vue.use(Router)
export default({
//
back:function(){
this.$router.go(-1); //
},
})
error message is Cannot read property "go" of undefined
so I wrote it differently:
Router.$router.go(-1);
still report an error, how to solve it?