fix: 修复 each #8452 导致的取数据变化 breakchange Close: #8616 (#8768)

This commit is contained in:
liaoxuezhi 2023-11-16 17:09:57 +08:00 committed by GitHub
parent e576aa588d
commit 552a6732b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}),