Authored by chenl

调整了我的银行卡样式。review by 草莓。

@@ -31,8 +31,7 @@ export default class BankCardList extends React.Component { @@ -31,8 +31,7 @@ export default class BankCardList extends React.Component {
31 renderRow(rowData, sectionID, rowID, highlightRow) { 31 renderRow(rowData, sectionID, rowID, highlightRow) {
32 return ( 32 return (
33 <BankCardListCell 33 <BankCardListCell
34 - cardNo={"6222024301058186063"}  
35 - cardBank={"ICBC"} 34 + data={rowData}
36 /> 35 />
37 ); 36 );
38 } 37 }
@@ -17,7 +17,7 @@ export default class BankCardListCell extends React.Component { @@ -17,7 +17,7 @@ export default class BankCardListCell extends React.Component {
17 } 17 }
18 18
19 render() { 19 render() {
20 - let{cardNo, cardBank} = this.props; 20 + let{cardNo, cardBank} = this.props.data;
21 21
22 let bankImg = this.getBankImage(cardBank); 22 let bankImg = this.getBankImage(cardBank);
23 let newCardNo = this.processBankCardNo(cardNo); 23 let newCardNo = this.processBankCardNo(cardNo);
@@ -101,6 +101,10 @@ let styles = StyleSheet.create({ @@ -101,6 +101,10 @@ let styles = StyleSheet.create({
101 flex: 1, 101 flex: 1,
102 alignItems: 'center', 102 alignItems: 'center',
103 justifyContent: 'center', 103 justifyContent: 'center',
  104 + paddingTop: 15 * DEVICE_WIDTH_RATIO,
  105 + paddingLeft: 15 * DEVICE_WIDTH_RATIO,
  106 + paddingRight: 15 * DEVICE_WIDTH_RATIO,
  107 +
104 }, 108 },
105 cardBg:{ 109 cardBg:{
106 width: 290 * DEVICE_WIDTH_RATIO, 110 width: 290 * DEVICE_WIDTH_RATIO,
@@ -109,8 +113,10 @@ let styles = StyleSheet.create({ @@ -109,8 +113,10 @@ let styles = StyleSheet.create({
109 113
110 cardNo:{ 114 cardNo:{
111 position: 'absolute', 115 position: 'absolute',
112 - top: 60,  
113 - left: 200, 116 + top: 85,
  117 + left: 100,
  118 + color: "white",
  119 + fontSize: 22 * DEVICE_WIDTH_RATIO,
114 120
115 } 121 }
116 }); 122 });

9.72 KB | W: | H:

13.5 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin