From 87ec808291ba356858f258e39d8c56c5cc490ee8 Mon Sep 17 00:00:00 2001 From: 梁灏 Date: Tue, 22 May 2018 09:50:30 +0800 Subject: [PATCH] fixed ColorPicker Hue bug --- src/components/color-picker/hue.vue | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/src/components/color-picker/hue.vue b/src/components/color-picker/hue.vue index b08c7b7..471e178 100644 --- a/src/components/color-picker/hue.vue +++ b/src/components/color-picker/hue.vue @@ -48,6 +48,12 @@ export default { }; }, + watch: { + value () { + this.percent = clamp(this.value.hsl.h * 100 / 360, 0, 100); + } + }, + methods: { change(percent) { this.percent = clamp(percent, 0, 100); -- libgit2 0.21.4