You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.8 KiB
64 lines
2.8 KiB
6 years ago
|
---
|
||
|
category: Components
|
||
|
subtitle: 排版
|
||
|
type: 通用
|
||
|
title: Typography
|
||
|
cols: 1
|
||
|
---
|
||
|
|
||
|
文本的基本格式及常见操作。
|
||
|
|
||
|
## 何时使用
|
||
|
|
||
|
当需要展示标题、文本内容时使用。例如:
|
||
|
* 拷贝
|
||
|
* 省略/展开
|
||
|
* 可编辑
|
||
|
* Markdown 排版样式
|
||
|
|
||
|
## API
|
||
|
|
||
|
### Typography.Text
|
||
|
|
||
|
| 参数 | 说明 | 类型 | 默认值 |
|
||
|
| --- | --- | --- | --- |
|
||
|
| copyable | 是否可拷贝,为对象时可设置复制文本以回调函数 | boolean \| { text: string, onCopy: Function } | false |
|
||
|
| delete | 添加删除线样式 | boolean | false |
|
||
|
| disabled | 禁用文本 | boolean | false |
|
||
|
| editable | 是否可编辑,为对象时可对编辑进行控制 | boolean \| { editing: boolean, onStart: Function, onChange: Function(string) } | false |
|
||
|
| ellipsis | 设置自动溢出省略 | boolean | false |
|
||
|
| mark | 添加标记样式 | boolean | false |
|
||
|
| underline | 添加下划线样式 | boolean | false |
|
||
|
| strong | 是否加粗 | boolean | false |
|
||
|
| type | 文本类型 | `secondary`, `warning`, `danger` | - |
|
||
|
|
||
|
### Typography.Title
|
||
|
|
||
|
| 参数 | 说明 | 类型 | 默认值 |
|
||
|
| --- | --- | --- | --- |
|
||
|
| copyable | 是否可拷贝,为对象时可设置复制文本以回调函数 | boolean \| { text: string, onCopy: Function } | false |
|
||
|
| delete | 添加删除线样式 | boolean | false |
|
||
|
| disabled | 禁用文本 | boolean | false |
|
||
|
| editable | 是否可编辑,为对象时可对编辑进行控制 | boolean \| { editing: boolean, onStart: Function, onChange: Function(string) } | false |
|
||
|
| ellipsis | 自动溢出省略,为对象时可设置省略行数与是否可展开等 | boolean \| { rows: number, expandable: boolean, onExpand: Function } | false |
|
||
|
| level | 重要程度,相当于 `h1`、`h2`、`h3`、`h4` | number: `1`, `2`, `3`, `4` | 1 |
|
||
|
| mark | 添加标记样式 | boolean | false |
|
||
|
| underline | 添加下划线样式 | boolean | false |
|
||
|
| onChange | 当用户提交编辑内容时触发 | Function(string) | - |
|
||
|
| type | 文本类型 | `secondary`, `warning`, `danger` | - |
|
||
|
|
||
|
### Typography.Paragraph
|
||
|
|
||
|
| 参数 | 说明 | 类型 | 默认值 |
|
||
|
| --- | --- | --- | --- |
|
||
|
|
||
|
| delete | 添加删除线样式 | boolean | false |
|
||
|
| disabled | 禁用文本 | boolean | false |
|
||
|
| editable | 是否可编辑,为对象时可对编辑进行控制 | boolean \| { editing: boolean, onStart: Function, onChange: Function(string) } | false |
|
||
|
| ellipsis | 自动溢出省略,为对象时可设置省略行数与是否可展开等 | boolean \| { rows: number, expandable: boolean, onExpand: Function } | false |
|
||
|
| mark | 添加标记样式 | boolean | false |
|
||
|
| underline | 添加下划线样式 | boolean | false |
|
||
|
| onChange | 当用户提交编辑内容时触发 | Function(string) | - |
|
||
|
| strong | 是否加粗 | boolean | false |
|
||
|
| type | 文本类型 | `secondary`, `warning`, `danger` | - |
|