File tree Expand file tree Collapse file tree 5 files changed +13
-4
lines changed Expand file tree Collapse file tree 5 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -20,31 +20,37 @@ var Home = React.createClass({
2020 var width = Math . floor ( ( ( Util . size . width - 20 ) - 50 ) / 4 ) ;
2121 var items = [
2222 {
23+ id :1 ,
2324 title : '研发' ,
2425 partment : '框架研发' ,
2526 color : '#126AFF' ,
2627 } ,
2728 {
29+ id :2 ,
2830 title : '研发' ,
2931 partment : 'BU研发' ,
3032 color : '#FFD600' ,
3133 } ,
3234 {
35+ id :3 ,
3336 title : '产品' ,
3437 partment : '公共产品' ,
3538 color : '#F80728' ,
3639 } ,
3740 {
41+ id :4 ,
3842 title : '产品' ,
3943 partment : 'BU产品' ,
4044 color : '#05C147' ,
4145 } ,
4246 {
47+ id :5 ,
4348 title : '产品' ,
4449 partment : '启明星' ,
4550 color : '#FF4EB9' ,
4651 } ,
4752 {
53+ id :6 ,
4854 title : '项目' ,
4955 partment : '项目管理' ,
5056 color : '#EE810D' ,
@@ -65,6 +71,7 @@ var Home = React.createClass({
6571 for ( var i = 0 ; i < 4 ; i ++ ) {
6672 Items1 . push (
6773 < ItemBlock
74+ key = { items [ i ] . id }
6875 title = { items [ i ] . title }
6976 partment = { items [ i ] . partment }
7077 width = { this . state . width }
@@ -77,6 +84,7 @@ var Home = React.createClass({
7784 for ( var i = 4 ; i < items . length ; i ++ ) {
7885 Items2 . push (
7986 < ItemBlock
87+ key = { items [ i ] . id }
8088 title = { items [ i ] . title }
8189 partment = { items [ i ] . partment }
8290 width = { this . state . width }
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ var Address = React.createClass({
2727 } ;
2828 for ( var i in items ) {
2929 view . push (
30- < View style = { styles . row } >
30+ < View key = { 'addressItem' + i } style = { styles . row } >
3131 < View style = { [ styles . text , color ] } >
3232 < Text style = { { fontSize :25 , color :'#fff' , fontWeight :'bold' } } >
3333 { items [ i ] . username . substr ( 0 , 1 ) || '未' }
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ var Manager = React.createClass({
2626 var JSXDOM = [ ] ;
2727 for ( var i in items ) {
2828 JSXDOM . push (
29- < TouchableOpacity onPress = { this . _loadPage . bind ( this , components [ i ] , items [ i ] ) } >
29+ < TouchableOpacity key = { items [ i ] } onPress = { this . _loadPage . bind ( this , components [ i ] , items [ i ] ) } >
3030 < View style = { [ styles . item , { flexDirection :'row' } ] } >
3131 < Text style = { [ styles . tag , { color : colors [ i ] } ] } > { tags [ i ] } </ Text >
3232 < Text style = { [ styles . font , { flex :1 } ] } > { items [ i ] } </ Text >
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ var AddUser = React.createClass({
4545 var tagOne = [ ] ;
4646 for ( var i = 0 ; i < 3 ; i ++ ) {
4747 tagOne . push (
48- < TouchableOpacity onPress = { this . _select . bind ( this , this . state . items [ i ] ) } >
48+ < TouchableOpacity key = { this . state . items [ i ] } onPress = { this . _select . bind ( this , this . state . items [ i ] ) } >
4949 < View style = { [ styles . part , this . state [ 'select' + this . state . items [ i ] ] ] } >
5050 < Text style = { this . state [ 'select_' + this . state . items [ i ] ] } > { this . state . tags [ i ] } </ Text >
5151 </ View >
@@ -56,7 +56,7 @@ var AddUser = React.createClass({
5656 var tagTwo = [ ] ;
5757 for ( var i = 3 ; i < 6 ; i ++ ) {
5858 tagTwo . push (
59- < TouchableOpacity onPress = { this . _select . bind ( this , this . state . items [ i ] ) } >
59+ < TouchableOpacity key = { this . state . items [ i ] } onPress = { this . _select . bind ( this , this . state . items [ i ] ) } >
6060 < View style = { [ styles . part , this . state [ 'select' + this . state . items [ i ] ] ] } >
6161 < Text style = { this . state [ 'select_' + this . state . items [ i ] ] } > { this . state . tags [ i ] } </ Text >
6262 </ View >
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ var Message = React.createClass({
3131 data = { contents [ i ] }
3232 nav = { this . props . navigator }
3333 component = { Detail }
34+ key = { contents [ i ] . message }
3435 text = { contents [ i ] . message }
3536 name = { contents [ i ] . username }
3637 date = { contents [ i ] . time } />
You can’t perform that action at this time.
0 commit comments