Android support internal class
This commit is contained in:
4
doric-js/lib/src/native/navigator.d.ts
vendored
4
doric-js/lib/src/native/navigator.d.ts
vendored
@@ -1,6 +1,8 @@
|
||||
import { BridgeContext } from "../runtime/global";
|
||||
import { ClassType } from "../pattern/mvvm";
|
||||
import { Panel } from "../ui/panel";
|
||||
export declare function navigator(context: BridgeContext): {
|
||||
push: (source: string, config?: {
|
||||
push: (source: string | ClassType<Panel>, config?: {
|
||||
alias?: string | undefined;
|
||||
animated?: boolean | undefined;
|
||||
extra?: object | undefined;
|
||||
|
@@ -2,6 +2,9 @@ export function navigator(context) {
|
||||
const moduleName = "navigator";
|
||||
return {
|
||||
push: (source, config) => {
|
||||
if (typeof source === 'function') {
|
||||
source = `_internal_://export?class=${encodeURIComponent(source.name)}&context=${context.id}`;
|
||||
}
|
||||
if (config && config.extra) {
|
||||
config.extra = JSON.stringify(config.extra);
|
||||
}
|
||||
|
Reference in New Issue
Block a user