From 2af5b66e7f611f0ac0afdd6748573365eb225259 Mon Sep 17 00:00:00 2001 From: so1ve Date: Tue, 16 Apr 2024 13:22:19 +0800 Subject: [PATCH] =?UTF-8?q?docs(zh):=20`=E6=A3=80=E6=9F=A5=E5=99=A8`=20->?= =?UTF-8?q?=20`=E6=8B=A6=E6=88=AA=E5=99=A8`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vitepress/config/zh.ts | 2 +- docs/zh/interceptors.md | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/.vitepress/config/zh.ts b/docs/.vitepress/config/zh.ts index d65d555..b92aae9 100644 --- a/docs/.vitepress/config/zh.ts +++ b/docs/.vitepress/config/zh.ts @@ -32,7 +32,7 @@ export const zhConfig = defineConfig({ link: "/zh/commands", }, { - text: "检查器", + text: "拦截器", link: "/zh/interceptors", }, { diff --git a/docs/zh/interceptors.md b/docs/zh/interceptors.md index d4ebf2f..baf1199 100644 --- a/docs/zh/interceptors.md +++ b/docs/zh/interceptors.md @@ -1,14 +1,14 @@ --- -title: 检查器 +title: 拦截器 --- -# 检查器 +# 拦截器 -检查器是在调用命令处理程序之前或之后运行的函数,类似于 koa 中的中间件。 +拦截器是在调用命令处理程序之前或之后运行的函数,类似于 koa 中的中间件。 ## 用法 -可以使用 `interceptor` 方法将检查器添加到命令行界面 (CLI) 中: +可以使用 `interceptor` 方法将拦截器添加到命令行界面 (CLI) 中: ```ts import { Clerc } from "clerc"; @@ -53,9 +53,9 @@ const cli = Clerc.create() 因此,执行顺序如下: -1. 预检查器(Pre interceptors) -2. 正常检查器(Normal interceptors) -3. 后检查器(Post interceptors) +1. 预拦截器(Pre interceptors) +2. 正常拦截器(Normal interceptors) +3. 后拦截器(Post interceptors) ## 在命令处理程序之后调用