File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1111 <div ref =" pickerPanel"
1212 :class =" {'ui-colorpicker-panel ui-corner-all': true, 'ui-colorpicker-overlay-panel ui-shadow':!inline, 'ui-state-disabled': disabled}"
1313 @click =" onPanelClick()"
14- v-show =" inline || panelVisible " >
14+ v-show =" display() " >
1515 <div class =" ui-colorpicker-content" >
1616 <div ref =" colorSelector" class =" ui-colorpicker-color-selector" @mousedown =" onColorMousedown($event)" >
1717 <div class =" ui-colorpicker-color" >
100100 },
101101 inputValue (value ) {
102102 this .writeValue (value);
103- this .$emit (' input' , value );
103+ this .$emit (' input' , this . getValueToUpdate () );
104104 }
105105 },
106106 methods: {
156156
157157 this .updateUI ();
158158 this .updateModel ();
159- this .$emit (' change ' , {originalEvent : event , value : this .getValueToUpdate ()} );
159+ this .$emit (' input ' , this .getValueToUpdate ());
160160 },
161161
162162 getValueToUpdate () {
183183 },
184184
185185 writeValue (value ) {
186- if (value) {
186+ if (value && typeof value === ' string ' ) {
187187 switch (this .format ) {
188188 case ' hex' :
189189 this .inputValue = this .HEXtoHSB (value);
263263
264264 onPanelClick () {
265265 this .selfClick = true ;
266- this .panelVisible = ! this .panelVisible ;
267266 },
268267
269268 setDisabledState (val ) {
459458
460459 updateFilled (value ) {
461460 this .filled = value && value .length ;
461+ },
462+
463+ display () {
464+ return (this .inline || this .panelVisible );
462465 }
463466 },
464467 created () {
465468 this .updateFilled (this .inputValue );
466469 },
467470 mounted () {
471+ this .writeValue (this .value );
468472 if (this .appendTo ) {
469473 if (this .appendTo === ' body' ) { document .body .appendChild (this .$refs .pickerPanel ); } else { domHandler .appendChild (this .$refs .pickerPanel , this .appendTo ); }
470474 }
Original file line number Diff line number Diff line change 1515 name: ' p-scrollPanel' ,
1616 props: {
1717 scrollpanelStyle: {
18- type: String ,
18+ type: Object ,
1919 default: null
2020 },
2121 scrollpanelStyleClass: {
You can’t perform that action at this time.
0 commit comments