diff --git a/site/docs/spec/component/slider.zh.md b/site/docs/spec/component/slider.zh.md index 8acbb963b3..1a205050c1 100644 --- a/site/docs/spec/component/slider.zh.md +++ b/site/docs/spec/component/slider.zh.md @@ -67,6 +67,8 @@ chart.render(); | -------------------------------- | ------------------------ | ------------------------- | ------ | | showHandle | 是否显示拖动手柄 | `boolean` | true | | showLabel | 是否显示拖动手柄文本 | `boolean` | true | +| showLabelOnInteraction | 在调整手柄或刷选时才显示手柄文本,在 showLabel 为 false 时生效 | `boolean` | false | +| autoFitLabel | 是否自动调整拖动手柄文本位置 | `boolean` | true | | formatter | 拖动手柄标签格式化 | `(value: number)=>string` | - | | `style.`handleIconSize | 缩略轴手柄大小 | `number` | 10 | | `style.`handleIconFill | 缩略轴手柄填充色 | `string` | - | diff --git a/src/component/slider.ts b/src/component/slider.ts index f70eee1543..f9139877eb 100644 --- a/src/component/slider.ts +++ b/src/component/slider.ts @@ -11,6 +11,10 @@ import { invert } from '../utils/scale'; export type SliderOptions = { orientation: 'horizontal' | 'vertical'; + showHandle?: boolean; + showLabel?: boolean; + showLabelOnInteraction?: boolean; + autoFitLabel?: boolean; [key: string]: any; };