...
|
...
|
@@ -25,6 +25,7 @@ export default class BrandArticleList extends Component { |
|
|
|
|
|
this._renderRow = this._renderRow.bind(this);
|
|
|
this._renderHeader = this._renderHeader.bind(this);
|
|
|
this._renderSeparator = this._renderSeparator.bind(this);
|
|
|
|
|
|
this.dataSource = new ListView.DataSource({
|
|
|
rowHasChanged: (r1, r2) => !Immutable.is(r1, r2),
|
...
|
...
|
@@ -55,12 +56,18 @@ export default class BrandArticleList extends Component { |
|
|
}
|
|
|
|
|
|
_renderSeparator(sectionID, rowID, adjacentRowHighlighted) {
|
|
|
|
|
|
//最后一条记录无需Separator
|
|
|
if (!this.props || !this.props.articleList || (this.props.articleList.length - rowID) == 1) {
|
|
|
return null;
|
|
|
}
|
|
|
return (
|
|
|
<View key={'sep' + rowID} style={styles.separator}></View>
|
|
|
);
|
|
|
}
|
|
|
|
|
|
render() {
|
|
|
|
|
|
let {articleList} = this.props;
|
|
|
|
|
|
if (!articleList || articleList.length == 0) {
|
...
|
...
|
|