Commit 64be6ad5 by wong.peiyi

过滤显示

parent 15062dfb
Showing with 14 additions and 5 deletions
...@@ -21,6 +21,7 @@ import { ...@@ -21,6 +21,7 @@ import {
ScrollView, ScrollView,
TouchableWithoutFeedback, TouchableWithoutFeedback,
Modal, Modal,
Platform,
} from 'react-native' } from 'react-native'
import * as R from 'ramda' import * as R from 'ramda'
import { import {
...@@ -42,7 +43,7 @@ import { ...@@ -42,7 +43,7 @@ import {
second_text_color, second_text_color,
first_text_color, first_text_color,
} from '../../../base/BaseStyle' } from '../../../base/BaseStyle'
import { isIphoneX } from "../../../utils/Utils"; import { isIphoneX } from '../../../utils/Utils'
const PropTypes = require('prop-types') const PropTypes = require('prop-types')
export default class ChoolseFilter extends Component { export default class ChoolseFilter extends Component {
...@@ -98,7 +99,15 @@ export default class ChoolseFilter extends Component { ...@@ -98,7 +99,15 @@ export default class ChoolseFilter extends Component {
activeOpacity={1} activeOpacity={1}
></TouchableOpacity> ></TouchableOpacity>
<View style={styles.mask}></View> <View style={styles.mask}></View>
<View style={isIphoneX() ? [styles.searchContent, {top: 48 + 58 + pxSize(36)}] : styles.searchContent}> <View
style={
Platform.OS === 'ios'
? isIphoneX()
? [styles.searchContent, { top: 48 + 58 + pxSize(36) }]
: [styles.searchContent, { top: 20 + 58 + pxSize(36) }]
: styles.searchContent
}
>
<ScrollView style={styles.scrollView}> <ScrollView style={styles.scrollView}>
{filterData && {filterData &&
filterData.map(item => { filterData.map(item => {
...@@ -124,7 +133,7 @@ export default class ChoolseFilter extends Component { ...@@ -124,7 +133,7 @@ export default class ChoolseFilter extends Component {
} else { } else {
onCallback && onCallback(item.field, option.value) onCallback && onCallback(item.field, option.value)
} }
this.setState({ visible: !visible}) this.setState({ visible: !visible })
}} }}
> >
<Text <Text
...@@ -200,7 +209,7 @@ const styles = StyleSheet.create({ ...@@ -200,7 +209,7 @@ const styles = StyleSheet.create({
borderColor: '#E1F1FE', borderColor: '#E1F1FE',
borderWidth: 1, borderWidth: 1,
padding: 3, padding: 3,
borderRadius: 4 borderRadius: 4,
}, },
filterBtn: { filterBtn: {
height: pxSize(36), height: pxSize(36),
...@@ -228,7 +237,7 @@ const styles = StyleSheet.create({ ...@@ -228,7 +237,7 @@ const styles = StyleSheet.create({
width: Width(), width: Width(),
height: Height(), height: Height(),
zIndex: 99, zIndex: 99,
top: 0 top: 0,
}, },
mask: { mask: {
position: 'absolute', position: 'absolute',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment