js: list add canDrag, onDraging & onDraged
This commit is contained in:
27
doric-js/index.d.ts
vendored
27
doric-js/index.d.ts
vendored
@@ -763,6 +763,9 @@ declare module 'doric/lib/src/widget/list' {
|
||||
* Take effect only on iOS
|
||||
*/
|
||||
bounces?: boolean;
|
||||
canDrag?: boolean;
|
||||
onDragging?: (from: number, to: number) => void;
|
||||
onDragged?: (from: number, to: number) => void;
|
||||
scrollToItem(context: BridgeContext, index: number, config?: {
|
||||
animated?: boolean;
|
||||
}): Promise<any>;
|
||||
@@ -1211,11 +1214,11 @@ declare module 'doric/lib/src/native/navigator' {
|
||||
export function internalScheme(context: BridgeContext, panelClass: ClassType<Panel>): string;
|
||||
export function navigator(context: BridgeContext): {
|
||||
push: (source: string | ClassType<Panel>, config?: {
|
||||
alias?: string | undefined;
|
||||
animated?: boolean | undefined;
|
||||
extra?: object | undefined;
|
||||
singlePage?: boolean | undefined;
|
||||
} | undefined) => Promise<any>;
|
||||
alias?: string;
|
||||
animated?: boolean;
|
||||
extra?: object;
|
||||
singlePage?: boolean;
|
||||
}) => Promise<any>;
|
||||
pop: (animated?: boolean) => Promise<any>;
|
||||
popSelf: (animated?: boolean) => Promise<any>;
|
||||
popToRoot: (animated?: boolean) => Promise<any>;
|
||||
@@ -1246,19 +1249,19 @@ declare module 'doric/lib/src/native/network' {
|
||||
}
|
||||
export function network(context: BridgeContext): {
|
||||
request: (config: IRequest) => Promise<IResponse>;
|
||||
get: (url: string, config?: IRequest | undefined) => Promise<IResponse>;
|
||||
post: (url: string, data?: string | object | undefined, config?: IRequest | undefined) => Promise<IResponse>;
|
||||
put: (url: string, data?: string | object | undefined, config?: IRequest | undefined) => Promise<IResponse>;
|
||||
delete: (url: string, data?: string | object | undefined, config?: IRequest | undefined) => Promise<IResponse>;
|
||||
get: (url: string, config?: IRequest) => Promise<IResponse>;
|
||||
post: (url: string, data?: object | string, config?: IRequest) => Promise<IResponse>;
|
||||
put: (url: string, data?: object | string, config?: IRequest) => Promise<IResponse>;
|
||||
delete: (url: string, data?: object | string, config?: IRequest) => Promise<IResponse>;
|
||||
};
|
||||
}
|
||||
|
||||
declare module 'doric/lib/src/native/storage' {
|
||||
import { BridgeContext } from "doric/lib/src/runtime/global";
|
||||
export function storage(context: BridgeContext): {
|
||||
setItem: (key: string, value: string, zone?: string | undefined) => Promise<any>;
|
||||
getItem: (key: string, zone?: string | undefined) => Promise<string>;
|
||||
remove: (key: string, zone?: string | undefined) => Promise<any>;
|
||||
setItem: (key: string, value: string, zone?: string) => Promise<any>;
|
||||
getItem: (key: string, zone?: string) => Promise<string>;
|
||||
remove: (key: string, zone?: string) => Promise<any>;
|
||||
clear: (zone: string) => Promise<any>;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user