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.
		
		
		
		
			
				
					26 lines
				
				556 B
			
		
		
			
		
	
	
					26 lines
				
				556 B
			| 
											6 months ago
										 | /* eslint-disable */ | ||
|  | var style = require('../wxs/style.wxs'); | ||
|  | var addUnit = require('../wxs/add-unit.wxs'); | ||
|  | 
 | ||
|  | function wrapStyle(data) { | ||
|  |   return style({ | ||
|  |     transform: data.transform | ||
|  |       ? 'translate3d(0, ' + data.transform + 'px, 0)' | ||
|  |       : '', | ||
|  |     top: data.fixed ? addUnit(data.offsetTop) : '', | ||
|  |     'z-index': data.zIndex, | ||
|  |   }); | ||
|  | } | ||
|  | 
 | ||
|  | function containerStyle(data) { | ||
|  |   return style({ | ||
|  |     height: data.fixed ? addUnit(data.height) : '', | ||
|  |     'z-index': data.zIndex, | ||
|  |   }); | ||
|  | } | ||
|  | 
 | ||
|  | module.exports = { | ||
|  |   wrapStyle: wrapStyle, | ||
|  |   containerStyle: containerStyle, | ||
|  | }; |