-
<SchemaField.Array
name='skuList'
title=' 商品属性'
x-decorator='FormItem'
x-component='ArrayItems'>
<SchemaField.Object x-component='ArrayItems.Item'>
<SchemaField.Void x-component='Space'>
<SchemaField.String
name='img'
x-decorator='FormItem'
x-component='TaUpload'
x-component-props={{
// 想在这里拿到相应的 SchemaField.Array 的索引,或者说有没有其方式知道当前组件在当前列表所在的位置
}}
/>
<SchemaField.Void x-decorator='FormItem' x-component='ArrayItems.Remove' />
<SchemaField.Void x-decorator='FormItem' x-component='ArrayItems.MoveUp' />
<SchemaField.Void x-decorator='FormItem' x-component='ArrayItems.MoveDown' />
</SchemaField.Void>
</SchemaField.Object>
<SchemaField.Void x-component='ArrayItems.Addition' title='添加产品信息' />
</SchemaField.Array> |
Beta Was this translation helpful? Give feedback.
Answered by
janryWang
Apr 19, 2021
Replies: 1 comment 2 replies
-
写一个自定义组件,在自定义组件内使用ArrayItems.useIndex这个hook就能拿到索引了 |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
janryWang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
写一个自定义组件,在自定义组件内使用ArrayItems.useIndex这个hook就能拿到索引了