File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
packages/docs/zh/core-concepts Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ export default {
162162
163163## 订阅 action %{#subscribing-to-actions}%
164164
165- 你可以通过 ` store.$onAction() ` 来监听 action 和它们的结果。传递给它的回调函数会在 action 本身之前执行。` after ` 表示在 promise 解决之后,允许你在 action 解决后执行一个一个回调函数 。同样地,` onError ` 允许你在 action 抛出错误或 reject 时执行一个回调函数。这些函数对于追踪运行时错误非常有用,类似于[ Vue docs 中的这个提示] ( https://v3.vuejs.org/guide/tooling/deployment.html#tracking-runtime-errors ) 。
165+ 你可以通过 ` store.$onAction() ` 来监听 action 和它们的结果。传递给它的回调函数会在 action 本身之前执行。` after ` 表示在 promise 解决之后,允许你在 action 解决后执行一个回调函数 。同样地,` onError ` 允许你在 action 抛出错误或 reject 时执行一个回调函数。这些函数对于追踪运行时错误非常有用,类似于[ Vue docs 中的这个提示] ( https://v3.vuejs.org/guide/tooling/deployment.html#tracking-runtime-errors ) 。
166166
167167这里有一个例子,在运行 action 之前以及 action resolve/reject 之后打印日志记录。
168168
You can’t perform that action at this time.
0 commit comments