From b0b90384c7dbf316bc5ea3a97583aefecaa7eacc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A1=BB=E5=BC=A5?= Date: Wed, 29 Jun 2022 00:47:04 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(component):=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=9B=91=E5=90=ACrgb=E9=A2=9C=E8=89=B2=E5=8F=98=E5=8A=A8?= =?UTF-8?q?=E6=97=B6=E6=94=B9=E5=8F=98=E8=89=B2=E7=9B=B8=E5=80=BC=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E8=A7=A3=E5=86=B3=E4=BA=86=E5=9C=A8=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E9=9D=A2=E6=9D=BF=E4=B8=AD=E6=8B=89=E5=8A=A8=E9=80=89?= =?UTF-8?q?=E5=8F=96=E9=A2=9C=E8=89=B2=EF=BC=8C=E8=A7=A6=E7=A2=B0=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E9=9D=A2=E6=9D=BF=E8=BE=B9=E8=A7=92=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E8=89=B2=E7=9B=B8=E5=8F=98=E4=B8=BA0(?= =?UTF-8?q?=E7=BA=A2=E8=89=B2)=EF=BC=8C=E5=8D=B3=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E4=BC=9A=E5=8F=98=E5=8A=A8=E4=B8=BA=E7=BA=A2?= =?UTF-8?q?=E8=89=B2=E8=89=B2=E7=9B=B8=E9=80=89=E6=8B=A9=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除监听rgb颜色变动时改变色相值代码,解决了在颜色面板中拉动选取颜色,触碰颜色面板边角时,导致色相变为0(红色),即颜色面板会变动为红色色相选择的问题 --- package/component/src/component/colorPicker/index.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/package/component/src/component/colorPicker/index.vue b/package/component/src/component/colorPicker/index.vue index 19b6dbed..e4fb98d3 100644 --- a/package/component/src/component/colorPicker/index.vue +++ b/package/component/src/component/colorPicker/index.vue @@ -72,11 +72,9 @@ watch([red, green, blue], (newValue) => { rgba2hex(red.value, green.value, blue.value, alpha.value) ); let { h, s, v } = rgb2hsv(red.value, green.value, blue.value); - hue.value = h; saturation.value = s; value.value = v; pointStyle.value = `top: ${100 - v * 100}%;left: ${s * 100}%;`; - hueSliderStyle.value = `left: ${(hue.value / 360) * 100}%;`; }); watch(alpha, () => {