我使用Vue-auth包对我的vue-cli应用程序进行身份验证。一切正常,但是当我在vue操作中访问这段代码时,它返回undefined。有什么想法吗?
const AuthService = {
test(data) {
console.log(this.$auth)
},
}发布于 2019-03-12 17:28:27
您可以通过Vue.auth属性访问包的身份验证实例。
import Vue from 'vue'
const AuthService = {
test(data) {
console.log(Vue.auth)
},
}https://stackoverflow.com/questions/55113702
复制相似问题