From 59141c5c87e38a4caea34bdb3a958eaaf2e35289 Mon Sep 17 00:00:00 2001 From: zengyawen Date: Wed, 16 Aug 2023 08:04:36 +0000 Subject: [PATCH] =?UTF-8?q?add=20=E7=A4=BA=E4=BE=8B=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zengyawen --- zh-cn/contribute/template/js-template.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zh-cn/contribute/template/js-template.md b/zh-cn/contribute/template/js-template.md index 0f566ba3a7..9a4436a0c5 100644 --- a/zh-cn/contribute/template/js-template.md +++ b/zh-cn/contribute/template/js-template.md @@ -192,6 +192,10 @@ import call from '@ohos.telephony.call'; // 不允许直接写参数名,必须是可使用、易替代的实际用例。如果非用户自定义填写,需通过注释进行说明。 // 例如:var result = xxx.createExample(parameterOne); // parameterOne由扫描自动获取 +// 示例代码应提供常用场景示例,并通过注释说明示例会实现的效果。 +// 样例:updateContact入参中,如果包含id,即更新某个联系人(常用场景),否则更新所有联系人。 +// 示例代码中应提供常用场景,并告知用户该示例的效果。 + // 注释要精简、突出要点。需提供注释的典型场景还有: // 1. 当代码不能说明变量命名的具体含义,或不能说明代码逻辑时,必须提供注释。 // 2. 涉及到复杂算法或特殊语法时,必须提供注释。 -- GitLab