From a6dc91bf7d73c2423305846e3b2870bcca99d446 Mon Sep 17 00:00:00 2001 From: bailicangdu <1264889788@qq.com> Date: Wed, 22 Mar 2023 18:53:47 +0800 Subject: [PATCH] fix(1.0.0-beta.1): fixed a cross domain issue caused by modifying domain --- dev/children/vite2/index.html | 6 ++- dev/children/vite2/src/main.js | 4 ++ dev/main-react16/src/pages/document.ejs | 4 ++ dev/main-vue2/public/index.html | 4 ++ dev/main-vue2/src/main.js | 13 +------ dev/main-vue2/src/pages/vite.vue | 5 +-- docs/1.x/zh-cn/env.md | 2 +- src/sandbox/iframe/index.ts | 50 ++++++++++++------------- src/sandbox/with/index.ts | 1 + 9 files changed, 45 insertions(+), 44 deletions(-) diff --git a/dev/children/vite2/index.html b/dev/children/vite2/index.html index e30830140..6428cfe65 100644 --- a/dev/children/vite2/index.html +++ b/dev/children/vite2/index.html @@ -9,8 +9,12 @@ console.log('普通的内联script元素', window) +
diff --git a/dev/children/vite2/src/main.js b/dev/children/vite2/src/main.js index e6bd98e7c..005372173 100644 --- a/dev/children/vite2/src/main.js +++ b/dev/children/vite2/src/main.js @@ -341,3 +341,7 @@ if (process.env.NODE_ENV !== 'production') { // console.log('scopeProperties Vue: ', Vue) // console.log('scopeProperties window.Vue: ', window.Vue) + + +/* ---------------------- 特殊操作 --------------------- */ +// window.document.domain = 'localhost'; diff --git a/dev/main-react16/src/pages/document.ejs b/dev/main-react16/src/pages/document.ejs index f6aa51126..33d61528b 100644 --- a/dev/main-react16/src/pages/document.ejs +++ b/dev/main-react16/src/pages/document.ejs @@ -24,6 +24,10 @@ Micro App + diff --git a/dev/main-vue2/public/index.html b/dev/main-vue2/public/index.html index 412352865..0b8eb50fb 100644 --- a/dev/main-vue2/public/index.html +++ b/dev/main-vue2/public/index.html @@ -6,6 +6,10 @@ <%= htmlWebpackPlugin.options.title %> +