| any = toRef(props, "rangeValue");
@@ -47,6 +49,7 @@ function valHook(val: any) {
:rangeValue="rangeValues"
:min="min"
:max="max"
+ :showDots="showDots"
/>
@@ -58,6 +61,7 @@ function valHook(val: any) {
:val="modelValue"
:min="min"
:max="max"
+ :showDots="showDots"
/>
@@ -71,6 +75,7 @@ function valHook(val: any) {
:rangeValue="rangeValues"
:min="min"
:max="max"
+ :showDots="showDots"
/>
@@ -82,6 +87,7 @@ function valHook(val: any) {
:step="step"
:min="min"
:max="max"
+ :showDots="showDots"
>
diff --git a/src/component/slider/utils/index.ts b/src/component/slider/utils/index.ts
index 400cd249..3495480b 100644
--- a/src/component/slider/utils/index.ts
+++ b/src/component/slider/utils/index.ts
@@ -13,3 +13,16 @@ export function throttle(func: Function) {
export function handle_select(e: Event): void {
e.preventDefault();
}
+
+export function makeDots(props: any) {
+ if (props.step === 0) return [];
+ let val = 0;
+ let dots = [0];
+ let count = Math.floor(100 / props.step) - 1;
+ for (let i = 0; i < count; i++) {
+ val += props.step;
+ dots.push(val);
+ }
+ dots.push(100);
+ return dots;
+}