//main.js
//错误的写法
import router from "./router";
router.beforeEach((to, from, next) => {
//this.$localStorage.set("token","123123")
console.log(this
TypeError: Cannot read property '$localStorage' of undefined
最新推荐文章于 2024-06-13 11:04:31 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)