Layout_Rank.ts 884 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { _decorator, Button, Component, Node, Toggle } from 'cc';
  2. import List from 'db://assets/core/util_comp/List';
  3. const { ccclass, property } = _decorator;
  4. @ccclass('Layout_Rank')
  5. export class Layout_Rank extends Component {
  6. @property(Button)
  7. Close_Btn: Button;
  8. @property(Toggle)
  9. Rank_Toggle_1: Toggle;
  10. @property(Toggle)
  11. Rank_Toggle_2: Toggle;
  12. //列表
  13. @property(List)
  14. list1: List = null;
  15. //列表
  16. @property(List)
  17. list2: List = null;
  18. // @property(ui_rank_item)
  19. // own_item: ui_rank_item;
  20. public onList1: Function;
  21. public onList2: Function;
  22. onListRender1(item: any, idx: number) {
  23. this.onList1?.(item, idx);
  24. }
  25. onListRender2(item: any, idx: number) {
  26. this.onList2?.(item, idx);
  27. }
  28. protected onDestroy(): void {
  29. this.onList1 = null;
  30. this.onList2 = null;
  31. }
  32. }