feat:add onScroll and onScrollEnd for list and flowlayout
This commit is contained in:
16
doric-js/lib/src/widget/flowlayout.d.ts
vendored
16
doric-js/lib/src/widget/flowlayout.d.ts
vendored
@@ -19,6 +19,14 @@ export interface IFlowLayout extends IView {
|
||||
loadMore?: boolean;
|
||||
onLoadMore?: () => void;
|
||||
loadMoreView?: FlowLayoutItem;
|
||||
onScroll?: (offset: {
|
||||
x: number;
|
||||
y: number;
|
||||
}) => void;
|
||||
onScrollEnd?: (offset: {
|
||||
x: number;
|
||||
y: number;
|
||||
}) => void;
|
||||
}
|
||||
export declare class FlowLayout extends Superview implements IFlowLayout {
|
||||
private cachedViews;
|
||||
@@ -33,6 +41,14 @@ export declare class FlowLayout extends Superview implements IFlowLayout {
|
||||
onLoadMore?: () => void;
|
||||
loadMore?: boolean;
|
||||
loadMoreView?: FlowLayoutItem;
|
||||
onScroll?: (offset: {
|
||||
x: number;
|
||||
y: number;
|
||||
}) => void;
|
||||
onScrollEnd?: (offset: {
|
||||
x: number;
|
||||
y: number;
|
||||
}) => void;
|
||||
reset(): void;
|
||||
private getItem;
|
||||
isDirty(): boolean;
|
||||
|
@@ -116,6 +116,14 @@ __decorate([
|
||||
Property,
|
||||
__metadata("design:type", FlowLayoutItem)
|
||||
], FlowLayout.prototype, "loadMoreView", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
], FlowLayout.prototype, "onScroll", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
], FlowLayout.prototype, "onScrollEnd", void 0);
|
||||
export function flowlayout(config) {
|
||||
const ret = new FlowLayout;
|
||||
for (let key in config) {
|
||||
|
16
doric-js/lib/src/widget/list.d.ts
vendored
16
doric-js/lib/src/widget/list.d.ts
vendored
@@ -16,6 +16,14 @@ export interface IList extends IView {
|
||||
onLoadMore?: () => void;
|
||||
loadMore?: boolean;
|
||||
loadMoreView?: ListItem;
|
||||
onScroll?: (offset: {
|
||||
x: number;
|
||||
y: number;
|
||||
}) => void;
|
||||
onScrollEnd?: (offset: {
|
||||
x: number;
|
||||
y: number;
|
||||
}) => void;
|
||||
}
|
||||
export declare class List extends Superview implements IList {
|
||||
private cachedViews;
|
||||
@@ -27,6 +35,14 @@ export declare class List extends Superview implements IList {
|
||||
onLoadMore?: () => void;
|
||||
loadMore?: boolean;
|
||||
loadMoreView?: ListItem;
|
||||
onScroll?: (offset: {
|
||||
x: number;
|
||||
y: number;
|
||||
}) => void;
|
||||
onScrollEnd?: (offset: {
|
||||
x: number;
|
||||
y: number;
|
||||
}) => void;
|
||||
reset(): void;
|
||||
private getItem;
|
||||
isDirty(): boolean;
|
||||
|
@@ -106,6 +106,14 @@ __decorate([
|
||||
Property,
|
||||
__metadata("design:type", ListItem)
|
||||
], List.prototype, "loadMoreView", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
], List.prototype, "onScroll", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
], List.prototype, "onScrollEnd", void 0);
|
||||
export function list(config) {
|
||||
const ret = new List;
|
||||
for (let key in config) {
|
||||
|
Reference in New Issue
Block a user