Browse Source

tableview滑动bug修复

薛鸿潇 5 years ago
parent
commit
9f433ea622
1 changed files with 1 additions and 1 deletions
  1. 1 1
      assets/script/game/component/TableView.ts

+ 1 - 1
assets/script/game/component/TableView.ts

@@ -357,7 +357,7 @@ export default class TableView extends cc.Component {
             //index存在-1的情况,类似于在缓存池里的item.
             let status1 = this.itemArr[i].index < this.firstItemIndex - 1 ? true : false;
             let status2 = this.itemArr[i].index > this.lastItemIndex + 1 ? true : false;
-            let status3 = this.itemArr[i].pfbType === this.itemData[index].pfbType;
+            let status3 = this.itemArr[i].pfbType === (this.itemData[index].pfbType || 0);
             //cc.log('item的索引', this.firstItemIndex, this.lastItemIndex)
             if (status1 && status3 || status2 && status3) {
                 //cc.log(i, index, this.itemArr, this.content.height);