移除不需要的文件
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 } from 'vue-draggable-plus';
|
||||
import { useDraggable } from 'vue-draggable-plus';
|
||||
import { uuid } from 'lsp-uuid';
|
||||
import { IComponent } from '../type/IComponent.ts';
|
||||
import { componentScheme } from '../schemes/scheme.ts';
|
||||
|
||||
@ -1,37 +0,0 @@
|
||||
<template>
|
||||
<ul v-draggable="[list, { group: 'g1' }]" class="drag-area">
|
||||
<li v-for="el in modelValue" :key="el.name">
|
||||
<p>{{ el.name }}</p>
|
||||
<nested-directive v-model="el.children" />
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { vDraggable } from 'vue-draggable-plus'
|
||||
import { computed } from 'vue'
|
||||
|
||||
interface IList {
|
||||
name: string
|
||||
children: IList[]
|
||||
}
|
||||
|
||||
interface Props {
|
||||
modelValue: IList[]
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
interface Emits {
|
||||
(e: 'update:modelValue', value: IList[]): void
|
||||
}
|
||||
const emits = defineEmits<Emits>()
|
||||
const list = computed({
|
||||
get: () => props.modelValue,
|
||||
set: value => emits('update:modelValue', value)
|
||||
})
|
||||
</script>
|
||||
<style scoped>
|
||||
.drag-area {
|
||||
min-height: 50px;
|
||||
outline: 1px dashed;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user