| 12345678910111213141516171819202122232425262728293031323334 |
- import { _decorator, Button, Component, Node, Toggle } from 'cc';
- import List from 'db://assets/core/util_comp/List';
- const { ccclass, property } = _decorator;
- @ccclass('Layout_Rank')
- export class Layout_Rank extends Component {
- @property(Button)
- Close_Btn: Button;
- @property(Toggle)
- Rank_Toggle_1: Toggle;
- @property(Toggle)
- Rank_Toggle_2: Toggle;
- //列表
- @property(List)
- list1: List = null;
- //列表
- @property(List)
- list2: List = null;
- public onList1: Function;
- public onList2: Function;
- onListRender1(item: any, idx: number) {
- this.onList1?.(item, idx);
- }
- onListRender2(item: any, idx: number) {
- this.onList2?.(item, idx);
- }
- protected onDestroy(): void {
- this.onList1 = null;
- this.onList2 = null;
- }
- }
|