123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import { _decorator, Button, Component, Node, Toggle } from 'cc';
- import List from 'db://assets/core/util_comp/List';
- import { UI_Rank_Item } from './UI_Rank_Item';
- 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;
- @property(UI_Rank_Item)
- own1_item: UI_Rank_Item;
- @property(UI_Rank_Item)
- own2_item: UI_Rank_Item;
- 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;
- }
- }
|