Why can"t sessionstorage be read in computed but can be read in mounted?
Why can"t sessionstorage be read in computed but can be read in mounted?
when I test computed locally, it's worth it. The code had better send it out and have a look (it may be the wrong time to take a value). In addition, mounted can assign a value to a variable
.this.data = sessionStorage['data']
in computed
return this.data
Is the variable set in computed not called
?Previous: A problem of this in class
Next: How to name two kinds of division of the same axis of Echarts respectively?
problem description I use the stomp.js plug-in to operate websocket in vue. After connecting, I store the object of stomp in sessionstorage to prevent users from refreshing the browser and losing this object the environmental background of the probl...