App/Components/SearchHeader.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* Created by jason .
*/
import React from 'react';
import {
StyleSheet,
View,
Text,
TouchableOpacity,
Image,
Dimensions,
} from 'react-native';
// import Common from '../common/constants';
let window = {
width: Dimensions.get('window').width,
height: Dimensions.get('window').height,
}
export default class SearchHeader extends React.Component {
render() {
return (
<View style={styles.header}>
<Image
style={styles.searchIcon}
source={require('../Img/logo_b.png') }
/>
<TouchableOpacity
activeOpacity={0.75}
style={styles.searchInput}
onPress={this.props.searchAction}
>
<Image
style={styles.scanIcon}
source={require('../Img/img_search.png') }
/>
<Text style={styles.searchPlaceholder}>请输入关键字或者商品编号</Text>
</TouchableOpacity>
</View>
)
}
}
const styles = StyleSheet.create({
header: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'white',
borderBottomColor: '#ccc',
borderBottomWidth: 0.5,
},
searchInput: {
flexDirection: 'row',
alignItems: 'center',
height: 32,
width: window.width - 60 - 15 * 2,
margin: 6,
padding: 10,
backgroundColor: 'rgb(245, 246, 247)',
后面还有 20 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
