mapGetters工具函数
来源:互联网 发布:什么是php 编辑:程序博客网 时间:2024/06/12 00:59
来自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 1
- 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中工具函数
- ionic 热更新插件cordova-hot-code-push的实践
- 利用Spring扫包实现发现具体的注解类
- 如何用同一个工程创建两个不同版本的应用
- (POJ3267)The Cow Lexicon <DP>
- BOOST安装或编译
- mapGetters工具函数
- java 中 手机号和身份证号的隐藏替换
- c++中的固定格式用法
- 三分钟HTML5画布(Canvas)动画教程
- oc ARC中NSString* weak与Strong指针问题
- Spring Web mvc Maven实现文件上传
- MySQL临时表
- TensorFlow实现KNN
- auicss下APP底部导航