Skip to content

Commit

Permalink
docs(slider): 缩略轴支持配置 handler 样式 & 增加 api 文档说明 (#2347)
Browse files Browse the repository at this point in the history
* docs(slider): 缩略轴支持配置 handler 样式 & 增加 api 文档说明

* docs: 文档优化
  • Loading branch information
visiky authored Feb 27, 2021
1 parent fa63cb9 commit bff3fdc
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 39 deletions.
6 changes: 3 additions & 3 deletions docs/api/options/events.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ order: 6
- touchmove
- touchend
- touchcancel
- drag 事件
- **drag 事件**
- dragenter
- dragover
- dragleave
- drop
- contextmenu 右键事件
- dblclick 双击事件
- **contextmenu 右键事件**
- **dblclick 双击事件**

#### 2. 组合事件

Expand Down
43 changes: 28 additions & 15 deletions docs/common/slider.en.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
Object type refer to [ShapeAttrs](/en/docs/ API /graphic-style)
Object type refer to [ShapeAttrs](/en/docs/api/graphic-style)

| Properties | Type | Description |
| --------------- | ---------- | --------------------------------------- |
| start | _number_ | Default starting position |
| end | _number_ | Default ending position |
| height | _number_ | Slider height |
| trendCfg | _trendCfg_ | Configuration of background trends |
| backgroundStyle | _object_ | Background style |
| foregroundStyle | _object_ | Foreground style |
| handlerStyle | _object_ | Handle configuration |
| textStyle | _object_ | Text style |
| minLimit | _number_ | Lower limit of sliding position allowed |
| maxLimit | _number_ | Upper limit of sliding position allowed |
| formatter | _Function_ | Slider text formatting function |
| Properties | Type | Description |
| --------------- | -------------- | --------------------------------------- |
| start | _number_ | Default starting position |
| end | _number_ | Default ending position |
| height | _number_ | Slider height |
| trendCfg | _TrendCfg_ | Configuration of background trends |
| backgroundStyle | _object_ | Background style |
| foregroundStyle | _object_ | Foreground style |
| handlerStyle | _HandlerStyle_ | Handler configuration |
| textStyle | _object_ | Text style |
| minLimit | _number_ | Lower limit of sliding position allowed |
| maxLimit | _number_ | Upper limit of sliding position allowed |
| formatter | _Function_ | Slider text formatting function |

trendCfg
Types of __*TrendCfg*__ are as follow:

| Properties | Type | Description |
| --------------- | ---------- | ------------------------------ |
Expand All @@ -24,3 +24,16 @@ trendCfg
| backgroundStyle | _object_ | Background style configuration |
| lineStyle | _object_ | Line style configuration |
| areaStyle | _object_ | Area style configuration |

Types of __*HandlerStyle*__ are as follow:

| Properties | Type | Description |
| ---------- | -------- | ------------------------ |
| width | _number_ | Width of slider handler |
| height | _number_ | Height of slider handler |
| fill | _string_ | Fill color of handler |
| highLightFill | _string_ | Highlight fill color of handler (when hovering) |
| stroke | _string_ | Stroke color of handler |
| opacity | _number_ | Fill opacity of handler |
| radius | _number_ | Radius of handler rect |
| cursor | _string_ | Style of cursor (when hovering handler) |
55 changes: 34 additions & 21 deletions docs/common/slider.zh.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
object 类型的请参考[绘图属性](/zh/docs/api/graphic-style)

| 配置项 | 类型 | 功能描述 |
| --------------- | -------- | ------------------ |
| start | _number_ | 默认起始位置 |
| end | _number_ | 默认结束位置 |
| height | _number_ | 缩略轴高度 |
| trendCfg | _trendCfg_ | 背景趋势的配置 |
| backgroundStyle | _object_ | 背景配置 |
| foregroundStyle | _object_ | 背景配置 |
| handlerStyle | _object_ | handle 配置 |
| textStyle | _object_ | 文本配置 |
| minLimit | _number_ | 允许滑动位置下限 |
| maxLimit | _number_ | 允许滑动位置上限 |
| formatter | _Function_ | 滑块文本格式化函数 |
| 配置项 | 类型 | 功能描述 |
| --------------- | -------------- | ------------------ |
| start | _number_ | 默认起始位置 |
| end | _number_ | 默认结束位置 |
| height | _number_ | 缩略轴高度 |
| trendCfg | _TrendCfg_ | 背景趋势的配置 |
| backgroundStyle | _object_ | 背景配置 |
| foregroundStyle | _object_ | 背景配置 |
| handlerStyle | _HandlerStyle_ | handler 配置 |
| textStyle | _object_ | 文本配置 |
| minLimit | _number_ | 允许滑动位置下限 |
| maxLimit | _number_ | 允许滑动位置上限 |
| formatter | _Function_ | 滑块文本格式化函数 |

trendCfg
__*TrendCfg*__ 类型如下:

| 配置项 | 类型 | 功能描述 |
| --------------- | -------- | -------------- |
| 配置项 | 类型 | 功能描述 |
| --------------- | ---------- | -------------- |
| data | _number[]_ | 统计文本的样式 |
| smooth | _boolean_ | 是否平滑 |
| isArea | _boolean_ | 是否面积图 |
| backgroundStyle | _object_ | 背景样式配置 |
| lineStyle | _object_ | line 样式配置 |
| areaStyle | _object_ | area 样式配置 |
| smooth | _boolean_ | 是否平滑 |
| isArea | _boolean_ | 是否面积图 |
| backgroundStyle | _object_ | 背景样式配置 |
| lineStyle | _object_ | line 样式配置 |
| areaStyle | _object_ | area 样式配置 |

__*HandlerStyle*__ 类型如下:

| 配置项 | 类型 | 功能描述 |
| ------ | -------- | -------------- |
| width | _number_ | 缩略轴手柄宽度 |
| height | _number_ | 缩略轴手柄高度 |
| fill | _string_ | 缩略轴手柄填充色 |
| highLightFill | _string_ | 缩略轴手柄填充高亮色(hover 状态) |
| stroke | _string_ | 缩略轴手柄描边色 |
| opacity | _number_ | 缩略轴手柄填充透明度 |
| radius | _number_ | 缩略轴手柄背景圆角 |
| cursor | _string_ | 缩略轴手柄鼠标样式 (hover 状态) |

0 comments on commit bff3fdc

Please sign in to comment.