You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					34 lines
				
				677 B
			
		
		
			
		
	
	
					34 lines
				
				677 B
			| 
											6 months ago
										 | /* eslint-disable */ | ||
|  | var style = require('../wxs/style.wxs'); | ||
|  | var addUnit = require('../wxs/add-unit.wxs'); | ||
|  | 
 | ||
|  | function iconStyle(data) { | ||
|  |   var styles = { | ||
|  |     'font-size': addUnit(data.iconSize), | ||
|  |   }; | ||
|  | 
 | ||
|  |   if ( | ||
|  |     data.checkedColor && | ||
|  |     !(data.disabled || data.parentDisabled) && | ||
|  |     data.value === data.name | ||
|  |   ) { | ||
|  |     styles['border-color'] = data.checkedColor; | ||
|  |     styles['background-color'] = data.checkedColor; | ||
|  |   } | ||
|  | 
 | ||
|  |   return style(styles); | ||
|  | } | ||
|  | 
 | ||
|  | function iconCustomStyle(data) { | ||
|  |   return style({ | ||
|  |     'line-height': addUnit(data.iconSize), | ||
|  |     'font-size': '.8em', | ||
|  |     display: 'block', | ||
|  |   }); | ||
|  | } | ||
|  | 
 | ||
|  | module.exports = { | ||
|  |   iconStyle: iconStyle, | ||
|  |   iconCustomStyle: iconCustomStyle, | ||
|  | }; |