import { _decorator, Component, Node } from 'cc'; import List from '../core/ui/virtualList/List'; const { ccclass, property } = _decorator; @ccclass('WithdrawalNote') export class WithdrawalNote extends Component { @property({ tooltip: "任务列表", type: List }) list: List; private listData: []; start() { this.list.numItems = 100; } /** * 当列表项渲染 */ public onListRender(item: Node, index: number) { // item.getComponent(TaskItem).onDataChange(this.listData[index], this.targetNode, this.effectNode); } }