mirror of https://github.com/ElemeFE/element
ColorPicker: while watch hue and value with computed
parent
1a9822eb60
commit
94e6288286
|
@ -27,18 +27,13 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
computed: {
|
||||||
'color.value'() {
|
// while watch hue and value with computed to call update once
|
||||||
this.update();
|
colorValue() {
|
||||||
},
|
const hue = this.color.get('hue');
|
||||||
/*
|
const value = this.color.get('value');
|
||||||
* FIXME: trigger update twice
|
|
||||||
* when saturation is zero, modify hue will not change value.
|
|
||||||
* panel also not to be updated. so i subscribe the hue change to update panel too.
|
|
||||||
* but if hue changed, update will be call twice.
|
|
||||||
*/
|
|
||||||
'color._hue'() {
|
|
||||||
this.update();
|
this.update();
|
||||||
|
return { hue, value };
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue