Vue.Draggable icon indicating copy to clipboard operation
Vue.Draggable copied to clipboard

使用 transition-group , 需要在slot中template内至少2层html标签

Open aohanhe opened this issue 2 years ago • 0 comments

我使用vuedraggable-es在我们项目中时,以下代码会报错‘使用 transition-group , 需要在slot中template内至少2层html标签’,这个是bug还是需要如何来解决?我试过只有在DragPanelVue外层加一个html的标签,例如,div才行,但这样就不能满足我的需求,在template的子层不能是自定义的组件。

<draggable v-model="panels" tag="transition-group" item-key="uuid"> <template #item="{ element }"> <DragPanelVue v-model:width="element.w" v-model:height="element.h" class="xbg-bg-slate-100" :uuid="element.uuid" :style="{ 'background-color': element.bgcolor }" @remove="remoteByUuid" > <div> <span>{{ element }}</span> </div> </DragPanelVue> </template> </draggable>

aohanhe avatar Dec 02 '22 06:12 aohanhe