栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > Web开发 > Vue.js

Vuex笔记(状态管理)

Vue.js 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Vuex笔记(状态管理)

Vuex笔记(状态管理) State. Creating a singleton state tree shared in whole application. We can only mutate store’s state in commit. Getters(类似计算属性) Sometimes we may need to compute derived state based on store state and used in multiple.(计算衍生状态并且在多处被反复用到,例如过滤器) Mutations(同步) The only way to actually change state in a Vuex store is by committing a mutation. Actions(可为异步) Actions are similar to mutations, the differences being that:
  • Instead of mutating the state, actions commit mutations.
  • Actions can contain arbitrary asynchronous operations.
Modules Dealing with bloated state tree.

To help with that, Vuex allows us to divide our store intomodules. Each module can contain its own state, mutations, actions, getters, and even nested modules

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/240612.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号