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
17607106326 commented
soc221b commented
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 .
17607106326 commented
thank you so much