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.
		
		
		
		
		
			
		
			
				
					
					
						
							39 lines
						
					
					
						
							723 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							39 lines
						
					
					
						
							723 B
						
					
					
				
								/* eslint-disable */
							 | 
						|
								var style = require('../wxs/style.wxs');
							 | 
						|
								
							 | 
						|
								function rootStyle(data) {
							 | 
						|
								  if (!data.color) {
							 | 
						|
								    return '';
							 | 
						|
								  }
							 | 
						|
								
							 | 
						|
								  var properties = {
							 | 
						|
								    color: data.plain ? data.color : '#fff',
							 | 
						|
								    background: data.plain ? null : data.color,
							 | 
						|
								  };
							 | 
						|
								
							 | 
						|
								  // hide border when color is linear-gradient
							 | 
						|
								  if (data.color.indexOf('gradient') !== -1) {
							 | 
						|
								    properties.border = 0;
							 | 
						|
								  } else {
							 | 
						|
								    properties['border-color'] = data.color;
							 | 
						|
								  }
							 | 
						|
								
							 | 
						|
								  return style(properties);
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								function loadingColor(data) {
							 | 
						|
								  if (data.plain) {
							 | 
						|
								    return data.color ? data.color : '#c9c9c9';
							 | 
						|
								  }
							 | 
						|
								
							 | 
						|
								  if (data.type === 'default') {
							 | 
						|
								    return '#c9c9c9';
							 | 
						|
								  }
							 | 
						|
								
							 | 
						|
								  return '#fff';
							 | 
						|
								}
							 | 
						|
								
							 | 
						|
								module.exports = {
							 | 
						|
								  rootStyle: rootStyle,
							 | 
						|
								  loadingColor: loadingColor,
							 | 
						|
								};
							 |