[AntD图标应该在Tab组件中使用prop或prop属性类型错误

问题描述 投票:0回答:1

我的应用程序出现此错误

Warning: [antd: Icon] Should have `type` prop or `component` prop or `children`.

我正在Tab组件内使用图标这是我的代码sandbox

reactjs antd
1个回答
0
投票

问题来自“图标:””

const tabPanes = [
    {
      key: "1",
      title: "All",
      icon: "",
      content: (
        <DataTable
          dataSource={isAll}
          columns={columns}
          loading={state.loading}
          pagination={state.pagination}
          onChange={handleTableChange}
        />
      ),
      count: 12
    },
© www.soinside.com 2019 - 2024. All rights reserved.