From 9ebca0b4d36c2b66b7e4a16791131ea43ae13e72 Mon Sep 17 00:00:00 2001 From: xpyjs Date: Mon, 22 May 2023 10:59:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9Bmove=20=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E4=B8=BA=20false=20=E6=97=B6=EF=BC=8Cleft=20=E5=92=8C=20right?= =?UTF-8?q?=20=E4=BE=9D=E6=97=A7=E5=8F=AF=E4=BB=A5=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E5=B9=B6=E6=8B=96=E6=8B=BD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/demo.vue | 2 +- src/components/slider/index.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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();