From 7a0e01d40aa879fd3231f491d997a00be8874271 Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Thu, 27 May 2021 22:08:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=96=E8=89=B2=E5=99=A8=20Hue=20?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E4=B8=8D=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ColorPicker/Hue.vue | 2 +- src/components/ColorPicker/Saturation.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ColorPicker/Hue.vue b/src/components/ColorPicker/Hue.vue index 7b42da01..d6e239bb 100644 --- a/src/components/ColorPicker/Hue.vue +++ b/src/components/ColorPicker/Hue.vue @@ -37,7 +37,7 @@ export default defineComponent({ const color = computed(() => { const hsla = tinycolor(props.value).toHsl() - hsla.h = props.hue + if (props.hue) hsla.h = props.hue return hsla }) diff --git a/src/components/ColorPicker/Saturation.vue b/src/components/ColorPicker/Saturation.vue index 82e1c979..a6caeb10 100644 --- a/src/components/ColorPicker/Saturation.vue +++ b/src/components/ColorPicker/Saturation.vue @@ -39,7 +39,7 @@ export default defineComponent({ setup(props, { emit }) { const color = computed(() => { const hsva = tinycolor(props.value).toHsv() - hsva.h = props.hue + if (props.hue) hsva.h = props.hue return hsva })