From 67429bb39f9885d1407addc50f316e426b81916c Mon Sep 17 00:00:00 2001 From: yichengzhao Date: Wed, 27 Apr 2022 11:36:28 +0800 Subject: [PATCH] mark language type Signed-off-by: yichengzhao Change-Id: I2b6663ef20c6d916e30cab49041dc856107aad01 --- .../reference/apis/js-apis-device-info.md | 2 +- .../reference/apis/js-apis-system-parameter.md | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-device-info.md b/zh-cn/application-dev/reference/apis/js-apis-device-info.md index d96977f7c9..14bd1614d8 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-device-info.md +++ b/zh-cn/application-dev/reference/apis/js-apis-device-info.md @@ -5,7 +5,7 @@ ## 导入模块 -``` +```ts import deviceInfo from '@ohos.deviceInfo' ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-system-parameter.md b/zh-cn/application-dev/reference/apis/js-apis-system-parameter.md index a51a7e60de..0be6dd6a6b 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-system-parameter.md +++ b/zh-cn/application-dev/reference/apis/js-apis-system-parameter.md @@ -6,7 +6,7 @@ ## 导入模块 -``` +```ts import parameter from '@ohos.systemParameter' ``` @@ -34,7 +34,7 @@ getSync(key: string, def?: string): string **示例:** -``` +```ts try { var info = parameter.getSync("test.parameter.key"); console.log(JSON.stringify(info)); @@ -61,7 +61,7 @@ get(key: string, callback: AsyncCallback<string>): void **示例:** -``` +```ts try { parameter.get("test.parameter.key", function (err, data) { if (err == undefined) { @@ -93,7 +93,7 @@ get(key: string, def: string, callback: AsyncCallback<string>): void **示例:** -``` +```ts try { parameter.get("test.parameter.key", "default", function (err, data) { if (err == undefined) { @@ -131,7 +131,7 @@ get(key: string, def?: string): Promise<string> **示例:** -``` +```ts try { var p = parameter.get("test.parameter.key"); p.then(function (value) { @@ -162,7 +162,7 @@ setSync(key: string, value: string): void **示例:** -``` +```ts try { parameter.setSync("test.parameter.key", "default"); }catch(e){ @@ -189,7 +189,7 @@ set(key: string, value: string, callback: AsyncCallback<void>): void **示例:** -``` +```ts try { parameter.set("test.parameter.key", "testValue", function (err, data) { if (err == undefined) { @@ -226,7 +226,7 @@ set(key: string, def?: string): Promise<string> **示例:** -``` +```ts try { var p = para.set("test.parameter.key", "testValue"); p.then(function (value) { -- GitLab