OnlineJudgeFE icon indicating copy to clipboard operation
OnlineJudgeFE copied to clipboard

用户设置页面刷新后数据丢失

Open jesHrz opened this issue 4 years ago • 0 comments

在 Profile 界面,从别的页面切换到 Profile 的时候是可以正常显示数据,但是在这个页面按F5刷新一下数据就丢了

问题重现:

image

image

代码定位

https://github.com/QingdaoU/OnlineJudgeFE/blob/master/src/pages/oj/views/setting/children/ProfileSetting.vue#L139-L144

在该段代码中,如果从别的页面跳转而来,this.$store.state.user.profile 是可以取到正确的内容,但是在当前页面刷新后返回的是一个observer的对象,然后导致数据丢失

jesHrz avatar Sep 29 '20 06:09 jesHrz