feat: enhance plugin navigator,add popSelf and popToRoot
This commit is contained in:
2
doric-js/lib/src/native/navigator.d.ts
vendored
2
doric-js/lib/src/native/navigator.d.ts
vendored
@@ -10,5 +10,7 @@ export declare function navigator(context: BridgeContext): {
|
||||
singlePage?: boolean | undefined;
|
||||
} | undefined) => Promise<any>;
|
||||
pop: (animated?: boolean) => Promise<any>;
|
||||
popSelf: (animated?: boolean) => Promise<any>;
|
||||
popToRoot: (animated?: boolean) => Promise<any>;
|
||||
openUrl: (url: string) => Promise<any>;
|
||||
};
|
||||
|
@@ -18,6 +18,12 @@ export function navigator(context) {
|
||||
pop: (animated = true) => {
|
||||
return context.callNative(moduleName, 'pop', { animated });
|
||||
},
|
||||
popSelf: (animated = true) => {
|
||||
return context.callNative(moduleName, 'popSelf', { animated });
|
||||
},
|
||||
popToRoot: (animated = true) => {
|
||||
return context.callNative(moduleName, 'popToRoot', { animated });
|
||||
},
|
||||
openUrl: (url) => {
|
||||
return context.callNative(moduleName, "openUrl", url);
|
||||
},
|
||||
|
Reference in New Issue
Block a user