vue版本问题:
vue精选版本安装代码 npm install -g @vue/cli@3.11.0 安装3.11.0版本的vue
vuex之store:
在需要使用到的组件添加该js代码
import store from '../store'
并在
export default 中添加 store对象即可引用在store.js中的变量
store.commit('某某函数名'),此方法可调用store.js中的某某函数。
微信扫一扫
vue版本问题:
vue精选版本安装代码 npm install -g @vue/cli@3.11.0 安装3.11.0版本的vue
vuex之store:
在需要使用到的组件添加该js代码
import store from '../store'
并在
export default 中添加 store对象即可引用在store.js中的变量
store.commit('某某函数名'),此方法可调用store.js中的某某函数。
相关推荐