为component添加id,并增加点击获取组件id的功能

This commit is contained in:
lhj
2024-10-02 21:31:37 +08:00
parent 7089acacc2
commit 4a30d7fb37
5 changed files with 24 additions and 20 deletions

View File

@ -11,7 +11,7 @@
<script setup lang="ts">
import { useDraggable} from 'vue-draggable-plus'
import { computed, ref } from 'vue'
import { IPageComponent } from '../type/IComponent'
import { IPageComponent } from '../type/IPageComponent'
interface Props {
modelValue: IPageComponent[]
@ -37,7 +37,7 @@ useDraggable(el, list, {
onUpdate() {
console.log('update list1')
},
onAdd: (e) => {
onAdd: () => {
// console.log(e)
console.log('add list1')
},