I have zone that contain a lot of elements.
This elements generated with Vue.compile( ) and creating new instance:
const instance = Vue.extend(resizableBox);
let completeElem = new instance (
{
propsData: {
...
},
parent: this,
store
}
);
let compiledHTML = Vue.compile(this.html); // some html string
completeElem.$slots.innerNode = [completeElem.$createElement(compiledHTML)];
completeElem.$mount('.replaceMe');
Generated HTML:
<div class="zone">
<div class="resizer" style="left: 0px; top: 20px">
<div class="handlers">...</div>
<div class="textNode">
<span>IT'S TEXT</span>
</div>
</div>
</div>
I need to cut generated node with all methods and data in. And then paste it in different place.
I can't use render func, because all my elements are movable (in zone bounds) and i can spawn new from list (with drag&drop api).
I can't recreate new instance for every move, because i need writed data