摘要:
import { mapMutations,mapGetters } from 'vuex' mutations: { incrementCount(state){ return state.count+=1; }, // decrementCount(state,n){ // return sta
阅读全文
posted @ 2020-08-23 20:24
心意如水hucuie22
阅读(328)
推荐(0)
编辑
摘要:
import { mapGetters } from 'vuex' getters应用场景:对数据进行过滤,从state里面抽离出来,state: { count: 0, list: [{ id: "1", name: "hucuie", ishow: true }, { id: "2", name
阅读全文
posted @ 2020-08-23 19:07
心意如水hucuie22
阅读(672)
推荐(0)
编辑
摘要:
恢复内容开始 mapState的用法 export default new Vuex.Store({ state: { count: 0, list: [{ id: "11", name:"hucuie" }, { id: "12", name:"hucuie" }, ] }, mutations:
阅读全文
posted @ 2020-08-23 15:43
心意如水hucuie22
阅读(249)
推荐(0)
编辑