Home.js
1.36 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
'use strict';
import React from 'react';
import ReactNative from 'react-native';
const {
View,
Text,
ScrollView,
Platform,
} = ReactNative;
export default class Home extends React.Component {
static propTypes = {
section1: React.PropTypes.arrayOf(
React.PropTypes.shape({
top: React.PropTypes.string,
bottom: React.PropTypes.string,
small: React.PropTypes.string,
style: View.propTypes.style,
})
),
section2: React.PropTypes.arrayOf(
React.PropTypes.shape({
top: React.PropTypes.string,
bottom: React.PropTypes.string,
small: React.PropTypes.string,
style: View.propTypes.style,
arrowUp: React.PropTypes.bool,
})
),
section3: React.PropTypes.arrayOf(
React.PropTypes.shape({
type: React.PropTypes.string,
thumb: React.PropTypes.number,
title: React.PropTypes.string,
})
),
onPressCategory: React.PropTypes.func,
};
render() {
return (
<View style={{flexDirection: 'row', justifyContent: 'center'}}>
<Text onPress={this.props.testPress}>这是社区首页</Text>
</View>
);
}
}