amis icon indicating copy to clipboard operation
amis copied to clipboard

使用 Flex 布局 unique "key" prop

Open Brian175 opened this issue 5 years ago • 1 comments

描述问题:

使用组件里面的 Flex 布局,chrome console error 信息: Warning: Each child in a list should have a unique "key" prop.

截图或视频:

image

如何复现(请务必完整填写下面内容):

使用 Flex 布局就会出现。

  1. 你是如何使用 amis 的? npm
  2. 粘贴有问题的完整 amis schema 代码:
// JSON.stringify()
{
          type: 'flex',
          alignItems: 'center',
          justify: 'left',
          items: [
            {
              type: 'html',
              html:
                '<span style="font-weight: bold; font-size: 12px; line-height: 14px; color: #333;"> 1</span>'
            },
            {
              type: 'action',
              label: 'view',
              level: 'link',
              size: 'm',
              actionType: 'dialog',
              dialog: { title: '2'}
            }
          ]
        }
  1. 操作步骤 使用 Flex 布局就会出现。

Brian175 avatar Jun 23 '21 03:06 Brian175

suggestion: add unique key

Brian175 avatar Jun 23 '21 03:06 Brian175