feat:Scroller add contentOffset property
This commit is contained in:
8
doric-js/lib/src/widget/scroller.d.ts
vendored
8
doric-js/lib/src/widget/scroller.d.ts
vendored
@@ -3,9 +3,17 @@ import { BridgeContext } from '../runtime/global';
|
||||
export declare function scroller(content: View, config?: IScroller): Scroller;
|
||||
export interface IScroller extends IView {
|
||||
content?: View;
|
||||
contentOffset?: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
}
|
||||
export declare class Scroller extends Superview implements IScroller {
|
||||
content: View;
|
||||
contentOffset?: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
allSubviews(): View[];
|
||||
toModel(): NativeViewModel;
|
||||
scrollTo(context: BridgeContext, offset: {
|
||||
|
@@ -1,3 +1,12 @@
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
/*
|
||||
* Copyright [2019] [Doric.Pub]
|
||||
*
|
||||
@@ -13,7 +22,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { Superview } from '../ui/view';
|
||||
import { Superview, Property } from '../ui/view';
|
||||
import { layoutConfig } from '../util/layoutconfig';
|
||||
export function scroller(content, config) {
|
||||
return (new Scroller).also(v => {
|
||||
@@ -38,3 +47,7 @@ export class Scroller extends Superview {
|
||||
return this.nativeChannel(context, "scrollTo")({ offset, animated });
|
||||
}
|
||||
}
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Object)
|
||||
], Scroller.prototype, "contentOffset", void 0);
|
||||
|
Reference in New Issue
Block a user