Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
c804cee5
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
c804cee5
编写于
8月 28, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 28, 2023
浏览文件
操作
浏览文件
下载
差异文件
!23161 文档修改
Merge pull request !23161 from LiAn/master
上级
27709ae7
b0bd301c
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
14 addition
and
14 deletion
+14
-14
zh-cn/application-dev/reference/apis/Readme-CN.md
zh-cn/application-dev/reference/apis/Readme-CN.md
+1
-1
zh-cn/application-dev/reference/apis/js-apis-arkui-dragController.md
...cation-dev/reference/apis/js-apis-arkui-dragController.md
+8
-8
zh-cn/application-dev/reference/arkui-ts/Readme-CN.md
zh-cn/application-dev/reference/arkui-ts/Readme-CN.md
+1
-1
zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-drag-drop.md
...v/reference/arkui-ts/ts-universal-attributes-drag-drop.md
+1
-1
zh-cn/application-dev/reference/arkui-ts/ts-universal-events-drag-drop.md
...n-dev/reference/arkui-ts/ts-universal-events-drag-drop.md
+3
-3
未找到文件。
zh-cn/application-dev/reference/apis/Readme-CN.md
浏览文件 @
c804cee5
...
...
@@ -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
)
...
...
zh-cn/application-dev/reference/apis/js-apis-arkui-dragController.md
浏览文件 @
c804cee5
...
...
@@ -11,7 +11,7 @@
## 导入模块
```
j
s
```
t
s
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
UD
MF
from
'
@ohos.data.UDMF
'
import
UD
C
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
UD
MF
.
Text
()
let
unifiedData
=
new
UD
MF
.
UnifiedData
(
text
)
let
text
=
new
UD
C
.
Text
()
let
unifiedData
=
new
UD
C
.
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
UD
MF
.
Text
()
let
unifiedData
=
new
UD
MF
.
UnifiedData
(
text
)
let
text
=
new
UD
C
.
Text
()
let
unifiedData
=
new
UD
C
.
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 | 否 | 设置拖拽事件额外信息,具体功能暂未实现。 |
zh-cn/application-dev/reference/arkui-ts/Readme-CN.md
浏览文件 @
c804cee5
...
...
@@ -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
)
zh-cn/application-dev/reference/arkui-ts/ts-universal-attributes-drag-drop.md
浏览文件 @
c804cee5
...
...
@@ -21,7 +21,7 @@ ArkUI组件默认支持拖拽。
| 名称 | 参数类型 | 描述 |
| -------- | -------- | -------- |
| allowDrop | Array
\<
[
Unif
iedDataType
](
../apis/js-apis-data-udmf.md#unified
datatype
)
> | 设置该组件上允许落入的数据类型。
<br/>
默认值:空
<br/>
|
| allowDrop | Array
\<
[
Unif
ormDataType
](
../apis/js-apis-data-uniformTypeDescriptor.md#uniform
datatype
)
> | 设置该组件上允许落入的数据类型。
<br/>
默认值:空
<br/>
|
| draggable | boolean | 设置该组件是否允许进行拖拽。
<br/>
默认值:false
<br/>
|
...
...
zh-cn/application-dev/reference/arkui-ts/ts-universal-events-drag-drop.md
浏览文件 @
c804cee5
...
...
@@ -54,9 +54,9 @@ ArkUI组件默认支持拖拽。
| 名称 | 类型 | 描述 |
| ------ | ------ | ---------------- |
| useCustomDropAnimation
<sup>
10+
</sup>
| boolean | 当拖拽结束时,是否使用系统默认落入动画。 |
| setData(unifiedData:
[
UnifiedData
](
../apis/js-apis-data-u
dmf
.md#unifieddata
)
)
<sup>
10+
</sup>
| void | 向DragEvent中设置拖拽相关数据。 |
| getData()
<sup>
10+
</sup>
|
[
UnifiedData
](
../apis/js-apis-data-u
dmf
.md#unifieddata
)
| 从DragEvent中获取拖拽相关数据。 |
| getSummary()
<sup>
10+
</sup>
|
[
Summary
](
../apis/js-apis-data-u
dmf
.md#summary
)
| 从DragEvent中获取拖拽相关数据的简介。 |
| setData(unifiedData:
[
UnifiedData
](
../apis/js-apis-data-u
nifiedDataChannel
.md#unifieddata
)
)
<sup>
10+
</sup>
| void | 向DragEvent中设置拖拽相关数据。 |
| getData()
<sup>
10+
</sup>
|
[
UnifiedData
](
../apis/js-apis-data-u
nifiedDataChannel
.md#unifieddata
)
| 从DragEvent中获取拖拽相关数据。 |
| getSummary()
<sup>
10+
</sup>
|
[
Summary
](
../apis/js-apis-data-u
nifiedDataChannel
.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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录