Skip to content

Commit

Permalink
feat(tooltip): update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lijinke666 committed Dec 6, 2021
1 parent 8ec9aac commit 20ac4b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 3 additions & 2 deletions s2-site/docs/common/tooltip.zh.md
Expand Up @@ -13,7 +13,8 @@ object **必选**,_default:null_ 功能描述: tooltip 配置
| operation | tooltip 操作配置项 | [TooltipOperation](#tooltipoperation) | - | |
| row | 行头配置 | [BaseTooltipConfig](#basetooltipconfig) | - | |
| col | 列头配置 | [BaseTooltipConfig](#basetooltipconfig) | - | |
| cell | 单元格配置 | [BaseTooltipConfig](#basetooltipconfig) | - | |
| data | 数值配置 | [BaseTooltipConfig](#basetooltipconfig) | - | |
| corner | 角头配置 | [BaseTooltipConfig](#basetooltipconfig) | - | |
| renderTooltip | 自定义整个 tooltip, 可以继承 BaseTooltip 自己重写一些方法 | [RenderTooltip](#rendertooltip) | - | |
| content | 自定义 tooltip 内容 | `React.ReactNode | Element | string` | - | |
| autoAdjustBoundary | 当 tooltip 超过边界时自动调整显示位置, container: 图表区域, body: 整个浏览器窗口, 设置为 `null` 可关闭此功能 | `container` \| `body` | `body` | |
Expand All @@ -32,7 +33,7 @@ object **必选**,_default:null_ 功能描述: tooltip 操作配置项

| 参数 | 说明 | 类型 | 默认值 | 必选 |
| ------------- | ----------------------------- | --------- | ------- | :--: |
| hiddenColumns | 是否开启隐藏列 (明细表有效) | `boolean` | `false` | |
| hiddenColumns | 是否开启隐藏列 (明细表有效) | `boolean` | `false` | |
| trend | 是否显示趋势图 icon | `boolean` | `false` | |
| sort | 是否开启组内排序 | `boolean` | `false` | |
| tableSort | 是否开启明细表列头排序 | `boolean` | `false` | |
4 changes: 1 addition & 3 deletions s2-site/docs/manual/basic/tooltip.zh.md
Expand Up @@ -141,9 +141,7 @@ const s2options = {

##### 1. 配置级

配置 `tooltip.content` 自定义 `Tooltip` 内容,还可以給 `行 (row)``列 (col)``数据 (cell)` 三种类型的单元格分别配置自定义内容
`tooltip.content` 优先级 小于 `row.content`, `col.content`, `cell.content`
对不同的单元格进行配置时, `tooltip.content` 的优先级 小于 `row.content`, `col.content`, `data.content`, `corner.content`

```tsx
const TooltipContent = (
Expand Down

0 comments on commit 20ac4b7

Please sign in to comment.