mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-11 17:19:29 +00:00
fix TransitionGroup children have to be keyed and duplicate attribute v-bind
This commit is contained in:
@@ -96,7 +96,8 @@ export default {
|
||||
}
|
||||
}
|
||||
else {
|
||||
placeholders.push({ x: x, y: y, w: 1, h: 1, placeholder: true });
|
||||
placeholders.push({ x: x, y: y, w: 1, h: 1, placeholder: true,
|
||||
data: { id: 'placeholder_' + String(placeholders.length).padStart(4, "0") } });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,8 +359,8 @@ export default {
|
||||
@mouseleave="mouseLeave">
|
||||
<TransitionGroup tag="div">
|
||||
<grid-item
|
||||
v-for="item in (mode == 0 && active? placedItems_withPlaceholders : placedItems)"
|
||||
:key="item.id"
|
||||
v-for="item in (mode == 0 && active ? placedItems_withPlaceholders : placedItems)"
|
||||
:key="item.data.id"
|
||||
:item="item"
|
||||
@start-move="startMove"
|
||||
@start-resize="startResize"
|
||||
@@ -378,7 +378,7 @@ export default {
|
||||
paddingRight: 'var(--fhc-dg-item-padding-horizontal)'
|
||||
}">
|
||||
<template v-slot="item">
|
||||
<slot v-bind="item.data" v-bind="item" :x="item.x" :y="item.y" ></slot>
|
||||
<slot v-bind="{...item, ...item.data}" :x="item.x" :y="item.y" ></slot>
|
||||
</template>
|
||||
</grid-item>
|
||||
</TransitionGroup>
|
||||
|
||||
Reference in New Issue
Block a user