doc: update custom api help

This commit is contained in:
Gabe
2025-08-10 21:50:33 +08:00
parent 16607fb069
commit 9e4c510684
3 changed files with 67 additions and 2 deletions

View File

@@ -168,7 +168,8 @@ Response Hook 函数示例如下:
* @param {string} from 原文语言
* @param {string} to 译文语言
* @returns {Array[string, boolean]} [译文, 译文语言与原文语言是否相同]
* 注如果返回值第二个值为true译文语言与原文语言相同则译文不会在页面显示
* 注如果返回值第二个值为true译文语言与原文语言相同则译文不会在页面显示
* 参数不全的情况建议直接返回false
*/
(res, text, from, to) => [res.text, to === res.src]
```