add api of list and sectionList
This commit is contained in:
		| @@ -61,6 +61,26 @@ export abstract class View implements Modeling { | |||||||
|     @Property |     @Property | ||||||
|     viewId = uniqueId('ViewId') |     viewId = uniqueId('ViewId') | ||||||
|  |  | ||||||
|  |     @Property | ||||||
|  |     padding?: { | ||||||
|  |         left?: number, | ||||||
|  |         right?: number, | ||||||
|  |         top?: number, | ||||||
|  |         bottom?: number, | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     @Property | ||||||
|  |     layoutConfig?: Config | ||||||
|  |  | ||||||
|  |     @Property | ||||||
|  |     onClick?: Function | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Set to reuse native view | ||||||
|  |      */ | ||||||
|  |     @Property | ||||||
|  |     identifier?: string | ||||||
|  |  | ||||||
|     parent?: Group |     parent?: Group | ||||||
|  |  | ||||||
|     callbacks: Map<String, Function> = new Map |     callbacks: Map<String, Function> = new Map | ||||||
| @@ -188,19 +208,6 @@ export abstract class View implements Modeling { | |||||||
|         return this.nativeViewModel |         return this.nativeViewModel | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Property |  | ||||||
|     padding?: { |  | ||||||
|         left?: number, |  | ||||||
|         right?: number, |  | ||||||
|         top?: number, |  | ||||||
|         bottom?: number, |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     @Property |  | ||||||
|     layoutConfig?: Config |  | ||||||
|  |  | ||||||
|     @Property |  | ||||||
|     onClick?: Function |  | ||||||
| } | } | ||||||
|  |  | ||||||
| export interface Config { | export interface Config { | ||||||
| @@ -323,7 +330,25 @@ export class Image extends View { | |||||||
| } | } | ||||||
|  |  | ||||||
| export class List extends View { | export class List extends View { | ||||||
|  |     @Property | ||||||
|  |     itemCount = 0 | ||||||
|  |  | ||||||
|  |     @Property | ||||||
|  |     renderItem?: (index: number) => View | ||||||
|  | } | ||||||
|  |  | ||||||
|  | export class SectionList extends View { | ||||||
|  |     @Property | ||||||
|  |     sectionRowsCount: number[] = [] | ||||||
|  |  | ||||||
|  |     @Property | ||||||
|  |     renderSectionHeader?: (section: number) => View | ||||||
|  |  | ||||||
|  |     @Property | ||||||
|  |     renderItem?: (item: number, section: number) => View | ||||||
|  |  | ||||||
|  |     @Property | ||||||
|  |     sectionHeaderSticky = true | ||||||
| } | } | ||||||
|  |  | ||||||
| export class Slide extends View { | export class Slide extends View { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user