Liucw 9 лет назад
Родитель
Сommit
72e3af4e18
2 измененных файлов с 4 добавлено и 4 удалено
  1. 2 2
      docs/en/actions.md
  2. 2 2
      docs/zh-cn/actions.md

+ 2 - 2
docs/en/actions.md

@@ -181,7 +181,7 @@ If you write the action with ES6 destructuring style, make sure that the first a
 ```javascript
 import {callee} from './anotherActionModule'
 
-export const caller = ({dispatch, state, watch}) {
+export const caller = ({dispatch, state, watch}) => {
   dispatch('MUTATION_1')
   callee({state, watch})
 }
@@ -192,7 +192,7 @@ Otherwise, you should use the old-fashioned function syntax:
 ```javascript
 import {callee} from './anotherActionModule'
 
-export const caller = (store) {
+export const caller = (store) => {
   store.dispatch('MUTATION_1')
   callee(store)
 }

+ 2 - 2
docs/zh-cn/actions.md

@@ -181,7 +181,7 @@ export const login = ({dispatch}, username, password) => {
 ```javascript
 import {callee} from './anotherActionModule'
 
-export const caller = ({dispatch, state, watch}) {
+export const caller = ({dispatch, state, watch}) => {
   dispatch('MUTATION_1')
   callee({state, watch})
 }
@@ -192,7 +192,7 @@ export const caller = ({dispatch, state, watch}) {
 ```javascript
 import {callee} from './anotherActionModule'
 
-export const caller = (store) {
+export const caller = (store) => {
   store.dispatch('MUTATION_1')
   callee(store)
 }