From 6c51de5f89f0e8b5b4d3c4255e337a026482e3b5 Mon Sep 17 00:00:00 2001 From: "@shi-xiaoxiao-iris" Date: Sat, 15 Oct 2022 16:00:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: @shi-xiaoxiao-iris --- .../reference/apis/js-apis-device-manager.md | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-device-manager.md b/zh-cn/application-dev/reference/apis/js-apis-device-manager.md index 56addbc822..3a100f9da5 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-device-manager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-device-manager.md @@ -828,18 +828,19 @@ setUserOperation(operateAction: number, params: string): void; **示例** ```js - try { - /* - operateAction = 0 - 允许授权 - operateAction = 1 - 取消授权 - operateAction = 2 - 授权框用户操作超时 - operateAction = 3 - 取消pin码框展示 - operateAction = 4 - 取消pin码输入框展示 - operateAction = 5 - pin码输入框确定操作 - */ - dmClass.setUserOperation(operation, "extra") - } catch (err) { - console.error("setUserOperation errCode:" + err.code + ",errMessage:" + err.message); + try { + /* + operateAction = 0 - 允许授权 + operateAction = 1 - 取消授权 + operateAction = 2 - 授权框用户操作超时 + operateAction = 3 - 取消pin码框展示 + operateAction = 4 - 取消pin码输入框展示 + operateAction = 5 - pin码输入框确定操作 + */ + let operation = 0; + this.dmInstance.setUserOperation(operation, "extra") + } catch (err) { + console.error("setUserOperation errCode:" + err.code + ",errMessage:" + err.message); } ``` -- GitLab