Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
70f8d642
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
70f8d642
编写于
8月 02, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 02, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9517 change dragRet to DragResult
Merge pull request !9517 from 卡哥/master
上级
dfbfe0c7
06054db7
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
17 addition
and
18 deletion
+17
-18
arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/DragController.ets
...i/entry/src/main/ets/MainAbility/pages/DragController.ets
+2
-2
arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/DragEvent.ets
...ent_ui/entry/src/main/ets/MainAbility/pages/DragEvent.ets
+12
-13
arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/dragAdd.ets
...onent_ui/entry/src/main/ets/MainAbility/pages/dragAdd.ets
+3
-3
未找到文件。
arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/DragController.ets
浏览文件 @
70f8d642
...
...
@@ -64,9 +64,9 @@ struct DragController1 {
}
dragController.executeDrag(dragItemInfo, dragInfo)
.then(({event, extraParams}) => {
if (event.getResult() == DragRe
t.DRAG_SUCCESS
) {
if (event.getResult() == DragRe
sult.DRAG_SUCCESSFUL
) {
// ...
} else if (event.getResult() == DragRet.DRAG_FAILED) {
} else if (event.getResult() == DragRe
sul
t.DRAG_FAILED) {
// ...
}
})
...
...
arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/DragEvent.ets
浏览文件 @
70f8d642
...
...
@@ -29,7 +29,7 @@ struct DragEvent {
@State abstractContent: string = "abstract";
@State textContent: string = "";
@State dragBehavior: string = "dragBehavior";
@State dragRe
t: string = "dragRe
t";
@State dragRe
sult: string = "dragResul
t";
@State useCustomDropAnimation1: string = "useCustomDropAnimation";
@State imgState: Visibility = Visibility.Visible;
...
...
@@ -46,7 +46,7 @@ struct DragEvent {
Row() {
Column() {
Text(this.dragBehavior).id("dragBehavior").margin(5)
Text(this.dragRe
t).id("dragRe
t").margin(5)
Text(this.dragRe
sult).id("dragResul
t").margin(5)
Text(this.useCustomDropAnimation1).id("useCustomDropAnimation").margin(5)
Image($r('app.media.icon')).margin(5)
...
...
@@ -57,8 +57,7 @@ struct DragEvent {
.visibility(this.imgState)
.onDragStart((event)=>{
event.dragBehavior = DragBehavior.COPY
event.setResult(DragRet.DRAG_SUCCESS);
event.setResult(DragResult.DRAG_SUCCESSFUL);
})
.onDragEnd((event)=>{
event.dragBehavior = DragBehavior.MOVE
...
...
@@ -68,18 +67,18 @@ struct DragEvent {
this.useCustomDropAnimation1 = "true"
promptAction.showToast({duration: 100, message: 'useCustomDropAnimation==true'});
}
if (event.getResult() === DragRe
t.DRAG_SUCCESS
) {
promptAction.showToast({duration: 100, message: 'Drag
Success
'});
} else if (event.getResult() === DragRet.DRAG_FAILED) {
if (event.getResult() === DragRe
sult.DRAG_SUCCESSFUL
) {
promptAction.showToast({duration: 100, message: 'Drag
DRAG_SUCCESSFUL
'});
} else if (event.getResult() === DragRe
sul
t.DRAG_FAILED) {
promptAction.showToast({duration: 100, message: 'Drag Failed'});
} else if (event.getResult() === DragRet.DRAG_CANCELED) {
} else if (event.getResult() === DragRe
sul
t.DRAG_CANCELED) {
promptAction.showToast({duration: 100, message: 'Drag Canceled'});
} else if (event.getResult() === DragRet.DROP_DISABLED) {
} else if (event.getResult() === DragRe
sul
t.DROP_DISABLED) {
promptAction.showToast({duration: 100, message: 'Drop Disabled'});
}else if (event.getResult() === DragRet.DROP_ENABLED) {
}else if (event.getResult() === DragRe
sul
t.DROP_ENABLED) {
promptAction.showToast({duration: 100, message: 'Drop Enabled'});
}
this.dragRet = event.getResult().toString()
this.dragRe
sul
t = event.getResult().toString()
})
Button('touch to execute drag')
...
...
@@ -93,9 +92,9 @@ struct DragEvent {
extraParams: ''
}
dragController.executeDrag(this.DraggingBuilder.bind(this), dragInfo, (err, {event, extraParams}) => {
if (event.getResult() == DragRe
t.DRAG_SUCCESS
) {
if (event.getResult() == DragRe
sult.DRAG_SUCCESSFUL
) {
// ...
} else if (event.getResult() == DragRet.DRAG_FAILED) {
} else if (event.getResult() == DragRe
sul
t.DRAG_FAILED) {
// ...
}
})
...
...
arkui/ace_ets_component_ui/entry/src/main/ets/MainAbility/pages/dragAdd.ets
浏览文件 @
70f8d642
...
...
@@ -57,9 +57,9 @@ struct Index {
.margin({left: 15})
.visibility(this.imgState)
.onDragEnd((event)=>{
if (event.getResult() === DragRe
t.DRAG_SUCCESS
) {
if (event.getResult() === DragRe
sult.DRAG_SUCCESSFUL
) {
promptAction.showToast({duration: 100, message: 'Drag Success'});
} else if (event.getResult() === DragRet.DRAG_FAILED) {
} else if (event.getResult() === DragRe
sul
t.DRAG_FAILED) {
promptAction.showToast({duration: 100, message: 'Drag failed'});
}
})
...
...
@@ -130,7 +130,7 @@ struct Index {
this.imageHeight = 100;
this.imgState = Visibility.None;
})
event.setResult(DragRe
t.DRAG_SUCCESS
);
event.setResult(DragRe
sult.DRAG_SUCCESSFUL
);
})
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录