-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Labels
enhancementNew feature or requestNew feature or request
Description
希望可以支持rematch, 现在写rematch可以用,就是直接写一个方法
inc () {
this.$store.dipatch.count.increment()
}computed 倒是没问题,actions写法,原生的redux写法用rematch好像不行,我自己简单改了下extend/redux里的这里
toAction && Object.keys(toAction).forEach(k => {
let act = toAction[k];
toAction[k] = function (...args) {
// this.$store.dispatch(act.apply(null, args));
this.$store.dispatch({type: act, payload: args});
};
});然后用
actions: {
'inc': 'count/increment',
'dec': 'count/decrement',
'up': 'count/up',
'addToCart': 'cart/add',
}这种写法倒是可以运行
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request