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">
|
2019-02-19 11:42:05 +08:00
|
|
|
<Text>Ant Design</Text>
|
|
|
|
<Text type="secondary">Ant Design</Text>
|
|
|
|
<Text type="warning">Ant Design</Text>
|
|
|
|
<Text type="danger">Ant Design</Text>
|
|
|
|
<Text disabled>Ant Design</Text>
|
|
|
|
<Text mark>Ant Design</Text>
|
|
|
|
<Text code>Ant Design</Text>
|
2020-05-16 14:43:29 +08:00
|
|
|
<Text keyboard>Ant Design</Text>
|
2019-02-19 11:42:05 +08:00
|
|
|
<Text underline>Ant Design</Text>
|
|
|
|
<Text delete>Ant Design</Text>
|
|
|
|
<Text strong>Ant Design</Text>
|
2020-05-11 14:28:57 +08:00
|
|
|
<Link href="https://ant.design" target="_blank">
|
|
|
|
Ant Design
|
|
|
|
</Link>
|
|
|
|
</Space>,
|
2019-05-07 14:57:32 +08:00
|
|
|
mountNode,
|
2019-02-19 11:42:05 +08:00
|
|
|
);
|
|
|
|
```
|