提交 7422ae8e 编写于 作者: Z zhangkai

触屏事件-拖拽事件-跨窗口拖拽示例代码-移除无效代码

Signed-off-by: Nzhangkai <zhangkai351@huawei.com>
Change-Id: I523ef58b22b41665dd29261f48b9b689deea85d6
上级 ef7b036a
......@@ -87,11 +87,7 @@ import image from '@ohos.multimedia.image';
@Entry
@Component
struct Index {
@State text: string = ''
@State bool1: boolean = false
@State bool2: boolean = false
@State visible: Visibility = Visibility.Visible
@State pixelMap: PixelMap = undefined
private pixelMapReader = undefined
aboutToAppear() {
......@@ -115,7 +111,6 @@ struct Index {
const promise = image.createPixelMap(color, opts);
promise.then((data) => {
console.info('create pixmap has info message: ' + JSON.stringify(data))
this.pixelMap = data;
this.pixelMapReader = data;
})
}
......@@ -151,8 +146,6 @@ struct Index {
.visibility(this.visible)
.onDragStart(() => { //启动跨窗口拖拽
console.info('Text onDrag start')
this.bool1 = true
this.text = 'TextDrag'
return { pixelMap: this.pixelMapReader, extraInfo: 'custom extra info.' }
})
.onDrop((event: DragEvent, extraParams: string) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册