soc221b/pinia-plugin-persistedstate-2

It can only be used in the vue file, not in the ts file, and there is no way to persist it in the ts file

17607106326 opened this issue · 2 comments

It can only be used in the vue file, not in the ts file, and there is no way to persist it in the ts file
2022618121822
This can be written to be persistent。
2022618122048
This write cannot be persisted。

It's not a bug, the way you're using it in the first image works because it's in the setup context (<script setup>) , but the second image isn't.

Please check this: https://pinia.vuejs.org/core-concepts/outside-component-usage.html .

thank you so much