pinia-plugin-persistedstate icon indicating copy to clipboard operation
pinia-plugin-persistedstate copied to clipboard

组件外使用代persist的pinia store ,无法持久化

Open jingjingshenye opened this issue 1 year ago • 3 comments

Describe the bug

组件外使用代persist的pinia store ,无法持久化

Reproduction

组件外使用代persist的pinia store ,无法持久化

System Info

组件外使用代persist的pinia store ,无法持久化

Used Package Manager

pnpm

Validations

jingjingshenye avatar Jan 25 '24 05:01 jingjingshenye

Hi, I need a reproduction repo to investigate. But the persistence outside of components should work because subscription is made in detached mode.

prazdevs avatar Jan 25 '24 10:01 prazdevs

我遇到了同样的问题,在组件外使用 pinia store,无法持久化,放到 App.vue 中可以正常持久化。需要的话请见仓库 https://github.com/Zyunchao/vue3-base-admin ,见 router 模块。 @prazdevs

WeChat476fb74d4075f82f5cea8c0464466c1a

Zyunchao avatar Jan 29 '24 01:01 Zyunchao

模块文件:https://github.com/Zyunchao/vue3-base-admin/blob/master/src/router/frontEnd.ts

Zyunchao avatar Jan 29 '24 01:01 Zyunchao