![](https://img-blog.csdnimg.cn/0dee2f939ac540c99c642a3ec5b34771.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Vuex
vuex 基础知识
❉晴雪❉
学习笔记
展开
-
EventBus 的使用
EventBus 的使用原创 2022-08-21 12:38:33 · 260 阅读 · 0 评论 -
vuex 的五个核心选项 State Getters Mutations Actions Modules
2、总共三个组件 父组件 两个子组件 两个子组件分别 引入 父组件中3、组件分别为:father 父组件、add 子组件、 sub 子组件访问 State 的数据通过原型链方式 :在 store index.js 文件 state 定义 num 基础数据state: { num: 0}在 add 子组件 模板{{$store.state.num}} // 原型链访问访问 state 的数据 通过 mapState 影射函数模板:{{num}}imp原创 2022-08-21 12:19:17 · 80 阅读 · 0 评论