mapGetters工具函数
来源:互联网 发布:淘宝怎样买岛国资源 编辑:程序博客网 时间:2024/06/01 21:27
来自https://vuefe.cn/vuex/getters.html#mapGetters-工具函数
mapGetters工具函数会将store中的getter映射到局部计算属性中。
import {mapGetters} from ‘vuex’
export default{
computed:{
...mapGetters([
//使用对象扩展操作符把getter混入到computed中
'doneTodosCount',
'anotherGetter',
//...
}
}
如果你要将getter映射为不同的名称,请使用一个对象:
mapGetters({
//映射this.doneCount到store.getters.doneTodosCount
doneCount:'doneTodosCount'
})
阅读全文
0 0
- mapGetters工具函数
- mapGetters工具函数
- 记一次vuex的mapGetters无效原因
- 工具函数
- 工具函数
- 工具函数
- 工具函数
- 工具函数
- 工具函数
- vuex中关于mapState,mapGetters,mapMutations,mapActions的作用
- vuex中的babel编译mapGetters/mapActions报错解决方法
- vuex2中使用mapMutations/mapActions/mapGetters报错解决方法
- webpack打包 vuex ...mapMutations ,...mapGetters报错解决
- vuex中关于mapState,mapGetters,mapMutations,mapActions的作用
- vuex中mapState、mapGetters、mapActions、mapMutations的使用
- 一些工具函数
- 几个java工具函数
- jsf中工具函数
- VirtualBox 未指定要bridged的网络界面
- ElasticSearch5.4.3 环境搭建 2017 (6-IK中文分词插件)
- 为RecyclerView添加下拉刷新(PullToRefresh)功能
- 拼多多2018校招编程题
- 5-2 旅游规划 (25分)
- mapGetters工具函数
- 最全的常用正则表达式大全——包括校验数字、字符、一些特殊的需求
- 使用ActiveMQ进行C++与C#的通信5
- Java线程安全性中的对象发布和逸出
- MyBites学习第一讲,增删改查
- kotlin.NotImplementedError: An operation is not implemented: not implemented
- QBC查询
- php中如何使对象可以像数组一样进行foreach循环
- 在家里如何用两个或多个路由器发射wifi