diff --git a/runtime/main/app/bundle.ts b/runtime/main/app/bundle.ts index c7ccf1df..d7558684 100644 --- a/runtime/main/app/bundle.ts +++ b/runtime/main/app/bundle.ts @@ -58,8 +58,7 @@ export const defineFn = function(page: Page, packageName: string, name?: string, const pageRequire = (name: string) : any => { if (isModule(name)) { const appFunction = (): Page => { - const appPage: Page = appMap[packageName].getAppInstance(); - return appPage || page; + return page || appMap[packageName].getAppInstance(); }; return requireModule(appFunction, removePrefix(name)); } diff --git a/runtime/main/app/index.ts b/runtime/main/app/index.ts index bdc572cb..2ba99ea8 100644 --- a/runtime/main/app/index.ts +++ b/runtime/main/app/index.ts @@ -111,7 +111,7 @@ export function appCreate(page: Page, options: Options, data: object, services: }; // require in top app(instance) - const appRequireModule = name => requireModule(appPage, removePrefix(name)); + const appRequireModule = name => requireModule(page || appPage, removePrefix(name)); const parseOptions: ParseOptions = { $app_define$: appDefine, $app_bootstrap$: appBootstrap, diff --git a/runtime/vdom/Element.ts b/runtime/vdom/Element.ts index f36c673c..a784c959 100644 --- a/runtime/vdom/Element.ts +++ b/runtime/vdom/Element.ts @@ -620,10 +620,6 @@ class Element extends Node { if (this.attr[key] === value && silent !== false) { return; } - // Because the data has been addressed in SetData - if (key === 'data') { - return; - } this.attr[key] = value; const taskCenter = this.getTaskCenter(this.docId); if (!silent && taskCenter) {