From b6224d9a3fb6ae86d409905e25cf665c6eae2d50 Mon Sep 17 00:00:00 2001 From: dongzhanwu Date: Sun, 9 Jul 2023 14:05:57 +0800 Subject: [PATCH] update doc of ts-universal-events-drag-drop Signed-off-by: dongzhanwu --- .../arkui-ts/ts-universal-events-drag-drop.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-universal-events-drag-drop.md b/zh-cn/application-dev/reference/arkui-ts/ts-universal-events-drag-drop.md index a46c4fd707..2dfb94304f 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-universal-events-drag-drop.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-universal-events-drag-drop.md @@ -326,15 +326,13 @@ struct DragExample { console.log('List onDragLeave, ' + extraParams + 'X:' + event.getX() + 'Y:' + event.getY()) }) .onDrop((event: DragEvent, extraParams: string) => { - if (!extraParams.empty()) { - let jsonString = JSON.parse(extraParams); - if (this.bool) { - // 通过splice方法插入元素 - this.numbers.splice(jsonString.insertIndex, 0, this.text) - this.bool = false - } - this.fruitVisible[this.idx] = Visibility.None + let jsonString = JSON.parse(extraParams); + if (this.bool) { + // 通过splice方法插入元素 + this.numbers.splice(jsonString.insertIndex, 0, this.text) + this.bool = false } + this.fruitVisible[this.idx] = Visibility.None this.getDataFromUDMFWithRetry(event); }) }.width('100%').height('100%').padding({ top: 20 }).margin({ top: 20 }) -- GitLab