File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
frontend/express/public/javascripts/countly/vue/components Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 2828 } ,
2929 localValue : {
3030 get : function ( ) {
31- return this . value . replace ( "#" , "" ) ;
31+ var rawValue = this . value || this . resetValue ;
32+
33+ return rawValue . replace ( "#" , "" ) ;
3234 } ,
3335 set : function ( value ) {
3436 var colorValue = "#" + value . replace ( "#" , "" ) ;
37+
3538 if ( colorValue . match ( HEX_COLOR_REGEX ) ) {
3639 this . setColor ( { hex : colorValue } ) ;
3740 }
4346 } ,
4447 methods : {
4548 setColor : function ( color ) {
46- this . $emit ( "input" , color . hex8 ) ;
49+ var finalColor = color . hex8 || color . hex ;
50+
51+ this . $emit ( "input" , finalColor ) ;
4752 } ,
4853 reset : function ( ) {
4954 this . setColor ( { hex : this . resetValue } ) ;
55+ this . close ( ) ;
5056 } ,
5157 open : function ( ) {
5258 this . isOpened = true ;
You can’t perform that action at this time.
0 commit comments