Browse Source

feat: 优化

chenjixiang 1 year ago
parent
commit
9dae13ab1f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      assets/Script/Main/UIRank.ts

+ 1 - 1
assets/Script/Main/UIRank.ts

@@ -36,7 +36,7 @@ export default class UIRank extends cc.Component {
         // 获取数组中最大的值
         const maxNum: number = gameModel.historyScores.reduce((a, b) => Math.max(a, b));
         console.log('maxNum', maxNum);
-        CCUtils.findChild(this.node , 'tcBg/scrollView/view/content').height = gameModel.historyScores.length * 100;
+        CCUtils.findChild(this.node , 'tcBg/scrollView/view/content').height = gameModel.historyScores.length * 100 + 100;
         for (let i: number = gameModel.historyScores.length; i > 0; i--) {
             const node: cc.Node = cc.instantiate(CCUtils.findChild(this.node, 'tcBg/scoreItem'));
             node.parent = content;