From 393745f2e52a6ee50871de57bc23d43e282704e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Tue, 25 Apr 2023 00:28:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20colorpicker=20=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E9=A2=9C=E8=89=B2=E6=BB=91=E5=9D=97=E6=97=B6=E8=B7=B3?= =?UTF-8?q?=E5=8A=A8=E5=88=B0=E9=A1=B6=E9=83=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/colorpicker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/colorpicker.js b/src/modules/colorpicker.js index 7d1f90c5..514e35bd 100644 --- a/src/modules/colorpicker.js +++ b/src/modules/colorpicker.js @@ -470,9 +470,9 @@ layui.define(['jquery', 'lay'], function(exports){ }); side.on('click', function(e){ - var top = e.clientY - $(this).offset().top; + var top = e.clientY - $(this).offset().top + $win.scrollTop(); if(top < 0)top = 0; - if(top > this.offsetHeight)top = this.offsetHeight; + if(top > this.offsetHeight) top = this.offsetHeight; var h = top/180*360; _h = h; change(h, _s, _b, _a);