Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
ab55a1d7
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
ab55a1d7
编写于
9月 09, 2022
作者:
王
王江颖
提交者:
Gitee
9月 09, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update zh-cn/application-dev/reference/apis/js-apis-pasteboard.md.
Signed-off-by:
N
王江颖
<
wangjiangying@huawei.com
>
上级
48b4b202
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
58 addition
and
0 deletion
+58
-0
zh-cn/application-dev/reference/apis/js-apis-pasteboard.md
zh-cn/application-dev/reference/apis/js-apis-pasteboard.md
+58
-0
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-pasteboard.md
浏览文件 @
ab55a1d7
...
@@ -37,11 +37,13 @@ createPlainTextData(text:string): PasteData
...
@@ -37,11 +37,13 @@ createPlainTextData(text:string): PasteData
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| text | string | 是 | 纯文本数据。 |
| text | string | 是 | 纯文本数据。 |
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
|
[
PasteData
](
#pastedata
)
| 包含此内容的剪贴板内容对象。 |
|
[
PasteData
](
#pastedata
)
| 包含此内容的剪贴板内容对象。 |
...
@@ -62,11 +64,13 @@ createHtmlData(htmlText:string): PasteData
...
@@ -62,11 +64,13 @@ createHtmlData(htmlText:string): PasteData
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| htmlText | string | 是 | 待保存的HTML文本内容。 |
| htmlText | string | 是 | 待保存的HTML文本内容。 |
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
|
[
PasteData
](
#pastedata
)
| 包含此内容的剪贴板内容对象。 |
|
[
PasteData
](
#pastedata
)
| 包含此内容的剪贴板内容对象。 |
...
@@ -88,11 +92,13 @@ createWantData(want:Want): PasteData
...
@@ -88,11 +92,13 @@ createWantData(want:Want): PasteData
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | 待保存的Want内容。 |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | 待保存的Want内容。 |
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
|
[
PasteData
](
#pastedata
)
| 包含此内容的剪贴板内容对象。 |
|
[
PasteData
](
#pastedata
)
| 包含此内容的剪贴板内容对象。 |
...
@@ -117,11 +123,13 @@ createUriData(uri:string): PasteData
...
@@ -117,11 +123,13 @@ createUriData(uri:string): PasteData
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| uri | string | 是 | 待保存的URI内容。 |
| uri | string | 是 | 待保存的URI内容。 |
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
|
[
PasteData
](
#pastedata
)
| 包含此内容的剪贴板内容对象。 |
|
[
PasteData
](
#pastedata
)
| 包含此内容的剪贴板内容对象。 |
...
@@ -142,11 +150,13 @@ createPixelMapData((pixelMap: image.PixelMap): PasteData
...
@@ -142,11 +150,13 @@ createPixelMapData((pixelMap: image.PixelMap): PasteData
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| pixelMap |
[
image.PixelMap
](
js-apis-image.md#pixelmap7
)
| 是 | 待保存的PixelMap内容。 |
| pixelMap |
[
image.PixelMap
](
js-apis-image.md#pixelmap7
)
| 是 | 待保存的PixelMap内容。 |
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
|
[
PasteData
](
#pastedata
)
| 包含此内容的剪贴板内容对象。 |
|
[
PasteData
](
#pastedata
)
| 包含此内容的剪贴板内容对象。 |
...
@@ -178,11 +188,13 @@ createPlainTextRecord(text:string): PasteDataRecord
...
@@ -178,11 +188,13 @@ createPlainTextRecord(text:string): PasteDataRecord
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| text | string | 是 | 纯文本内容。 |
| text | string | 是 | 纯文本内容。 |
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
|
[
PasteDataRecord
](
#pastedatarecord7
)
| 一条新建的纯文本内容条目。 |
|
[
PasteDataRecord
](
#pastedatarecord7
)
| 一条新建的纯文本内容条目。 |
...
@@ -203,11 +215,13 @@ createHtmlTextRecord(htmlText:string): PasteDataRecord
...
@@ -203,11 +215,13 @@ createHtmlTextRecord(htmlText:string): PasteDataRecord
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| htmlText | string | 是 | HTML内容。 |
| htmlText | string | 是 | HTML内容。 |
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
|
[
PasteDataRecord
](
#pastedatarecord7
)
| 一条新建的HTML内容条目。 |
|
[
PasteDataRecord
](
#pastedatarecord7
)
| 一条新建的HTML内容条目。 |
...
@@ -229,11 +243,13 @@ createWantRecord(want:Want): PasteDataRecord
...
@@ -229,11 +243,13 @@ createWantRecord(want:Want): PasteDataRecord
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | Want类型数据。 |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | Want类型数据。 |
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
|
[
PasteDataRecord
](
#pastedatarecord7
)
| 一条新建的Want内容条目 |
|
[
PasteDataRecord
](
#pastedatarecord7
)
| 一条新建的Want内容条目 |
...
@@ -258,11 +274,13 @@ createUriRecord(uri:string): PasteDataRecord
...
@@ -258,11 +274,13 @@ createUriRecord(uri:string): PasteDataRecord
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| uri | string | 是 | URI内容。 |
| uri | string | 是 | URI内容。 |
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
|
[
PasteDataRecord
](
#pastedatarecord7
)
| 一条新建的URI内容条目。 |
|
[
PasteDataRecord
](
#pastedatarecord7
)
| 一条新建的URI内容条目。 |
...
@@ -283,11 +301,13 @@ createPixelMapRecord(pixelMap:image.PixelMap): PasteDataRecord
...
@@ -283,11 +301,13 @@ createPixelMapRecord(pixelMap:image.PixelMap): PasteDataRecord
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| pixelMap |
[
image.PixelMap
](
js-apis-image.md#pixelmap7
)
| 是 | PixelMap对象内容。 |
| pixelMap |
[
image.PixelMap
](
js-apis-image.md#pixelmap7
)
| 是 | PixelMap对象内容。 |
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
|
[
PasteDataRecord
](
#pastedatarecord7
)
| 一条新建的PixelMap对象内容条目。 |
|
[
PasteDataRecord
](
#pastedatarecord7
)
| 一条新建的PixelMap对象内容条目。 |
...
@@ -366,6 +386,7 @@ convertToText(): Promise<string>
...
@@ -366,6 +386,7 @@ convertToText(): Promise<string>
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
| Promise
<
void
>
| 异步回调函数,调用成功则返回强制转换的文本内容,调用失败则返回error信息。 |
| Promise
<
void
>
| 异步回调函数,调用成功则返回强制转换的文本内容,调用失败则返回error信息。 |
...
@@ -391,6 +412,7 @@ convertToText(callback: AsyncCallback<string>): void
...
@@ -391,6 +412,7 @@ convertToText(callback: AsyncCallback<string>): void
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback
<
string
>
| 是 | 回调函数,调用成功则返回强制转换的文本内容,调用失败则返回error信息。 |
| callback | AsyncCallback
<
string
>
| 是 | 回调函数,调用成功则返回强制转换的文本内容,调用失败则返回error信息。 |
...
@@ -428,6 +450,7 @@ getPrimaryText(): string
...
@@ -428,6 +450,7 @@ getPrimaryText(): string
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
| string | 纯文本内容。 |
| string | 纯文本内容。 |
...
@@ -449,6 +472,7 @@ getPrimaryHtml(): string
...
@@ -449,6 +472,7 @@ getPrimaryHtml(): string
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
| string | HTML文本数据。 |
| string | HTML文本数据。 |
...
@@ -471,6 +495,7 @@ getPrimaryWant(): Want
...
@@ -471,6 +495,7 @@ getPrimaryWant(): Want
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
|
[
Want
](
js-apis-application-Want.md
)
| Want对象内容。 |
|
[
Want
](
js-apis-application-Want.md
)
| Want对象内容。 |
...
@@ -496,6 +521,7 @@ getPrimaryUri(): string
...
@@ -496,6 +521,7 @@ getPrimaryUri(): string
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
| string | URI文本内容。 |
| string | URI文本内容。 |
...
@@ -517,6 +543,7 @@ getPrimaryPixelMap(): image.PixelMap
...
@@ -517,6 +543,7 @@ getPrimaryPixelMap(): image.PixelMap
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
|
[
image.PixelMap
](
js-apis-image.md#pixelmap7
)
| PixelMap对象内容。 |
|
[
image.PixelMap
](
js-apis-image.md#pixelmap7
)
| PixelMap对象内容。 |
...
@@ -552,6 +579,7 @@ addTextRecord(text: string): void
...
@@ -552,6 +579,7 @@ addTextRecord(text: string): void
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| text | string | 是 | 纯文本内容。 |
| text | string | 是 | 纯文本内容。 |
...
@@ -575,6 +603,7 @@ addHtmlRecord(htmlText: string): void
...
@@ -575,6 +603,7 @@ addHtmlRecord(htmlText: string): void
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| htmlText | string | 是 | HTML格式的文本内容。 |
| htmlText | string | 是 | HTML格式的文本内容。 |
...
@@ -599,6 +628,7 @@ addWantRecord(want: Want): void
...
@@ -599,6 +628,7 @@ addWantRecord(want: Want): void
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | Want对象内容。 |
| want |
[
Want
](
js-apis-application-Want.md
)
| 是 | Want对象内容。 |
...
@@ -626,6 +656,7 @@ addUriRecord(uri: string): void
...
@@ -626,6 +656,7 @@ addUriRecord(uri: string): void
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| uri | string | 是 | URI文本内容。 |
| uri | string | 是 | URI文本内容。 |
...
@@ -648,6 +679,7 @@ addPixelMapRecord(pixelMap: image.PixelMap): void
...
@@ -648,6 +679,7 @@ addPixelMapRecord(pixelMap: image.PixelMap): void
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| pixelMap |
[
image.PixelMap
](
js-apis-image.md#pixelmap7
)
| 是 | PixelMap对象内容。 |
| pixelMap |
[
image.PixelMap
](
js-apis-image.md#pixelmap7
)
| 是 | PixelMap对象内容。 |
...
@@ -681,6 +713,7 @@ addRecord(record: PasteDataRecord): void
...
@@ -681,6 +713,7 @@ addRecord(record: PasteDataRecord): void
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| record |
[
PasteDataRecord
](
#pastedatarecord7
)
| 是 | 待添加的条目。 |
| record |
[
PasteDataRecord
](
#pastedatarecord7
)
| 是 | 待添加的条目。 |
...
@@ -706,6 +739,7 @@ getMimeTypes(): Array<string>
...
@@ -706,6 +739,7 @@ getMimeTypes(): Array<string>
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
| Array
<
string
>
| 非重复的类型列表。 |
| Array
<
string
>
| 非重复的类型列表。 |
...
@@ -727,6 +761,7 @@ getPrimaryMimeType(): string
...
@@ -727,6 +761,7 @@ getPrimaryMimeType(): string
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
| string | 首个条目的数据类型。 |
| string | 首个条目的数据类型。 |
...
@@ -748,6 +783,7 @@ getProperty(): PasteDataProperty
...
@@ -748,6 +783,7 @@ getProperty(): PasteDataProperty
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
|
[
PasteDataProperty
](
#pastedataproperty7
)
| 属性描述对象。 |
|
[
PasteDataProperty
](
#pastedataproperty7
)
| 属性描述对象。 |
...
@@ -769,6 +805,7 @@ setProperty(property: PasteDataProperty): void
...
@@ -769,6 +805,7 @@ setProperty(property: PasteDataProperty): void
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| property |
[
PasteDataProperty
](
#pastedataproperty7
)
| 是 | 属性描述对象。 |
| property |
[
PasteDataProperty
](
#pastedataproperty7
)
| 是 | 属性描述对象。 |
...
@@ -792,11 +829,13 @@ getRecordAt(index: number): PasteDataRecord
...
@@ -792,11 +829,13 @@ getRecordAt(index: number): PasteDataRecord
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| index | number | 是 | 指定条目的下标。 |
| index | number | 是 | 指定条目的下标。 |
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
|
[
PasteDataRecord
](
#pastedatarecord7
)
| 指定下标的条目。 |
|
[
PasteDataRecord
](
#pastedatarecord7
)
| 指定下标的条目。 |
...
@@ -818,6 +857,7 @@ getRecordCount(): number
...
@@ -818,6 +857,7 @@ getRecordCount(): number
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
| number | 条目的个数。 |
| number | 条目的个数。 |
...
@@ -839,6 +879,7 @@ getTag(): string
...
@@ -839,6 +879,7 @@ getTag(): string
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
| string | 获取用户自定义的标签内容,如果没有设置用户自定义的标签内容将返回空。 |
| string | 获取用户自定义的标签内容,如果没有设置用户自定义的标签内容将返回空。 |
...
@@ -860,11 +901,13 @@ hasMimeType(mimeType: string): boolean
...
@@ -860,11 +901,13 @@ hasMimeType(mimeType: string): boolean
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| mimeType | string | 是 | 待查询的数据类型。 |
| mimeType | string | 是 | 待查询的数据类型。 |
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
| boolean | 有指定的数据类型返回true,否则返回false。 |
| boolean | 有指定的数据类型返回true,否则返回false。 |
...
@@ -886,11 +929,13 @@ removeRecordAt(index: number): boolean
...
@@ -886,11 +929,13 @@ removeRecordAt(index: number): boolean
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| index | number | 是 | 指定的下标。 |
| index | number | 是 | 指定的下标。 |
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
| boolean | 成功移除返回true,失败返回false。 |
| boolean | 成功移除返回true,失败返回false。 |
...
@@ -912,12 +957,14 @@ replaceRecordAt(index: number, record: PasteDataRecord): boolean
...
@@ -912,12 +957,14 @@ replaceRecordAt(index: number, record: PasteDataRecord): boolean
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| index | number | 是 | 指定的下标。 |
| index | number | 是 | 指定的下标。 |
| record |
[
PasteDataRecord
](
#pastedatarecord7
)
| 是 | 替换后的条目。 |
| record |
[
PasteDataRecord
](
#pastedatarecord7
)
| 是 | 替换后的条目。 |
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
| boolean | 成功替换返回true,失败返回false。 |
| boolean | 成功替换返回true,失败返回false。 |
...
@@ -940,6 +987,7 @@ getSystemPasteboard(): SystemPasteboard
...
@@ -940,6 +987,7 @@ getSystemPasteboard(): SystemPasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
|
[
SystemPasteboard
](
#systempasteboard
)
| 系统剪切板对象。 |
|
[
SystemPasteboard
](
#systempasteboard
)
| 系统剪切板对象。 |
...
@@ -969,6 +1017,7 @@ setPasteData(data:PasteData, callback:AsyncCallback<void>): void
...
@@ -969,6 +1017,7 @@ setPasteData(data:PasteData, callback:AsyncCallback<void>): void
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| data |
[
PasteData
](
#pastedata
)
| 是 | PasteData对象。 |
| data |
[
PasteData
](
#pastedata
)
| 是 | PasteData对象。 |
...
@@ -998,11 +1047,13 @@ setPasteData(data:PasteData): Promise<void>
...
@@ -998,11 +1047,13 @@ setPasteData(data:PasteData): Promise<void>
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 说明 |
| 参数名 | 类型 | 说明 |
| -------- | -------- | -------- |
| -------- | -------- | -------- |
| data |
[
PasteData
](
#pastedata
)
| PasteData对象。 |
| data |
[
PasteData
](
#pastedata
)
| PasteData对象。 |
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
| Promise
<
void
>
| 异步回调函数,表示是否成功将数据写入系统剪切板。 |
| Promise
<
void
>
| 异步回调函数,表示是否成功将数据写入系统剪切板。 |
...
@@ -1029,6 +1080,7 @@ getPasteData( callback:AsyncCallback<PasteData>): void
...
@@ -1029,6 +1080,7 @@ getPasteData( callback:AsyncCallback<PasteData>): void
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback
<
[PasteData](#pastedata)
>
| 是 | 回调函数,返回系统剪切板数据。 |
| callback | AsyncCallback
<
[PasteData](#pastedata)
>
| 是 | 回调函数,返回系统剪切板数据。 |
...
@@ -1056,6 +1108,7 @@ getPasteData(): Promise<PasteData>
...
@@ -1056,6 +1108,7 @@ getPasteData(): Promise<PasteData>
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
| Promise
<
[PasteData](#pastedata)
>
| 异步回调函数,调返回系统剪切板数据。 |
| Promise
<
[PasteData](#pastedata)
>
| 异步回调函数,调返回系统剪切板数据。 |
...
@@ -1081,6 +1134,7 @@ on(type: 'update', callback: () =>void ): void
...
@@ -1081,6 +1134,7 @@ on(type: 'update', callback: () =>void ): void
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 取值为'update',表示系统剪贴板内容变化事件。 |
| type | string | 是 | 取值为'update',表示系统剪贴板内容变化事件。 |
...
@@ -1106,6 +1160,7 @@ off(type: 'update', callback?: () =>void ): void
...
@@ -1106,6 +1160,7 @@ off(type: 'update', callback?: () =>void ): void
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 取值为'update',表示系统剪贴板内容变化事件。 |
| type | string | 是 | 取值为'update',表示系统剪贴板内容变化事件。 |
...
@@ -1130,6 +1185,7 @@ hasPasteData(callback: AsyncCallback<boolean>): void
...
@@ -1130,6 +1185,7 @@ hasPasteData(callback: AsyncCallback<boolean>): void
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback
<
boolean
>
| 是 | 返回为true表示系统剪切板中有内容,返回false表示系统剪切板中没有内容。 |
| callback | AsyncCallback
<
boolean
>
| 是 | 返回为true表示系统剪切板中有内容,返回false表示系统剪切板中没有内容。 |
...
@@ -1156,6 +1212,7 @@ hasPasteData(): Promise<boolean>
...
@@ -1156,6 +1212,7 @@ hasPasteData(): Promise<boolean>
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**返回值**
**返回值**
| 类型 | 说明 |
| 类型 | 说明 |
| -------- | -------- |
| -------- | -------- |
| Promise
<
boolean
>
| 返回为true表示系统剪切板中有内容,返回false表示系统剪切板中没有内容。 |
| Promise
<
boolean
>
| 返回为true表示系统剪切板中有内容,返回false表示系统剪切板中没有内容。 |
...
@@ -1180,6 +1237,7 @@ clear(callback: AsyncCallback<void>): void
...
@@ -1180,6 +1237,7 @@ clear(callback: AsyncCallback<void>): void
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**系统能力**
: SystemCapability.MiscServices.Pasteboard
**参数**
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback
<
void
>
| 是 | 回调函数,表示是否成功清空系统剪切板内容。 |
| callback | AsyncCallback
<
void
>
| 是 | 回调函数,表示是否成功清空系统剪切板内容。 |
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录