diff --git a/packages/amis/src/renderers/Each.tsx b/packages/amis/src/renderers/Each.tsx index f66f0792f..900891a28 100644 --- a/packages/amis/src/renderers/Each.tsx +++ b/packages/amis/src/renderers/Each.tsx @@ -27,8 +27,7 @@ function EachItem(props: EachExtraProps) { const ctx = React.useMemo( () => createObject(data, { - ...(isObject(item) ? item : {}), - [name]: item, + ...(isObject(item) ? {index, ...item} : {[name]: item}), [itemKeyName || 'item']: item, [indexKeyName || 'index']: index }),