feat(events): add dropBottom event
This commit is contained in:
2
dist/vue-tree-list.min.js
vendored
2
dist/vue-tree-list.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -285,8 +285,11 @@
|
|||||||
},
|
},
|
||||||
dropBottom () {
|
dropBottom () {
|
||||||
if (!fromComp) return
|
if (!fromComp) return
|
||||||
|
const oldParent = fromComp.model.parent;
|
||||||
fromComp.model.insertAfter(this.model)
|
fromComp.model.insertAfter(this.model)
|
||||||
this.isDragEnterBottom = false
|
this.isDragEnterBottom = false
|
||||||
|
var node = this.getRootNode();
|
||||||
|
node.$emit('drop', {node: fromComp.model, oldParent: oldParent})
|
||||||
},
|
},
|
||||||
getRootNode() {
|
getRootNode() {
|
||||||
var node = this.$parent
|
var node = this.$parent
|
||||||
|
|||||||
Reference in New Issue
Block a user