fix: 取色器 Hue 初始化不正确

This commit is contained in:
pipipi-pikachu 2021-05-27 22:08:28 +08:00
parent 250c01b0ad
commit 7a0e01d40a
2 changed files with 2 additions and 2 deletions

View File

@ -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
})

View File

@ -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
})