mirror of
https://github.com/vform666/variant-form3-vite.git
synced 2025-06-21 09:35:58 +08:00
解决Vue.Draggable在Vue新版3.2.32上运行报错“Cannot set properties of null (setting '__draggable_context')”的问题。
This commit is contained in:
@ -13,14 +13,16 @@
|
||||
tag="transition-group" :component-data="{name: 'fade'}"
|
||||
handle=".drag-handler" @end="onDragEnd" @add="onDragAdd" @update="onDragUpdate" :move="checkMove">
|
||||
<template #item="{ element: widget, index }">
|
||||
<template v-if="'container' === widget.category">
|
||||
<component :is="getWidgetName(widget)" :widget="widget" :designer="designer" :key="widget.id" :parent-list="designer.widgetList"
|
||||
:index-of-parent-list="index" :parent-widget="null"></component>
|
||||
</template>
|
||||
<template v-else>
|
||||
<component :is="getWidgetName(widget)" :field="widget" :designer="designer" :key="widget.id" :parent-list="designer.widgetList"
|
||||
:index-of-parent-list="index" :parent-widget="null" :design-state="true"></component>
|
||||
</template>
|
||||
<div class="transition-group-el">
|
||||
<template v-if="'container' === widget.category">
|
||||
<component :is="getWidgetName(widget)" :widget="widget" :designer="designer" :key="widget.id" :parent-list="designer.widgetList"
|
||||
:index-of-parent-list="index" :parent-widget="null"></component>
|
||||
</template>
|
||||
<template v-else>
|
||||
<component :is="getWidgetName(widget)" :field="widget" :designer="designer" :key="widget.id" :parent-list="designer.widgetList"
|
||||
:index-of-parent-list="index" :parent-widget="null" :design-state="true"></component>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</draggable>
|
||||
</div>
|
||||
|
@ -16,9 +16,9 @@ export const generateCode = function(formJson, codeType= 'vue') {
|
||||
<body>
|
||||
|
||||
<div id="app">
|
||||
<v-form-render :form-json="formJson" :form-data="formData" :option-data="optionData" ref="vFormRef">
|
||||
<v-form-render :form-json="formJson" :form-data="formData" :option-data="optionData" ref="vFormRef">
|
||||
</v-form-render>
|
||||
<el-button type="primary" @click="submitForm">Submit</el-button>
|
||||
<el-button type="primary" @click="submitForm">Submit</el-button>
|
||||
</div>
|
||||
|
||||
<script src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/3.2.30/vue.global.min.js"></script>
|
||||
|
Reference in New Issue
Block a user