| 1234567891011121314151617181920212223242526272829303132333435363738 |
- 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;
- // @property(ui_rank_item)
- // own_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;
- }
- }
|