如何将vueX中的数据保存到localStorage中
localStorage.setItem('存储的名称',JSON.stringify(state中药存储的数据))实例:localStorage.setItem('jb',JSON.stringify(state.jbnum))将这条语句写在事件后。
·
localStorage.setItem('存储的名称',JSON.stringify(state中药存储的数据))
实例:
localStorage.setItem('jb',JSON.stringify(state.jbnum))
将这条语句写在事件后。
更多推荐
已为社区贡献2条内容
所有评论(0)