1
0
mirror of https://github.com/sahadev/vue-component-creater-ui.git synced 2025-06-07 21:54:05 +08:00

fix: nest position adjust

This commit is contained in:
shangbin 2021-12-14 16:12:26 +08:00
parent ba575244e1
commit 70996d57bf

View File

@ -1,5 +1,5 @@
<template>
<draggable class="dragArea" tag="ul" :list="data" @start="onStartDrag" @choose="onClick"
<draggable class="dragArea" tag="ul" :list="data" @start="onStartDrag" @choose="onClick" :group="{ name: 'g1' }"
@end="onEndDrag">
<template #item="{ element }">
<li class="itemArea">
@ -34,7 +34,7 @@ export default {
event.item.classList.add("is-dragging");
},
onClick(event) {
if(this.$store.state.currentEditComp){
if (this.$store.state.currentEditComp) {
this.$store.state.currentEditComp.item.classList.remove("is-dragging");
}