开始做登录
This commit is contained in:
		
							
								
								
									
										42
									
								
								miniprogram_npm/@vant/weapp/picker/index.wxs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								miniprogram_npm/@vant/weapp/picker/index.wxs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,42 @@ | ||||
| /* eslint-disable */ | ||||
| var style = require('../wxs/style.wxs'); | ||||
| var addUnit = require('../wxs/add-unit.wxs'); | ||||
| var array = require('../wxs/array.wxs'); | ||||
|  | ||||
| function columnsStyle(data) { | ||||
|   return style({ | ||||
|     height: addUnit(data.itemHeight * data.visibleItemCount), | ||||
|   }); | ||||
| } | ||||
|  | ||||
| function maskStyle(data) { | ||||
|   return style({ | ||||
|     'background-size': | ||||
|       '100% ' + addUnit((data.itemHeight * (data.visibleItemCount - 1)) / 2), | ||||
|   }); | ||||
| } | ||||
|  | ||||
| function frameStyle(data) { | ||||
|   return style({ | ||||
|     height: addUnit(data.itemHeight), | ||||
|   }); | ||||
| } | ||||
|  | ||||
| function columns(columns) { | ||||
|   if (!array.isArray(columns)) { | ||||
|     return []; | ||||
|   } | ||||
|  | ||||
|   if (columns.length && !columns[0].values) { | ||||
|     return [{ values: columns }]; | ||||
|   } | ||||
|  | ||||
|   return columns; | ||||
| } | ||||
|  | ||||
| module.exports = { | ||||
|   columnsStyle: columnsStyle, | ||||
|   frameStyle: frameStyle, | ||||
|   maskStyle: maskStyle, | ||||
|   columns: columns, | ||||
| }; | ||||
		Reference in New Issue
	
	Block a user