fix
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
:animation="150"
|
||||
:group="{ name: 'designer', pull: 'clone', put: false }"
|
||||
:sort="false"
|
||||
@clone="clone"
|
||||
:clone="clone"
|
||||
@start="onStart"
|
||||
@end="onEnd"
|
||||
>
|
||||
@ -36,8 +36,6 @@
|
||||
@update="onPreviewUpdate"
|
||||
@stop="onPreviewStop"
|
||||
>
|
||||
{{ store.previewScheme }}
|
||||
|
||||
<DynamicComponent v-for="component in store.previewScheme" :key="component.id" :componentData="component">
|
||||
{{ component.id }}
|
||||
</DynamicComponent>
|
||||
@ -52,7 +50,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import {Link} from "@arco-design/web-vue";
|
||||
import {DraggableEvent, VueDraggable} from "vue-draggable-plus";
|
||||
import {onMounted, ref, watch} from 'vue';
|
||||
import {uuid} from 'lsp-uuid';
|
||||
@ -134,7 +132,7 @@ onMounted(() => {
|
||||
// @ts-ignore
|
||||
});
|
||||
|
||||
function clone(element: Record<'name' | 'id' | 'type' | 'props' | 'class' | 'text' | 'style' | 'slots', IComponent>) {
|
||||
function clone(element: Record<'name' | 'id' | 'type' | 'props' | 'class' | 'text' | 'style' | 'slots'|'visible'|'disable', IComponent>) {
|
||||
console.log("clone", element)
|
||||
return {
|
||||
id: `${element.type}-${uuid()}`,
|
||||
@ -146,9 +144,9 @@ function clone(element: Record<'name' | 'id' | 'type' | 'props' | 'class' | 'tex
|
||||
text: element.text,
|
||||
children: [],
|
||||
style: element.style,
|
||||
visible: "",
|
||||
visible: element.visible,
|
||||
slots: element.slots,
|
||||
disable: "",
|
||||
disable: element.visible,
|
||||
events: {},
|
||||
loop: {},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user