提交 5a72502b 编写于 作者: X xionghao1002

拖拽示例修改

Signed-off-by: Nxionghao1002 <xionghao43@huawei.com>
上级 65afc80b
......@@ -34,16 +34,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拖拽')
......@@ -55,12 +45,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.
先完成此消息的编辑!
想要评论请 注册