Table component of antd, render Tag component reported an error

the Table component in Antd has the method of redner. The rendering Button component is ok, but the rendering Tab component reports an error. Ask for expert assistance. Thank you.

import is as follows.

import { Button, Tag } from "ant";

render the code for the Button component

<Table.Column
    title=""
    width="120px"
    render={(text, record) => (
      <span>
        <Button
          type="primary"
          size="small"
          onClick={() => this.showTime(record)}
        >
          
        </Button>
      </span>
    )}
/>
The code to render the Tag component is as follows.

<Table.Column
    title=""
    dataIndex="status"
    render={(text, record) => (
      <span>
        <Tag color="red">{text}</Tag>
      </span>
    )}
/>

the error is as follows.

341:18-21 "ant" does not contain an export named "Tag".
Oct.15,2021

are you misspelling the sentence import {Button, Tag} from 'ant';? I'm not sure if
is import {Button, Tag} from 'antd';.


the error message is very clear. First, remove the Tag of import to see if there is still an error. If no error is reported, it means that the current ant module does not output Tag components

.
Menu