diff --git a/demo/demo.vue b/demo/demo.vue index f256a87..46f845b 100644 --- a/demo/demo.vue +++ b/demo/demo.vue @@ -306,7 +306,7 @@ const onClickLink = (link: any | null) => { }; function onMove(data: any) { - return true; + return data.level !== 0; } const onNoDateError = (date: Date) => { diff --git a/src/components/slider/index.vue b/src/components/slider/index.vue index 6d1a5ff..91621ae 100644 --- a/src/components/slider/index.vue +++ b/src/components/slider/index.vue @@ -254,7 +254,7 @@ onDrag(sliderRef, { // #region 左滑块移动 const canResizeLeft = computed(() => { - return calcMove(props.resizeLeft); + return canMove.value && calcMove(props.resizeLeft); }); function onResizeLeftDown() { handleDisableMove(); @@ -274,7 +274,7 @@ onDrag(resizeLeftRef, { // #region 右滑块移动 const canResizeRight = computed(() => { - return calcMove(props.resizeRight); + return canMove.value && calcMove(props.resizeRight); }); function onResizeRightDown() { handleDisableMove();