import { List } from "../components/List" ; import { AdapterContainer } from "../components/AdapterContainer" ; import { Container } from "pixi.js" ; export class BaseListAdapter < T > { list ! : List ; _data ! : Array < T > ; constructor ( data ) { this . data = data ; } set data ( data ) { this . _data = data ; this . list && this . list . draw ( ) ; } get data ( ) : Array < T > { return this . _data ; } /**
     * 总共item个数
     */ getCount ( ) { return this . data . length ; } param position getItem ( position ) { return this . data [ position ] ; } param position getItemType ( position ) { return 0 ; } /**
     * 测量
     */ getRemeasure ( position , convertView ) { return ; } param position param convertView param parent getAdapterContainer ( position , convertView , parent ) { if ( ! convertView ) { convertView = new AdapterContainer ( ) ; } return convertView ; } }