fixed ColorPicker Hue bug

when select a color from recommend colors, the Hue can not focus the correct color position(percent).
This commit is contained in:
梁灏 2018-05-22 09:50:30 +08:00
parent 3cf3629f3b
commit 87ec808291

View file

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