1
0
mirror of https://github.com/sahadev/vue-component-creater-ui.git synced 2025-06-08 14:34:05 +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> <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"> @end="onEndDrag">
<template #item="{ element }"> <template #item="{ element }">
<li class="itemArea"> <li class="itemArea">
@ -28,13 +28,13 @@ export default {
computed: { computed: {
}, },
methods: { methods: {
getRawComponentKey, getRawComponentKey,
getRawComponentContent, getRawComponentContent,
onStartDrag(event) { onStartDrag(event) {
event.item.classList.add("is-dragging"); event.item.classList.add("is-dragging");
}, },
onClick(event) { onClick(event) {
if(this.$store.state.currentEditComp){ if (this.$store.state.currentEditComp) {
this.$store.state.currentEditComp.item.classList.remove("is-dragging"); this.$store.state.currentEditComp.item.classList.remove("is-dragging");
} }