Authored by 盖剑秋

优化详情页UI. reviewed by redding.

@@ -51,7 +51,6 @@ const styles = StyleSheet.create({ @@ -51,7 +51,6 @@ const styles = StyleSheet.create({
51 container: { 51 container: {
52 flexDirection: 'column', 52 flexDirection: 'column',
53 paddingTop: 10, 53 paddingTop: 10,
54 - paddingBottom: 10,  
55 backgroundColor: 'white', 54 backgroundColor: 'white',
56 marginLeft: 15, 55 marginLeft: 15,
57 marginRight: 15, 56 marginRight: 15,
@@ -26,7 +26,7 @@ export default class SubjectContent extends Component { @@ -26,7 +26,7 @@ export default class SubjectContent extends Component {
26 if (item.templateKey === 'text') { 26 if (item.templateKey === 'text') {
27 if (this.props.replyTo&&this.props.replyTo.nickName&&this.props.replyTo.nickName.length&&this.props.replyTo.uid) { 27 if (this.props.replyTo&&this.props.replyTo.nickName&&this.props.replyTo.nickName.length&&this.props.replyTo.uid) {
28 return( 28 return(
29 - <Text key={i} style={styles.contentText}> 29 + <Text key={i} style={[styles.contentText,{lineHeight:this.props.left>0?20:29}]}>//如果是在回复里显示,行高就是字号+6
30 <Text>回复</Text> 30 <Text>回复</Text>
31 <Text style={{color:'#4a90e2'}} onPress={()=>{this.props.onPressAvatar(this.props.replyTo.uid);}}>{this.props.replyTo.nickName}</Text> 31 <Text style={{color:'#4a90e2'}} onPress={()=>{this.props.onPressAvatar(this.props.replyTo.uid);}}>{this.props.replyTo.nickName}</Text>
32 <Text>:{content}</Text> 32 <Text>:{content}</Text>
@@ -34,7 +34,7 @@ export default class SubjectContent extends Component { @@ -34,7 +34,7 @@ export default class SubjectContent extends Component {
34 ) 34 )
35 }else { 35 }else {
36 return( 36 return(
37 - <Text key={i} style={styles.contentText}>{content}</Text> 37 + <Text key={i} style={[styles.contentText,{lineHeight:this.props.left>0?20:29}]}>{content}</Text>
38 ) 38 )
39 } 39 }
40 40
@@ -76,12 +76,15 @@ export default class SubjectContent extends Component { @@ -76,12 +76,15 @@ export default class SubjectContent extends Component {
76 76
77 const styles = StyleSheet.create({ 77 const styles = StyleSheet.create({
78 container: { 78 container: {
79 - padding: 15, 79 + paddingLeft: 15,
  80 + paddingRight: 15,
  81 + paddingBottom: 15,
80 backgroundColor: 'white', 82 backgroundColor: 'white',
81 }, 83 },
82 contentText: { 84 contentText: {
83 fontSize: 14, 85 fontSize: 14,
84 - lineHeight: 24, 86 + lineHeight: 29,
  87 + backgroundColor: 'white',
85 }, 88 },
86 contentImage: { 89 contentImage: {
87 backgroundColor:'#a0a0a0', 90 backgroundColor:'#a0a0a0',
@@ -548,7 +548,7 @@ const styles = StyleSheet.create({ @@ -548,7 +548,7 @@ const styles = StyleSheet.create({
548 title: { 548 title: {
549 backgroundColor: 'white', 549 backgroundColor: 'white',
550 fontSize: 17, 550 fontSize: 17,
551 - lineHeight: 24, 551 + lineHeight: 32,
552 paddingLeft: 15, 552 paddingLeft: 15,
553 paddingRight: 15, 553 paddingRight: 15,
554 }, 554 },