薛鸿潇 5 лет назад
Родитель
Сommit
9f433ea622
1 измененных файлов с 1 добавлено и 1 удалено
  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);