提交 b6224d9a 编写于 作者: D dongzhanwu

update doc of ts-universal-events-drag-drop

Signed-off-by: Ndongzhanwu <dongzhanwu1@huawei.com>
上级 8213c4aa
...@@ -326,15 +326,13 @@ struct DragExample { ...@@ -326,15 +326,13 @@ struct DragExample {
console.log('List onDragLeave, ' + extraParams + 'X:' + event.getX() + 'Y:' + event.getY()) console.log('List onDragLeave, ' + extraParams + 'X:' + event.getX() + 'Y:' + event.getY())
}) })
.onDrop((event: DragEvent, extraParams: string) => { .onDrop((event: DragEvent, extraParams: string) => {
if (!extraParams.empty()) { let jsonString = JSON.parse(extraParams);
let jsonString = JSON.parse(extraParams); if (this.bool) {
if (this.bool) { // 通过splice方法插入元素
// 通过splice方法插入元素 this.numbers.splice(jsonString.insertIndex, 0, this.text)
this.numbers.splice(jsonString.insertIndex, 0, this.text) this.bool = false
this.bool = false
}
this.fruitVisible[this.idx] = Visibility.None
} }
this.fruitVisible[this.idx] = Visibility.None
this.getDataFromUDMFWithRetry(event); this.getDataFromUDMFWithRetry(event);
}) })
}.width('100%').height('100%').padding({ top: 20 }).margin({ top: 20 }) }.width('100%').height('100%').padding({ top: 20 }).margin({ top: 20 })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册