未验证 提交 863549a6 编写于 作者: L LiAn 提交者: Gitee

update zh-cn/application-dev/reference/apis/js-apis-arkui-dragController.md.

Signed-off-by: LiAn <lian15@huawei.com> 
Signed-off-by: NLiAn <lian15@huawei.com>
上级 be02bcc1
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
## 导入模块 ## 导入模块
```js ```ts
import dragController from "@ohos.arkui.dragController"; import dragController from "@ohos.arkui.dragController";
``` ```
...@@ -35,7 +35,7 @@ executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo, callback: ...@@ -35,7 +35,7 @@ executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo, callback:
```ts ```ts
import dragController from "@ohos.arkui.dragController" import dragController from "@ohos.arkui.dragController"
import UDMF from '@ohos.data.UDMF' import UDC from '@ohos.data.unifiedDataChannel';
@Entry @Entry
@Component @Component
...@@ -54,8 +54,8 @@ struct DragControllerPage { ...@@ -54,8 +54,8 @@ struct DragControllerPage {
Button('touch to execute drag') Button('touch to execute drag')
.onTouch((event) => { .onTouch((event) => {
if (event.type == TouchType.Down) { if (event.type == TouchType.Down) {
let text = new UDMF.Text() let text = new UDC.Text()
let unifiedData = new UDMF.UnifiedData(text) let unifiedData = new UDC.UnifiedData(text)
let dragInfo: dragController.DragInfo = { let dragInfo: dragController.DragInfo = {
pointerId: 0, pointerId: 0,
...@@ -101,7 +101,7 @@ executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo): Promise&l ...@@ -101,7 +101,7 @@ executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo): Promise&l
```ts ```ts
import dragController from "@ohos.arkui.dragController" import dragController from "@ohos.arkui.dragController"
import UDMF from '@ohos.data.UDMF'; import UDC from '@ohos.data.unifiedDataChannel';
import componentSnapshot from '@ohos.arkui.componentSnapshot'; import componentSnapshot from '@ohos.arkui.componentSnapshot';
import image from '@ohos.multimedia.image'; import image from '@ohos.multimedia.image';
...@@ -133,8 +133,8 @@ struct DragControllerPage { ...@@ -133,8 +133,8 @@ struct DragControllerPage {
Button('touch to execute drag') Button('touch to execute drag')
.onTouch((event) => { .onTouch((event) => {
if (event.type == TouchType.Down) { if (event.type == TouchType.Down) {
let text = new UDMF.Text() let text = new UDC.Text()
let unifiedData = new UDMF.UnifiedData(text) let unifiedData = new UDC.UnifiedData(text)
let dragInfo: dragController.DragInfo = { let dragInfo: dragController.DragInfo = {
pointerId: 0, pointerId: 0,
...@@ -178,5 +178,5 @@ struct DragControllerPage { ...@@ -178,5 +178,5 @@ struct DragControllerPage {
| 名称 | 类型 | 必填 | 说明 | | 名称 | 类型 | 必填 | 说明 |
| ----------- | ------------------------------------------------------ | ---- | ---------------------------------------- | | ----------- | ------------------------------------------------------ | ---- | ---------------------------------------- |
| pointerId | number | 是 | 设置启动拖拽时屏幕上触摸点的Id。 | | pointerId | number | 是 | 设置启动拖拽时屏幕上触摸点的Id。 |
| data | [UDMF.UnifiedData](./js-apis-data-udmf.md#unifieddata) | 否 | 设置拖拽过程中携带的数据。 | | data | [unifiedDataChannel.UnifiedData](js-apis-data-unifiedDataChannel.md#unifieddata) | 否 | 设置拖拽过程中携带的数据。 |
| extraParams | string | 否 | 设置拖拽事件额外信息,具体功能暂未实现。 | | extraParams | string | 否 | 设置拖拽事件额外信息,具体功能暂未实现。 |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册