feat: add bounces for list,scroller,nestedSlider,flowlayout

This commit is contained in:
pengfei.zhou
2021-04-30 14:32:53 +08:00
committed by osborn
parent e621db48b9
commit 6da8d5658b
22 changed files with 109 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ export declare class FlowLayout extends Superview {
y: number;
}) => void;
scrollable?: boolean;
bounces?: boolean;
reset(): void;
private getItem;
private renderBunchedItems;

View File

@@ -118,6 +118,10 @@ __decorate([
Property,
__metadata("design:type", Boolean)
], FlowLayout.prototype, "scrollable", void 0);
__decorate([
Property,
__metadata("design:type", Boolean)
], FlowLayout.prototype, "bounces", void 0);
export function flowlayout(config) {
const ret = new FlowLayout;
for (let key in config) {

View File

@@ -32,6 +32,7 @@ export declare class List extends Superview {
}) => void;
scrolledPosition?: number;
scrollable?: boolean;
bounces?: boolean;
scrollToItem(context: BridgeContext, index: number, config?: {
animated?: boolean;
}): Promise<any>;

View File

@@ -117,6 +117,10 @@ __decorate([
Property,
__metadata("design:type", Boolean)
], List.prototype, "scrollable", void 0);
__decorate([
Property,
__metadata("design:type", Boolean)
], List.prototype, "bounces", void 0);
export function list(config) {
const ret = new List;
for (let key in config) {

View File

@@ -3,6 +3,7 @@ import { BridgeContext } from '../runtime/global';
export declare class NestedSlider extends Group {
onPageSlided?: (index: number) => void;
scrollable?: boolean;
bounces?: boolean;
addSlideItem(view: View): void;
slidePage(context: BridgeContext, page: number, smooth?: boolean): Promise<any>;
getSlidedPage(context: BridgeContext): Promise<number>;

View File

@@ -42,3 +42,7 @@ __decorate([
Property,
__metadata("design:type", Boolean)
], NestedSlider.prototype, "scrollable", void 0);
__decorate([
Property,
__metadata("design:type", Boolean)
], NestedSlider.prototype, "bounces", void 0);

View File

@@ -16,6 +16,7 @@ export declare class Scroller extends Superview {
y: number;
}) => void;
scrollable?: boolean;
bounces?: boolean;
allSubviews(): View[];
toModel(): NativeViewModel;
scrollTo(context: BridgeContext, offset: {

View File

@@ -66,3 +66,7 @@ __decorate([
Property,
__metadata("design:type", Boolean)
], Scroller.prototype, "scrollable", void 0);
__decorate([
Property,
__metadata("design:type", Boolean)
], Scroller.prototype, "bounces", void 0);