🐛(component): 删除监听rgb颜色变动时改变色相值代码,解决了在颜色面板中拉动选取颜色,触碰颜色面板边角时,导致色相变为0(红色),即颜色面板会变动为红色色相选择的问题

删除监听rgb颜色变动时改变色相值代码,解决了在颜色面板中拉动选取颜色,触碰颜色面板边角时,导致色相变为0(红色),即颜色面板会变动为红色色相选择的问题
This commit is contained in:
须弥 2022-06-29 00:47:04 +08:00
parent de8746e02d
commit b0b90384c7

View File

@ -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, () => {