解雇出store中的数据,在set数据后,不会重新渲染页面 #2520
Unanswered
chenJJ-88
asked this question in
Help and Questions
Replies: 1 comment
-
解构会失去响应式,使用storeToRefs保持响应式 |
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
-
我从store中解构出userinfo 和 一个setUserInfo方法
我在页面中使用他
然后用户点击修改信息后会重新setUserInfo 最新的数据进store ,但是我userInfo.username 不会改变,必须刷新一下页面才会变成最新值,但是我如果采用以下写法,不结构直接使用就可以,这是为什么呢
Beta Was this translation helpful? Give feedback.
All reactions