fix: requestHandlersMap 没有加到 appContext 里

This commit is contained in:
muyun.my 2020-12-16 23:38:47 +08:00
parent 6bf75cd526
commit a8d43c3ec8
2 changed files with 8 additions and 2 deletions

View File

@ -318,6 +318,7 @@ export class SimulatorRendererContainer implements BuiltinSimulatorRenderer {
}, },
}, },
constants: {}, constants: {},
requestHandlersMap: this._requestHandlersMap,
}; };
host.injectionConsumer.consume((data) => { host.injectionConsumer.consume((data) => {
// sync utils, i18n, contants,... config // sync utils, i18n, contants,... config
@ -357,6 +358,10 @@ export class SimulatorRendererContainer implements BuiltinSimulatorRenderer {
@computed get device() { @computed get device() {
return this._device; return this._device;
} }
@obx.ref private _requestHandlersMap = null;
@computed get requestHandlersMap(): any {
return this._requestHandlersMap;
}
@obx.ref private _componentsMap = {}; @obx.ref private _componentsMap = {};
@computed get componentsMap(): any { @computed get componentsMap(): any {
return this._componentsMap; return this._componentsMap;

View File

@ -261,10 +261,11 @@ export class SimulatorRendererContainer implements BuiltinSimulatorRenderer {
getUrlParams() { getUrlParams() {
const search = history.location.search; const search = history.location.search;
return parseQuery(search); return parseQuery(search);
} },
} },
}, },
constants: {}, constants: {},
requestHandlersMap: this._requestHandlersMap,
}; };
host.injectionConsumer.consume((data) => { host.injectionConsumer.consume((data) => {
// sync utils, i18n, contants,... config // sync utils, i18n, contants,... config