import {mapState} from 'vuex'export default { data(){ return { oldData: 0 } } computed: mapState({ count: state => state.count, newData(){ return this.oldData + 1; } })}
vuex當中state通過mapState映射到computed后,原來的計算屬性要怎么寫呢?
拉莫斯之舞
2018-11-14 14:14:25