feat: add scrollsToTop for scrollable views only for iOS

This commit is contained in:
pengfei.zhou
2023-03-13 19:17:56 +08:00
committed by osborn
parent 0774df96e1
commit 7db5d68db5
30 changed files with 221 additions and 3 deletions

View File

@@ -37,6 +37,10 @@ export declare class FlowLayout extends Superview {
* Take effect only on iOS
*/
bounces?: boolean;
/**
* Take effect only on iOS
*/
scrollsToTop?: boolean;
canDrag?: boolean;
/**
* @param from

View File

@@ -147,6 +147,10 @@ __decorate([
Property,
__metadata("design:type", Boolean)
], FlowLayout.prototype, "bounces", void 0);
__decorate([
Property,
__metadata("design:type", Boolean)
], FlowLayout.prototype, "scrollsToTop", void 0);
__decorate([
Property,
__metadata("design:type", Boolean)

View File

@@ -30,6 +30,10 @@ export declare class HorizontalList extends Superview {
* Take effect only on iOS
*/
bounces?: boolean;
/**
* Take effect only on iOS
*/
scrollsToTop?: boolean;
canDrag?: boolean;
/**
* @param from

View File

@@ -138,6 +138,10 @@ __decorate([
Property,
__metadata("design:type", Boolean)
], HorizontalList.prototype, "bounces", void 0);
__decorate([
Property,
__metadata("design:type", Boolean)
], HorizontalList.prototype, "scrollsToTop", void 0);
__decorate([
Property,
__metadata("design:type", Boolean)

View File

@@ -36,6 +36,10 @@ export declare class List extends Superview {
* Take effect only on iOS
*/
bounces?: boolean;
/**
* Take effect only on iOS
*/
scrollsToTop?: boolean;
canDrag?: boolean;
/**
* @param from

View File

@@ -142,6 +142,10 @@ __decorate([
Property,
__metadata("design:type", Boolean)
], List.prototype, "bounces", void 0);
__decorate([
Property,
__metadata("design:type", Boolean)
], List.prototype, "scrollsToTop", void 0);
__decorate([
Property,
__metadata("design:type", Boolean)

View File

@@ -7,6 +7,10 @@ export declare class NestedSlider extends Group {
* Take effect only on iOS
*/
bounces?: boolean;
/**
* Take effect only on iOS
*/
scrollsToTop?: boolean;
addSlideItem(view: View): void;
slidePage(context: BridgeContext, page: number, smooth?: boolean): Promise<any>;
getSlidedPage(context: BridgeContext): Promise<number>;

View File

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

View File

@@ -20,6 +20,10 @@ export declare class Scroller extends Superview implements JSX.ElementChildrenAt
* Take effect only on iOS
*/
bounces?: boolean;
/**
* Take effect only on iOS
*/
scrollsToTop?: boolean;
allSubviews(): View[];
toModel(): NativeViewModel;
scrollTo(context: BridgeContext, offset: {

View File

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

View File

@@ -20,6 +20,10 @@ export declare class Slider extends Superview {
* Take effect only on iOS
*/
bounces?: boolean;
/**
* Take effect only on iOS
*/
scrollsToTop?: boolean;
/**
* Set the effect when sliding
* ZoomOut is currently supported

View File

@@ -100,6 +100,10 @@ __decorate([
Property,
__metadata("design:type", Boolean)
], Slider.prototype, "bounces", void 0);
__decorate([
Property,
__metadata("design:type", Boolean)
], Slider.prototype, "scrollsToTop", void 0);
__decorate([
Property,
__metadata("design:type", Object)