Comments (9)
no, it doesn't support this case.
from vue-draggable-nested-tree.
I got it.
Firstly, you need fix the #38
Then add information about target in drop event (DraggableTreeNode.vue), appendTo and targetTree:
drop: (e, opt, store) => {
const draggableHelperInfo = {
event: e, options: opt, store,
appendTo: dplh._vm.$parent.data,
targetTree: dplh._vm.store
}
And just hook ondragend
in your code, return false and push pure copy of element into target:
ondragend(node, draggableHelperInfo) {
if(!draggableHelperInfo.appendTo.hasOwnProperty('children'))
draggableHelperInfo.appendTo['children']=[];
draggableHelperInfo.appendTo.children.push(draggableHelperInfo.targetTree.pure(node, true));
return false;
}
i realize that in FlameArtLab@a11ff52
This solution visually worse, than clone in Nested Sortable for jquery, and it only append, but it worked good and you can use insertAfter\Before in ur code for precise positioning
from vue-draggable-nested-tree.
I think ondragstart is better for clone. The feature will make it more complex. I may add it in the future.
from vue-draggable-nested-tree.
so now in version 2.2.17 ,how can i clone node and drag?
from vue-draggable-nested-tree.
still not support
from vue-draggable-nested-tree.
so now in version 2.2.17 ,how can i clone node and drag?
still not support
from vue-draggable-nested-tree.
Hi!
still not support?
from vue-draggable-nested-tree.
This is supported in new repo: he-tree-vue https://he-tree-vue.phphe.com/api.html#clonewhendrag
vue-draggable-nested-tree don't support this, and it is no longer be maintained
from vue-draggable-nested-tree.
Well thank you!
from vue-draggable-nested-tree.
Related Issues (20)
- Scroll when dragging nodes at edges HOT 4
- click to get data is not showing all data HOT 1
- Drag ghosts are hidden behind other components when dragging HOT 1
- update data does not update the tree view HOT 2
- Collapse all trees when dragging HOT 1
- 多选情况下的拖拽功能 HOT 1
- Uncaught ReferenceError: regeneratorRuntime is not defined HOT 8
- 'nodeOpenChanged' events cannot be listened
- Get Index or path ? HOT 1
- manual update call to force the tree to refresh HOT 5
- Preventing drop for certain tree nodes HOT 8
- not working drag.. HOT 3
- "TypeError: Cannot read property '_vm' of undefined" HOT 4
- Disable nesting for specific tree HOT 4
- not compatible with corejs@3 ? HOT 7
- how to use `store.pure`another button HOT 2
- Does this support multiple select? Can we select multiple elements and drag-drop? HOT 5
- Helper.js triggering CSP for inline style HOT 2
- Make only parent undraggable HOT 1
- Find replaced node HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-draggable-nested-tree.