Skip to content

Commit a971023

Browse files
authored
Update cross-model-dispatch-action.md
1 parent c468df6 commit a971023

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/advanced/cross-model-dispatch-action.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ Model B:
1414
```javascript
1515
name: 'b',
1616
pipes: {
17-
getData(action$) {
17+
getData(action$, { dispatch, map }) {
1818
action$.pipe(
1919
map((data) => {
20-
this.dispatch({
20+
dispatch({
2121
type: 'a/getData',
2222
data,
2323
});
@@ -33,8 +33,8 @@ pipes: {
3333

3434
在 pipes 中调用 `dispatch`,指定 action 的 type 为 `model/pipe`
3535
```javascript
36-
this.dispatch({
36+
dispatch({
3737
type: 'a/getData',
3838
data,
3939
});
40-
```
40+
```

0 commit comments

Comments
 (0)