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

Merge branch 'vue3' into vue3-vant

This commit is contained in:
shangbin 2021-12-14 16:14:24 +08:00
commit 10379aecb6

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">
@ -28,13 +28,13 @@ export default {
computed: {
},
methods: {
getRawComponentKey,
getRawComponentKey,
getRawComponentContent,
onStartDrag(event) {
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");
}