]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs(zh): Update actions.md (#2155)
author0x3E5 <4722957@qq.com>
Fri, 21 Apr 2023 13:56:51 +0000 (21:56 +0800)
committerGitHub <noreply@github.com>
Fri, 21 Apr 2023 13:56:51 +0000 (15:56 +0200)
Correction chinese expression.

packages/docs/zh/core-concepts/actions.md

index 220f5f553f2f5eea08ec09f550a697be5104499d..12662ec18754c781d06de025ca6523f363b7f4fd 100644 (file)
@@ -162,7 +162,7 @@ export default {
 
 ## 订阅 action %{#subscribing-to-actions}%
 
-你可以通过 `store.$onAction()` 来监听 action 和它们的结果。传递给它的回调函数会在 action 本身之前执行。`after` 表示在 promise 解决之后,允许你在 action 解决后执行一个一个回调函数。同样地,`onError` 允许你在 action 抛出错误或 reject 时执行一个回调函数。这些函数对于追踪运行时错误非常有用,类似于[Vue docs 中的这个提示](https://v3.vuejs.org/guide/tooling/deployment.html#tracking-runtime-errors)。
+你可以通过 `store.$onAction()` 来监听 action 和它们的结果。传递给它的回调函数会在 action 本身之前执行。`after` 表示在 promise 解决之后,允许你在 action 解决后执行一个回调函数。同样地,`onError` 允许你在 action 抛出错误或 reject 时执行一个回调函数。这些函数对于追踪运行时错误非常有用,类似于[Vue docs 中的这个提示](https://v3.vuejs.org/guide/tooling/deployment.html#tracking-runtime-errors)。
 
 这里有一个例子,在运行 action 之前以及 action resolve/reject 之后打印日志记录。