// FIXME: 选中tabPane点复制，会出问题，因为复制的组件key一样

export default {
  componentName: 'List.Item',
  title: '列表项',
  category: '',
  docUrl: "",
  screenshot: "",
  devMode: "proCode",
  npm: {
    package: "@pisell/materials",
    version: "1.0.1",
    exportName: "List",
    main: "src/index.tsx",
    destructuring: true,
    subName: "Item",
  },
  props: [
    {
      name: 'actions',
      title: {
        label: '列表操作组',
        tip: '列表操作组',
      },
      propType: { type: 'arrayOf', value: 'node' },
      setter: {
        componentName: 'ArraySetter',
        props: {
          itemSetter: {
            componentName: 'SlotSetter',
            title: '操作组插槽',
            initialValue: {
              type: 'JSSlot',
              value: [],
            },
          },
        },
      },
    },
    {
      name: 'extra',
      title: {
        label: '额外内容',
        tip: '额外内容',
      },
      propType: 'node',
      setter: 'SlotSetter',
    },
  ],
  configure: {
    supports: {
      style: true,
      events: [
        {
          name: "onClick",
          template:
            "onListItemClick(event,${extParams}){\n// 点击列表项时的回调\nconsole.log('onListItemClick', event);}",
        },
      ],
    },
    component: {
      isContainer: true,
      nestingRule: {
        parentWhitelist: ['List','RecordView'],
      },
    },
  },
};
