前端dist包放到后端项目打成一个 jar 包运行时,页面刷新后,pinia的持久化的数据会丢失,是什么问题? #2442
Unanswered
lixian207
asked this question in
Help and Questions
Replies: 1 comment
-
考虑将路由方式改为hash,或者修改nginx配置 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
持久化代码:
页面未刷新前一切正常:

页面刷新后,sessionstorage的数据丢失:

这是什么原因造成的?
如果前端单独使用 nginx 部署,刷新后,pinia的持久化的数据不会丢失,是 pinia 依赖什么环境吗?
Beta Was this translation helpful? Give feedback.
All reactions