From 63d1e7538d31d9dff9545ec1ae1a476c0f363bfd Mon Sep 17 00:00:00 2001 From: wang <825251234@qq.com> Date: Fri, 17 Dec 2021 20:56:10 +0800 Subject: [PATCH] =?UTF-8?q?slider=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/module/slider/index.vue | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/module/slider/index.vue b/src/module/slider/index.vue index 3c836f07..00f8157a 100644 --- a/src/module/slider/index.vue +++ b/src/module/slider/index.vue @@ -5,11 +5,16 @@ @mousedown.stop="handle_mousedown" class="layui-slider-vertical-track" > + +
+
-
@@ -120,13 +125,13 @@ const verticalMove = (e: MouseEvent) => { let tracker_rect = verticaltracker.value.getBoundingClientRect(); let origin_bottom = tracker_rect.bottom; let point_bottom = e.clientY; - let distance = (point_bottom - origin_bottom) * -1 + let distance = (point_bottom - origin_bottom) * -1; if (distance < 0) { vertical_style.bottom = 0; vertical_style.height = 0; } else { let rate = (distance / tracker_rect.height) * 100; - console.log(rate) + console.log(rate); vertical_style.bottom = Math.floor(rate); vertical_style.height = Math.floor(rate); if (vertical_style.bottom > 100) {