js: add flowlayout drag declaration

This commit is contained in:
王劲鹏 2022-08-25 10:52:01 +08:00 committed by osborn
parent 55efff976a
commit be6a0cd64c
7 changed files with 84 additions and 0 deletions

View File

@ -3264,6 +3264,22 @@ var FlowLayout = /** @class */ (function (_super) {
Property,
__metadata$7("design:type", Boolean)
], FlowLayout.prototype, "bounces", void 0);
__decorate$7([
Property,
__metadata$7("design:type", Boolean)
], FlowLayout.prototype, "canDrag", void 0);
__decorate$7([
Property,
__metadata$7("design:type", Function)
], FlowLayout.prototype, "beforeDragging", void 0);
__decorate$7([
Property,
__metadata$7("design:type", Function)
], FlowLayout.prototype, "onDragging", void 0);
__decorate$7([
Property,
__metadata$7("design:type", Function)
], FlowLayout.prototype, "onDragged", void 0);
return FlowLayout;
}(Superview));
function flowlayout(config) {

View File

@ -2501,6 +2501,22 @@ __decorate$7([
Property,
__metadata$7("design:type", Boolean)
], FlowLayout.prototype, "bounces", void 0);
__decorate$7([
Property,
__metadata$7("design:type", Boolean)
], FlowLayout.prototype, "canDrag", void 0);
__decorate$7([
Property,
__metadata$7("design:type", Function)
], FlowLayout.prototype, "beforeDragging", void 0);
__decorate$7([
Property,
__metadata$7("design:type", Function)
], FlowLayout.prototype, "onDragging", void 0);
__decorate$7([
Property,
__metadata$7("design:type", Function)
], FlowLayout.prototype, "onDragged", void 0);
function flowlayout(config) {
const ret = new FlowLayout;
for (let key in config) {

View File

@ -4031,6 +4031,22 @@ __decorate$7([
Property,
__metadata$7("design:type", Boolean)
], FlowLayout.prototype, "bounces", void 0);
__decorate$7([
Property,
__metadata$7("design:type", Boolean)
], FlowLayout.prototype, "canDrag", void 0);
__decorate$7([
Property,
__metadata$7("design:type", Function)
], FlowLayout.prototype, "beforeDragging", void 0);
__decorate$7([
Property,
__metadata$7("design:type", Function)
], FlowLayout.prototype, "onDragging", void 0);
__decorate$7([
Property,
__metadata$7("design:type", Function)
], FlowLayout.prototype, "onDragged", void 0);
function flowlayout(config) {
const ret = new FlowLayout;
for (let key in config) {

4
doric-js/index.d.ts vendored
View File

@ -1190,6 +1190,10 @@ declare module "doric" {
* Take effect only on iOS
*/
bounces?: boolean;
canDrag?: boolean;
beforeDragging?: (from: number) => void;
onDragging?: (from: number, to: number) => void;
onDragged?: (from: number, to: number) => void;
/**
* @param context
* @returns Returns array of visible view's index.

View File

@ -37,6 +37,10 @@ export declare class FlowLayout extends Superview {
* Take effect only on iOS
*/
bounces?: boolean;
canDrag?: boolean;
beforeDragging?: (from: number) => void;
onDragging?: (from: number, to: number) => void;
onDragged?: (from: number, to: number) => void;
/**
* @param context
* @returns Returns array of visible view's index.

View File

@ -147,6 +147,22 @@ __decorate([
Property,
__metadata("design:type", Boolean)
], FlowLayout.prototype, "bounces", void 0);
__decorate([
Property,
__metadata("design:type", Boolean)
], FlowLayout.prototype, "canDrag", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], FlowLayout.prototype, "beforeDragging", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], FlowLayout.prototype, "onDragging", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], FlowLayout.prototype, "onDragged", void 0);
export function flowlayout(config) {
const ret = new FlowLayout;
for (let key in config) {

View File

@ -84,6 +84,18 @@ export class FlowLayout extends Superview {
@Property
bounces?: boolean
@Property
canDrag?: boolean
@Property
beforeDragging?: (from: number) => void
@Property
onDragging?: (from: number, to: number) => void
@Property
onDragged?: (from: number, to: number) => void
/**
* @param context
* @returns Returns array of visible view's index.