@@ -46,19 +46,24 @@ const model = ref<number>(0)
4646| max | number | maximum value | 100 | |
4747| step | number | step | 1 | |
4848| addable | boolean | can add data. This will emit 'addThumb' | false | |
49- | limit | number | the limit can be add | 0 | |
49+ | limit | number | the limit can be add | undefined | |
5050| smooth | boolean | with smooth off, the thumb will only show on the stop point | false | |
5151| deduplicate | boolean | can the thumb be duplicated | true | |
5252| rangeHighlight | boolean | highlight range between min and max. This will only effect while modelValue is array and length is 2 | false | |
53- | showStops | boolean \| number | whether to show dots on the track | 12 | |
53+ | showStops | boolean \| number | whether to show dots on the track. When set to number, will only show dots while stops less than the value | 12 | |
54+ | size | 'small' \| 'medium' \| 'large' | track size | 'small' | |
55+ | thumbType | 'circle' \| 'square' \| 'rect' | thumb type(default 'rect' while size is 'large', otherwise 'small') | 'circle' \| 'rect' | |
56+ | thumbSize | 'small' \| 'medium' \| 'large' | thumb size | 'medium' | |
5457| renderTop | Function | render function on the top of thumb | undefined | |
58+ | renderTopOnActive | boolean | only render top function on the active thumb | false | |
5559| renderBottom | Function | render bottom function on the bottom of thumb | undefined | |
60+ | renderBottomOnActive | boolean | only render bottom function on the active thumb | false | |
5661
5762## events
5863
59- | Name | Description |
60- | --- | --- |
61- | add | add a thumb |
64+ | Name | Type | Description |
65+ | --- | --- | --- |
66+ | add | (value: number): void | add event while click the track |
6267
6368## types
6469
@@ -74,11 +79,6 @@ export interface RangeData<T = unknown> {
7479export type RangeValue <T = unknown > = number | number [] | RangeData <T >[]
7580` ` `
7681
77- ## TODO
78-
79- - [ ] style convenience(track height/thumb style)
80- - [ ] only render on active
81-
8282## License
8383
8484[MIT](./LICENSE) License © 2023-PRESENT [wiidede](https://github.com/wiidede)
0 commit comments