File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export default {
1818 warningLabel : String ,
1919 helper : String ,
2020 icon : String ,
21+ iconColor : String ,
2122 dark : Boolean ,
2223 orientation : {
2324 type : String ,
@@ -103,6 +104,13 @@ export default {
103104 return this . isVertical
104105 ? `col-xs-12`
105106 : ( this . isHorizontal ? 'col' : 'col-xs-12 col-sm' )
107+ } ,
108+ iconProps ( ) {
109+ const prop = { name : this . icon }
110+ if ( this . iconColor && ! this . hasError && ! this . hasWarning ) {
111+ prop . color = this . iconColor
112+ }
113+ return prop
106114 }
107115 } ,
108116 provide ( ) {
@@ -137,7 +145,7 @@ export default {
137145 } , [
138146 this . icon
139147 ? h ( QIcon , {
140- props : { name : this . icon } ,
148+ props : this . iconProps ,
141149 staticClass : 'q-field-icon q-field-margin'
142150 } )
143151 : ( this . insetIcon ? h ( 'div' , { staticClass : 'q-field-icon' } ) : null ) ,
You can’t perform that action at this time.
0 commit comments