|
@@ -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;
|