提交 b5f78228 编写于 作者: Z zhangkai 提交者: 张凯

fixed 7422ae8e from https://gitee.com/loki-zhang/docs/pulls/18180

触屏事件-拖拽事件-跨窗口拖拽示例代码-移除无效代码
Signed-off-by: Nzhangkai <zhangkai351@huawei.com>
Change-Id: I523ef58b22b41665dd29261f48b9b689deea85d6
上级 dc067a81
......@@ -83,11 +83,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() {
......@@ -111,7 +107,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;
})
}
......@@ -147,8 +142,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.
先完成此消息的编辑!
想要评论请 注册