diff --git a/zh-cn/application-dev/reference/apis/js-apis-pasteboard.md b/zh-cn/application-dev/reference/apis/js-apis-pasteboard.md index c28402c720e5f23a21fded716afaaa291603cee2..c2a44aa5711562987a2e53e96cd81fc8509b94d2 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-pasteboard.md +++ b/zh-cn/application-dev/reference/apis/js-apis-pasteboard.md @@ -37,11 +37,13 @@ createPlainTextData(text:string): PasteData **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | text | string | 是 | 纯文本数据。 | **返回值** + | 类型 | 说明 | | -------- | -------- | | [PasteData](#pastedata) | 包含此内容的剪贴板内容对象。 | @@ -62,11 +64,13 @@ createHtmlData(htmlText:string): PasteData **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | htmlText | string | 是 | 待保存的HTML文本内容。 | **返回值** + | 类型 | 说明 | | -------- | -------- | | [PasteData](#pastedata) | 包含此内容的剪贴板内容对象。 | @@ -88,11 +92,13 @@ createWantData(want:Want): PasteData **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | want | [Want](js-apis-application-Want.md) | 是 | 待保存的Want内容。 | **返回值** + | 类型 | 说明 | | -------- | -------- | | [PasteData](#pastedata) | 包含此内容的剪贴板内容对象。 | @@ -117,11 +123,13 @@ createUriData(uri:string): PasteData **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | uri | string | 是 | 待保存的URI内容。 | **返回值** + | 类型 | 说明 | | -------- | -------- | | [PasteData](#pastedata) | 包含此内容的剪贴板内容对象。 | @@ -142,11 +150,13 @@ createPixelMapData((pixelMap: image.PixelMap): PasteData **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | pixelMap | [image.PixelMap](js-apis-image.md#pixelmap7) | 是 | 待保存的PixelMap内容。 | **返回值** + | 类型 | 说明 | | -------- | -------- | | [PasteData](#pastedata) | 包含此内容的剪贴板内容对象。 | @@ -178,11 +188,13 @@ createPlainTextRecord(text:string): PasteDataRecord **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | text | string | 是 | 纯文本内容。 | **返回值** + | 类型 | 说明 | | -------- | -------- | | [PasteDataRecord](#pastedatarecord7) | 一条新建的纯文本内容条目。 | @@ -203,11 +215,13 @@ createHtmlTextRecord(htmlText:string): PasteDataRecord **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | htmlText | string | 是 | HTML内容。 | **返回值** + | 类型 | 说明 | | -------- | -------- | | [PasteDataRecord](#pastedatarecord7) | 一条新建的HTML内容条目。 | @@ -229,11 +243,13 @@ createWantRecord(want:Want): PasteDataRecord **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | want | [Want](js-apis-application-Want.md) | 是 | Want类型数据。 | **返回值** + | 类型 | 说明 | | -------- | -------- | | [PasteDataRecord](#pastedatarecord7) | 一条新建的Want内容条目 | @@ -258,11 +274,13 @@ createUriRecord(uri:string): PasteDataRecord **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | uri | string | 是 | URI内容。 | **返回值** + | 类型 | 说明 | | -------- | -------- | | [PasteDataRecord](#pastedatarecord7) | 一条新建的URI内容条目。 | @@ -283,11 +301,13 @@ createPixelMapRecord(pixelMap:image.PixelMap): PasteDataRecord **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | pixelMap | [image.PixelMap](js-apis-image.md#pixelmap7) | 是 | PixelMap对象内容。 | **返回值** + | 类型 | 说明 | | -------- | -------- | | [PasteDataRecord](#pastedatarecord7) | 一条新建的PixelMap对象内容条目。 | @@ -366,6 +386,7 @@ convertToText(): Promise<string> **系统能力**: SystemCapability.MiscServices.Pasteboard **返回值** + | 类型 | 说明 | | -------- | -------- | | Promise<void> | 异步回调函数,调用成功则返回强制转换的文本内容,调用失败则返回error信息。 | @@ -391,6 +412,7 @@ convertToText(callback: AsyncCallback<string>): void **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | callback | AsyncCallback<string> | 是 | 回调函数,调用成功则返回强制转换的文本内容,调用失败则返回error信息。 | @@ -428,6 +450,7 @@ getPrimaryText(): string **返回值** + | 类型 | 说明 | | -------- | -------- | | string | 纯文本内容。 | @@ -449,6 +472,7 @@ getPrimaryHtml(): string **系统能力**: SystemCapability.MiscServices.Pasteboard **返回值** + | 类型 | 说明 | | -------- | -------- | | string | HTML文本数据。 | @@ -471,6 +495,7 @@ getPrimaryWant(): Want **系统能力**: SystemCapability.MiscServices.Pasteboard **返回值** + | 类型 | 说明 | | -------- | -------- | | [Want](js-apis-application-Want.md) | Want对象内容。 | @@ -496,6 +521,7 @@ getPrimaryUri(): string **系统能力**: SystemCapability.MiscServices.Pasteboard **返回值** + | 类型 | 说明 | | -------- | -------- | | string | URI文本内容。 | @@ -517,6 +543,7 @@ getPrimaryPixelMap(): image.PixelMap **系统能力**: SystemCapability.MiscServices.Pasteboard **返回值** + | 类型 | 说明 | | -------- | -------- | | [image.PixelMap](js-apis-image.md#pixelmap7) | PixelMap对象内容。 | @@ -552,6 +579,7 @@ addTextRecord(text: string): void **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | text | string | 是 | 纯文本内容。 | @@ -575,6 +603,7 @@ addHtmlRecord(htmlText: string): void **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | htmlText | string | 是 | HTML格式的文本内容。 | @@ -599,6 +628,7 @@ addWantRecord(want: Want): void **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | want | [Want](js-apis-application-Want.md) | 是 | Want对象内容。 | @@ -626,6 +656,7 @@ addUriRecord(uri: string): void **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | uri | string | 是 | URI文本内容。 | @@ -648,6 +679,7 @@ addPixelMapRecord(pixelMap: image.PixelMap): void **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | pixelMap | [image.PixelMap](js-apis-image.md#pixelmap7) | 是 | PixelMap对象内容。 | @@ -681,6 +713,7 @@ addRecord(record: PasteDataRecord): void **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | record | [PasteDataRecord](#pastedatarecord7) | 是 | 待添加的条目。 | @@ -706,6 +739,7 @@ getMimeTypes(): Array<string> **系统能力**: SystemCapability.MiscServices.Pasteboard **返回值** + | 类型 | 说明 | | -------- | -------- | | Array<string> | 非重复的类型列表。 | @@ -727,6 +761,7 @@ getPrimaryMimeType(): string **系统能力**: SystemCapability.MiscServices.Pasteboard **返回值** + | 类型 | 说明 | | -------- | -------- | | string | 首个条目的数据类型。 | @@ -748,6 +783,7 @@ getProperty(): PasteDataProperty **系统能力**: SystemCapability.MiscServices.Pasteboard **返回值** + | 类型 | 说明 | | -------- | -------- | | [PasteDataProperty](#pastedataproperty7) | 属性描述对象。 | @@ -769,6 +805,7 @@ setProperty(property: PasteDataProperty): void **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | property | [PasteDataProperty](#pastedataproperty7) | 是 | 属性描述对象。 | @@ -792,11 +829,13 @@ getRecordAt(index: number): PasteDataRecord **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | index | number | 是 | 指定条目的下标。 | **返回值** + | 类型 | 说明 | | -------- | -------- | | [PasteDataRecord](#pastedatarecord7) | 指定下标的条目。 | @@ -818,6 +857,7 @@ getRecordCount(): number **系统能力**: SystemCapability.MiscServices.Pasteboard **返回值** + | 类型 | 说明 | | -------- | -------- | | number | 条目的个数。 | @@ -839,6 +879,7 @@ getTag(): string **系统能力**: SystemCapability.MiscServices.Pasteboard **返回值** + | 类型 | 说明 | | -------- | -------- | | string | 获取用户自定义的标签内容,如果没有设置用户自定义的标签内容将返回空。 | @@ -860,11 +901,13 @@ hasMimeType(mimeType: string): boolean **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | mimeType | string | 是 | 待查询的数据类型。 | **返回值** + | 类型 | 说明 | | -------- | -------- | | boolean | 有指定的数据类型返回true,否则返回false。 | @@ -886,11 +929,13 @@ removeRecordAt(index: number): boolean **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | index | number | 是 | 指定的下标。 | **返回值** + | 类型 | 说明 | | -------- | -------- | | boolean | 成功移除返回true,失败返回false。 | @@ -912,12 +957,14 @@ replaceRecordAt(index: number, record: PasteDataRecord): boolean **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | index | number | 是 | 指定的下标。 | | record | [PasteDataRecord](#pastedatarecord7) | 是 | 替换后的条目。 | **返回值** + | 类型 | 说明 | | -------- | -------- | | boolean | 成功替换返回true,失败返回false。 | @@ -940,6 +987,7 @@ getSystemPasteboard(): SystemPasteboard **系统能力**: SystemCapability.MiscServices.Pasteboard **返回值** + | 类型 | 说明 | | -------- | -------- | | [SystemPasteboard](#systempasteboard) | 系统剪切板对象。 | @@ -969,6 +1017,7 @@ setPasteData(data:PasteData, callback:AsyncCallback<void>): void **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | data | [PasteData](#pastedata) | 是 | PasteData对象。 | @@ -998,11 +1047,13 @@ setPasteData(data:PasteData): Promise<void> **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 说明 | | -------- | -------- | -------- | | data | [PasteData](#pastedata) | PasteData对象。 | **返回值** + | 类型 | 说明 | | -------- | -------- | | Promise<void> | 异步回调函数,表示是否成功将数据写入系统剪切板。 | @@ -1029,6 +1080,7 @@ getPasteData( callback:AsyncCallback<PasteData>): void **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | callback | AsyncCallback<[PasteData](#pastedata)> | 是 | 回调函数,返回系统剪切板数据。 | @@ -1056,6 +1108,7 @@ getPasteData(): Promise<PasteData> **系统能力**: SystemCapability.MiscServices.Pasteboard **返回值** + | 类型 | 说明 | | -------- | -------- | | Promise<[PasteData](#pastedata)> | 异步回调函数,调返回系统剪切板数据。 | @@ -1081,6 +1134,7 @@ on(type: 'update', callback: () =>void ): void **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | type | string | 是 | 取值为'update',表示系统剪贴板内容变化事件。 | @@ -1106,6 +1160,7 @@ off(type: 'update', callback?: () =>void ): void **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | type | string | 是 | 取值为'update',表示系统剪贴板内容变化事件。 | @@ -1130,6 +1185,7 @@ hasPasteData(callback: AsyncCallback<boolean>): void **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | callback | AsyncCallback<boolean> | 是 | 返回为true表示系统剪切板中有内容,返回false表示系统剪切板中没有内容。 | @@ -1156,6 +1212,7 @@ hasPasteData(): Promise<boolean> **系统能力**: SystemCapability.MiscServices.Pasteboard **返回值** + | 类型 | 说明 | | -------- | -------- | | Promise<boolean> | 返回为true表示系统剪切板中有内容,返回false表示系统剪切板中没有内容。 | @@ -1180,6 +1237,7 @@ clear(callback: AsyncCallback<void>): void **系统能力**: SystemCapability.MiscServices.Pasteboard **参数** + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | callback | AsyncCallback<void> | 是 | 回调函数,表示是否成功清空系统剪切板内容。 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-screen-lock.md b/zh-cn/application-dev/reference/apis/js-apis-screen-lock.md index d7bad749f48f76979ef324366265e32706c8e514..8431201b518da50a728b92a8cee7b0e4f61da6bc 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-screen-lock.md +++ b/zh-cn/application-dev/reference/apis/js-apis-screen-lock.md @@ -24,7 +24,7 @@ isScreenLocked(callback: AsyncCallback<boolean>): void **参数:** - | 参数名 | 类型 | 必填 | 说明 | + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | callback | AsyncCallback<boolean> | 是 | 回调函数,返回true表示屏幕已锁屏,返回false表示屏幕未锁屏。 | @@ -79,7 +79,7 @@ isSecureMode(callback: AsyncCallback<boolean>): void **参数**: - | 参数名 | 类型 | 必填 | 说明 | + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | callback | AsyncCallback<boolean> | 是 | 回调函数。返回true表示屏幕处于安全模式下,返回false表示屏幕当前不在安全模式下。 | @@ -134,7 +134,7 @@ unlockScreen(callback: AsyncCallback<void>): void **参数**: - | 参数名 | 类型 | 必填 | 说明 | + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | callback | AsyncCallback<void> | 是 | 回调函数,失败时返回错误信息。 | @@ -161,7 +161,7 @@ unlockScreen(): Promise<void> **返回值**: - | 类型 | 说明 | + | 类型 | 说明 | | -------- | -------- | | Promise<void> | 以Promise形式返回结果。 | @@ -190,7 +190,7 @@ lockScreen(callback: AsyncCallback<void>): void **参数**: - | 参数名 | 类型 | 必填 | 说明 | + | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | | callback | AsyncCallback<void> | 是 | 回调函数,失败时返回错误信息。 | @@ -218,7 +218,7 @@ lockScreen(): Promise<void> **返回值**: - | 类型 | 说明 | + | 类型 | 说明 | | -------- | -------- | | Promise<void> | 以Promise形式返回结果。 |