為什么索引不對,彈出來總是2
getIndexOf:function(currentId){
?? ??? ??? ?var index=0;
?? ??? ??? ?$(this.groupDate).each(function(i){
?? ??? ??? ??? ?index=i;
?? ??? ??? ??? ?if(this.id === currentId){
?? ??? ??? ??? ??? ?return false;
?? ??? ??? ??? ?};
?? ??? ??? ??? ?
?? ??? ??? ?});
?? ??? ??? ?return index;
?? ?
?? ??? ??? ?
?? ??? ?},
2016-04-30
你的下面的獲取圖片數(shù)組時(shí)候可能出了問題把,可能是self.groupData.length=0;的位置放在了遍歷數(shù)組函數(shù)里面,就會(huì)出現(xiàn)恒值。我之前也遇到了
2015-12-29
=== currentId
三個(gè)等號是啥意思?