vuex存数据,防止刷新数据丢失
created () { // 在页面加载时读取sessionStorage里的状态信息 if (sessionStorage.getItem('store')) { this.$store.replaceState( Object.assign( {}, this.$store.state, JSON.parse(sessionStorage.getItem('store')) )..
原创
2021-11-10 13:22:31 ·
189 阅读 ·
0 评论