2019-02-19 11:42:05 +08:00
|
|
|
---
|
|
|
|
order: 2
|
|
|
|
title:
|
2020-05-11 14:28:57 +08:00
|
|
|
zh-CN: 文本与超链接组件
|
|
|
|
en-US: Text and Link Component
|
2019-02-19 11:42:05 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
2020-05-11 14:28:57 +08:00
|
|
|
内置不同样式的文本以及超链接组件。
|
2019-02-19 11:42:05 +08:00
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
2020-05-11 14:28:57 +08:00
|
|
|
Provides multiple types of text and link.
|
2019-02-19 11:42:05 +08:00
|
|
|
|
|
|
|
```jsx
|
2020-05-11 14:28:57 +08:00
|
|
|
import { Typography, Space } from 'antd';
|
2019-02-19 11:42:05 +08:00
|
|
|
|
2020-05-11 14:28:57 +08:00
|
|
|
const { Text, Link } = Typography;
|
2019-02-19 11:42:05 +08:00
|
|
|
|
|
|
|
ReactDOM.render(
|
2020-05-11 14:28:57 +08:00
|
|
|
<Space direction="vertical">
|
2020-09-06 11:28:49 +08:00
|
|
|
<Text>Ant Design (default)</Text>
|
|
|
|
<Text type="secondary">Ant Design (secondary)</Text>
|
|
|
|
<Text type="success">Ant Design (success)</Text>
|
|
|
|
<Text type="warning">Ant Design (warning)</Text>
|
|
|
|
<Text type="danger">Ant Design (danger)</Text>
|
|
|
|
<Text disabled>Ant Design (disabled)</Text>
|
|
|
|
<Text mark>Ant Design (mark)</Text>
|
|
|
|
<Text code>Ant Design (code)</Text>
|
|
|
|
<Text keyboard>Ant Design (keyboard)</Text>
|
|
|
|
<Text underline>Ant Design (underline)</Text>
|
|
|
|
<Text delete>Ant Design (delete)</Text>
|
|
|
|
<Text strong>Ant Design (strong)</Text>
|
2021-05-24 16:24:00 +08:00
|
|
|
<Text italic>Ant Design (italic)</Text>
|
2020-05-11 14:28:57 +08:00
|
|
|
<Link href="https://ant.design" target="_blank">
|
2020-09-06 11:28:49 +08:00
|
|
|
Ant Design (Link)
|
2020-05-11 14:28:57 +08:00
|
|
|
</Link>
|
|
|
|
</Space>,
|
2019-05-07 14:57:32 +08:00
|
|
|
mountNode,
|
2019-02-19 11:42:05 +08:00
|
|
|
);
|
|
|
|
```
|