update demo

This commit is contained in:
王劲鹏 2022-06-30 16:39:47 +08:00 committed by osborn
parent 5071dfbfe5
commit 6cafcbc688

View File

@ -27,7 +27,15 @@ class ListDragDemo extends Panel {
}, },
layoutConfig: layoutConfig().most(), layoutConfig: layoutConfig().most(),
canDrag: true, canDrag: true,
beforeDragging: (from) => {
loge(`beforeDragging from: ${from}`)
},
onDragging: (from, to) => {
loge(`onDragging from: ${from}, to: ${to}`)
},
onDragged: (from, to) => { onDragged: (from, to) => {
loge(`onDragged from: ${from}, to: ${to}`)
const tmp = this.data[from] const tmp = this.data[from]
this.data.splice(from, 1) this.data.splice(from, 1)
insertAt(this.data, to, tmp) insertAt(this.data, to, tmp)