diff --git a/zh-cn/application-dev/ui/arkts-common-events-touch-screen-event.md b/zh-cn/application-dev/ui/arkts-common-events-touch-screen-event.md index 0675d83fb4ae6d558b03081a103019aef39e4ec8..f1dcb94d55dfa89441d4a006aee33ff4e81404e8 100644 --- a/zh-cn/application-dev/ui/arkts-common-events-touch-screen-event.md +++ b/zh-cn/application-dev/ui/arkts-common-events-touch-screen-event.md @@ -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) => {