slider 文档

This commit is contained in:
halo
2022-01-05 12:51:32 +08:00
parent ada270da87
commit 7734f0cb5b
2 changed files with 23 additions and 6 deletions

View File

@@ -116,6 +116,7 @@ interface LaySliderProps {
disabled?: boolean;
range?: boolean;
verticalrange?: number[];
standardrange?: number[];
}
const props = withDefaults(defineProps<LaySliderProps>(), {
@@ -124,11 +125,12 @@ const props = withDefaults(defineProps<LaySliderProps>(), {
disabled: false,
});
let rangeValue: Ref<number[]> = ref([0, 0]);
if (Array.isArray(props.modelValue)) {
// eslint-disable-next-line vue/no-setup-props-destructure
rangeValue.value = props.modelValue;
}
// let rangeValue: Ref<number[]> = ref([0, 0]);
let rangeValue: Ref<number[]> | any = toRef(props, "standardrange");
// if (Array.isArray(props.modelValue)) {
// // eslint-disable-next-line vue/no-setup-props-destructure
// rangeValue.value = props.modelValue;
// }
let verticalRangeValue: Ref<number[]> | any = toRef(props, "verticalrange");