移除无用代码
This commit is contained in:
@ -41,7 +41,7 @@ import { onMounted, ref } from 'vue';
|
||||
import NestedFunction from './NestedFunction.vue';
|
||||
import DynamicComponent from './DynamicComponent.vue';
|
||||
|
||||
import { SortableEvent, useDraggable, VueDraggable } from 'vue-draggable-plus';
|
||||
import { SortableEvent, useDraggable } from 'vue-draggable-plus';
|
||||
import { uuid } from 'lsp-uuid';
|
||||
import { IComponent } from '../type/IComponent.ts';
|
||||
import { componentScheme } from '../schemes/scheme.ts';
|
||||
@ -60,50 +60,6 @@ onMounted(() => {
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
const el = ref()
|
||||
|
||||
const onStart = (e: SortableEvent) => {
|
||||
console.log('start', e)
|
||||
}
|
||||
|
||||
const onEnd = (e: SortableEvent) => {
|
||||
console.log('onEnd', e)
|
||||
}
|
||||
|
||||
const onUpdate = () => {
|
||||
console.log('update')
|
||||
}
|
||||
|
||||
useDraggable(el, componentsList, {
|
||||
animation: 150,
|
||||
group: { name: 'designer', pull: 'clone', put: false },
|
||||
sort: false,
|
||||
onClone() {
|
||||
console.log('clone')
|
||||
},
|
||||
clone(element: Record<'id' | 'name' | 'type' | 'children' | 'props' | 'text' | 'class' | 'style' | 'slots', any>) {
|
||||
return {
|
||||
id: `${element.id}-${uuid()}`,
|
||||
name: element.name,
|
||||
type: element.type,
|
||||
props: element.props,
|
||||
class: element.class,
|
||||
designer: '',
|
||||
text: element.text,
|
||||
children: [],
|
||||
style: element.style,
|
||||
visible: "",
|
||||
slots: element.slots,
|
||||
disable: "",
|
||||
events: {},
|
||||
loop: {},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
useDraggable(el2, componentsList, {
|
||||
animation: 150,
|
||||
group: { name: 'designer', pull: 'clone', put: false },
|
||||
|
||||
Reference in New Issue
Block a user