test slider

This commit is contained in:
2023-05-18 17:07:28 +08:00
parent 220c4f1709
commit 6c966e8424
8 changed files with 197 additions and 172 deletions

View File

@@ -17,6 +17,7 @@ export interface StandardProps {
min?: number;
max?: number;
showDots?: boolean;
backgroundColor:string;
}
const props = withDefaults(defineProps<StandardProps>(), {
@@ -26,6 +27,7 @@ const props = withDefaults(defineProps<StandardProps>(), {
min: 0,
max: 100,
showDots: false,
backgroundColor:"#ccc"
});
const moveAction = throttle(standardMove);
@@ -117,7 +119,9 @@ const focusDot = (val: number) => {
class="layui-slider-rate-v"
:class="[disabled ? 'layui-slider-disabled disable-line' : '']"
></div>
<div class="layui-slider-line-v"></div>
<div class="layui-slider-line-v" :style="{
backgroundColor:props.backgroundColor
}"></div>
<div
v-show="showDots"
@click="focusDot(item)"