Skip to content

Commit 0abcd25

Browse files
authored
fix: fix space duplicated key (#7048)
1 parent 72b8d09 commit 0abcd25

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: components/space/index.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ const Space = defineComponent({
107107
style={[style.value, attrs.style as CSSProperties]}
108108
>
109109
{items.map((child, index) => {
110-
const originIndex = children.indexOf(child);
110+
let originIndex = children.indexOf(child);
111+
if (originIndex === -1) {
112+
originIndex = `$$space-${index}`;
113+
}
111114
let itemStyle: CSSProperties = {};
112115
if (!supportFlexGap.value) {
113116
if (direction === 'vertical') {

0 commit comments

Comments
 (0)