Browse Source

chore: 顶级html

zhangyuhan 3 months ago
parent
commit
2e692e2679
1 changed files with 2 additions and 2 deletions
  1. 2 2
      apps/work-bench/src/register-app.js

+ 2 - 2
apps/work-bench/src/register-app.js

@@ -193,8 +193,8 @@ export const subApps = {
 
 function registerApps(apps = []) {
   // 提供顶级 window
-  window.__use_window__ = function (fn) {
-    return fn(window)
+  window.__use_html__ = () => {
+    return Vue.prototype.$root.$el.parentNode.parentNode
   }
   store.commit('work-bench/app/register', apps)
   store.dispatch('work-bench/app/microAppsStart')