vbenjs / vben3

Next-generation Vben framework
https://vben.mufei88.com/
MIT License
556 stars 153 forks source link

store里面的user爆红,再其他页面使用里面的方法使用不了 #224

Closed pzzyf closed 1 year ago

pzzyf commented 1 year ago
image
likui628 commented 1 year ago

跟这段代码有关系

 persist: {
    paths: ['userInfo', 'accessToken', 'roles'],
  },

https://github.com/prazdevs/pinia-plugin-persistedstate

pzzyf commented 1 year ago

看了,他那边持久化是正常使用的

pzzyf commented 1 year ago
image image image
adoin commented 1 year ago

类型修复了,无法重现无法调用问题,比如lock-page组件试了 使用logout成功。 类型修复的PR 已推

likui628 commented 1 year ago

https://github.com/vbenjs/vben3/pull/229 类型问题好了

pzzyf commented 1 year ago

报错是由于pinia.d.ts文件没用配置pinia库的类型声明 https://github.com/vbenjs/vben3/pull/229