UnitModal.js
1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/**
* Created by yzdd on 2018/3/14.
*/
import React, {Component} from 'react';
import {
View,
Text,
TouchableOpacity,
Image,
StyleSheet
} from 'react-native';
import {width, height, line} from '../../utils/publiscStyle'
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "rgba(0,0,0,0.5)",
justifyContent: "flex-end"
},
item: {
width,
height: 51,
alignItems: "center",
justifyContent: "center",
backgroundColor: "#FFFFFF",
borderBottomWidth: line,
borderBottomColor: "#dddddd"
},
font1: {
fontSize: 18,
color: "#333333"
},
font2: {
fontSize: 18,
color: "#333333",
fontWeight: "bold"
},
bg: {
backgroundColor: "#ececf1"
}
});
export default class UnitModal extends Component {
select = (v) => {
const {goBack} = this.props.navigation;
const {sendEvent} = this.props.navigation.state.params;
sendEvent(v);
goBack();
}
cancel = () => {
const {goBack} = this.props.navigation;
goBack();
}
render() {
return (
<View style={styles.container}>
<View style={styles.bg}>
{
["苏州企新动信息技术有限公司", "犀牛网络", "犀牛互联网"].map((v, i) => {
return (
<TouchableOpacity style={styles.item} key={i} onPress={() => this.select(v)}>
<Text style={styles.font1}>{v}</Text>
</TouchableOpacity>
)
})
}
<TouchableOpacity style={[styles.item, {marginTop: 9}]} onPress={this.cancel}>
<Text style={styles.font2}>取消</Text>
</TouchableOpacity>
</View>
</View>
)
}
}