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

!20745 拖拽示例修改

Merge pull request !20745 from xionghao1002/docs
......@@ -31,16 +31,6 @@ struct ImageExample {
@State AVisible: Visibility = Visibility.Visible
@State dragSuccess :Boolean = false
@Builder pixelMapBuilder() {
Column() {
Column()
.width(100)
.height(100)
.borderRadius(10)
.backgroundColor(Color.Yellow)
}
}
build() {
Column() {
Text('Image拖拽')
......@@ -52,12 +42,6 @@ struct ImageExample {
.border({ width: 1 })
.visibility(this.AVisible)
.draggable(true)
.onDragStart((event: DragEvent, extraParams: string) => {
let image = new UDMF.Image();
let unifiedData = new UDMF.UnifiedData(image);
event.setData(unifiedData);
return this.pixelMapBuilder()
})
.onDragEnd((event: DragEvent) => {
let ret = event.getResult();
if(ret == 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册