摘要:
需要在App.vue页面的create方法中用sessionStorage 保存下vuex的state created(){ //在页面加载时读取sessionStorage里的状态信息 if (sessionStorage.getItem("store") ) { this.$store.repl 阅读全文
posted @ 2021-11-17 14:22
hjMa
阅读(134)
评论(0)
推荐(0)
摘要:
1. 搭建vue脚手架,安装vuex依赖 npm i vuex -S 2. 项目目录src下新建store目录和index.js文件 import Vue from 'vue' import Vuex from 'vuex' // 让vue使用vuex工具来实现组件之间的数据共享 Vue.use(V 阅读全文
posted @ 2021-11-17 14:15
hjMa
阅读(37)
评论(0)
推荐(0)

浙公网安备 33010602011771号