未验证 提交 c804cee5 编写于 作者: O openharmony_ci 提交者: Gitee

!23161 文档修改

Merge pull request !23161 from LiAn/master
......@@ -208,7 +208,7 @@
- [@ohos.arkui.dragController (DragController)](js-apis-arkui-dragController.md)
- [@ohos.arkui.drawableDescriptor (DrawableDescriptor)](js-apis-arkui-drawableDescriptor.md)
- [@ohos.arkui.inspector (布局回调)](js-apis-arkui-inspector.md)
- [ @ohos.arkui.performanceMonitor (性能监测)](js-apis-arkui-performancemonitor.md)
- [@ohos.arkui.performanceMonitor (性能监测)](js-apis-arkui-performancemonitor.md)
- [@ohos.arkui.UIContext (UIContext)](js-apis-arkui-UIContext.md)
- [@ohos.curves (插值计算)](js-apis-curve.md)
- [@ohos.font (注册自定义字体)](js-apis-font.md)
......
......@@ -11,7 +11,7 @@
## 导入模块
```js
```ts
import dragController from "@ohos.arkui.dragController";
```
......@@ -35,7 +35,7 @@ executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo, callback:
```ts
import dragController from "@ohos.arkui.dragController"
import UDMF from '@ohos.data.UDMF'
import UDC from '@ohos.data.unifiedDataChannel';
@Entry
@Component
......@@ -54,8 +54,8 @@ struct DragControllerPage {
Button('touch to execute drag')
.onTouch((event) => {
if (event.type == TouchType.Down) {
let text = new UDMF.Text()
let unifiedData = new UDMF.UnifiedData(text)
let text = new UDC.Text()
let unifiedData = new UDC.UnifiedData(text)
let dragInfo: dragController.DragInfo = {
pointerId: 0,
......@@ -101,9 +101,9 @@ executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo): Promise&l
```ts
import dragController from "@ohos.arkui.dragController"
import UDMF from '@ohos.data.UDMF';
import componentSnapshot from '@ohos.arkui.componentSnapshot';
import image from '@ohos.multimedia.image';
import UDC from '@ohos.data.unifiedDataChannel';
@Entry
@Component
......@@ -133,8 +133,8 @@ struct DragControllerPage {
Button('touch to execute drag')
.onTouch((event) => {
if (event.type == TouchType.Down) {
let text = new UDMF.Text()
let unifiedData = new UDMF.UnifiedData(text)
let text = new UDC.Text()
let unifiedData = new UDC.UnifiedData(text)
let dragInfo: dragController.DragInfo = {
pointerId: 0,
......@@ -178,5 +178,5 @@ struct DragControllerPage {
| 名称 | 类型 | 必填 | 说明 |
| ----------- | ------------------------------------------------------ | ---- | ---------------------------------------- |
| pointerId | number | 是 | 设置启动拖拽时屏幕上触摸点的Id。 |
| data | [UDMF.UnifiedData](./js-apis-data-udmf.md#unifieddata) | 否 | 设置拖拽过程中携带的数据。 |
| data | [unifiedDataChannel.UnifiedData](js-apis-data-unifiedDataChannel.md#unifieddata) | 否 | 设置拖拽过程中携带的数据。 |
| extraParams | string | 否 | 设置拖拽事件额外信息,具体功能暂未实现。 |
......@@ -190,7 +190,7 @@
- [枚举说明](ts-appendix-enums.md)
- [类型定义](ts-types.md)
- 已停止维护的组件
- [GridContainer](ts-container-gridcontainer.md)
- [AbilityComponent](ts-container-ability-component.md)
- [GridContainer](ts-container-gridcontainer.md)
- 已停止维护的接口
- [点击控制](ts-universal-attributes-click.md)
......@@ -21,7 +21,7 @@ ArkUI组件默认支持拖拽。
| 名称 | 参数类型 | 描述 |
| -------- | -------- | -------- |
| allowDrop | Array\<[UnifiedDataType](../apis/js-apis-data-udmf.md#unifieddatatype)> | 设置该组件上允许落入的数据类型。<br/>默认值:空<br/> |
| allowDrop | Array\<[UniformDataType](../apis/js-apis-data-uniformTypeDescriptor.md#uniformdatatype)> | 设置该组件上允许落入的数据类型。<br/>默认值:空<br/> |
| draggable | boolean | 设置该组件是否允许进行拖拽。<br/>默认值:false<br/> |
......
......@@ -54,9 +54,9 @@ ArkUI组件默认支持拖拽。
| 名称 | 类型 | 描述 |
| ------ | ------ | ---------------- |
| useCustomDropAnimation<sup>10+</sup> | boolean | 当拖拽结束时,是否使用系统默认落入动画。 |
| setData(unifiedData: [UnifiedData](../apis/js-apis-data-udmf.md#unifieddata))<sup>10+</sup> | void | 向DragEvent中设置拖拽相关数据。 |
| getData()<sup>10+</sup> | [UnifiedData](../apis/js-apis-data-udmf.md#unifieddata) | 从DragEvent中获取拖拽相关数据。 |
| getSummary()<sup>10+</sup> | [Summary](../apis/js-apis-data-udmf.md#summary) | 从DragEvent中获取拖拽相关数据的简介。 |
| setData(unifiedData: [UnifiedData](../apis/js-apis-data-unifiedDataChannel.md#unifieddata))<sup>10+</sup> | void | 向DragEvent中设置拖拽相关数据。 |
| getData()<sup>10+</sup> | [UnifiedData](../apis/js-apis-data-unifiedDataChannel.md#unifieddata) | 从DragEvent中获取拖拽相关数据。 |
| getSummary()<sup>10+</sup> | [Summary](../apis/js-apis-data-unifiedDataChannel.md#summary) | 从DragEvent中获取拖拽相关数据的简介。 |
| setResult(dragRect: [DragResult](#dragresult10枚举说明))<sup>10+</sup> | void | 向DragEvent中设置拖拽结果。 |
| getResult()<sup>10+</sup> | [DragResult](#dragresult10枚举说明) | 从DragEvent中获取拖拽结果。 |
| getPreviewRect()<sup>10+</sup> | [Rectangle](ts-universal-attributes-touch-target.md#rectangle对象说明) | 获取预览图所在的Rectangle。 |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册