From 10d7cbf328c8a83505c093b5b1df0b104da3919d Mon Sep 17 00:00:00 2001 From: raoenhui Date: Tue, 1 Oct 2024 16:00:22 +0800 Subject: [PATCH 1/7] Update Contact.md --- Contact.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Contact.md b/Contact.md index a017a3b4..18621d10 100644 --- a/Contact.md +++ b/Contact.md @@ -1,7 +1,8 @@ 欢迎小伙伴们加入micro-app微信群交流^ ^ +![Uploading IMG_0966.jpeg…]() + -![IMG_0882](https://github.com/user-attachments/assets/aa133812-2920-4f87-80e3-c44778685725) From d6f1ae6b23e413f195ccdadff803ec2e135a62de Mon Sep 17 00:00:00 2001 From: timhub66 Date: Wed, 9 Oct 2024 09:06:41 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix:=20a=20href=20=E8=BF=87=E6=BB=A4undefin?= =?UTF-8?q?ed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sandbox/adapter.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sandbox/adapter.ts b/src/sandbox/adapter.ts index 2543f013..66dae8a2 100644 --- a/src/sandbox/adapter.ts +++ b/src/sandbox/adapter.ts @@ -162,6 +162,9 @@ export function updateElementInfo (node: T, appName: string | null): T { return this.getAttribute('href') }, set(value: string) { + if (value === undefined) { + return + } this.setAttribute('href', value) }, } From ab08efefdb35eeb05299efe71d93d921298c21ad Mon Sep 17 00:00:00 2001 From: raoenhui Date: Wed, 9 Oct 2024 13:36:13 +0800 Subject: [PATCH 3/7] Update Contact.md --- Contact.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Contact.md b/Contact.md index 18621d10..e3aac489 100644 --- a/Contact.md +++ b/Contact.md @@ -1,7 +1,6 @@ 欢迎小伙伴们加入micro-app微信群交流^ ^ -![Uploading IMG_0966.jpeg…]() - +![IMG_1098](https://github.com/user-attachments/assets/d6715819-6d98-4189-9bd4-93f6838aaaaf) From a73aa2fdc0cb82cdaaa0d49801563305d50d9bba Mon Sep 17 00:00:00 2001 From: timhub66 Date: Sun, 13 Oct 2024 19:32:24 +0800 Subject: [PATCH 4/7] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dechart=20Array=20?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sandbox/iframe/special_key.ts | 6 +++++- src/sandbox/iframe/window.ts | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/sandbox/iframe/special_key.ts b/src/sandbox/iframe/special_key.ts index 196ee511..72a7c7f6 100644 --- a/src/sandbox/iframe/special_key.ts +++ b/src/sandbox/iframe/special_key.ts @@ -1,5 +1,9 @@ + +export const UN_PROXY_INSTANCEOF_KEYS = [ + 'Array' +] + export const escape2RawWindowKeys = [ - 'Array', 'getComputedStyle', // FIX ISSUE: https://github.com/micro-zoe/micro-app/issues/1292 'DOMParser', diff --git a/src/sandbox/iframe/window.ts b/src/sandbox/iframe/window.ts index 145059c9..f403c4bc 100644 --- a/src/sandbox/iframe/window.ts +++ b/src/sandbox/iframe/window.ts @@ -20,6 +20,7 @@ import { SCOPE_WINDOW_ON_EVENT_OF_IFRAME, } from '../../constants' import { + UN_PROXY_INSTANCEOF_KEYS, escape2RawWindowKeys, escape2RawWindowRegExpKeys, } from './special_key' @@ -92,7 +93,7 @@ function patchWindowProperty ( * 4. native url instanceof iframe window.URL * ... */ - if (isConstructor(microAppWindow[key]) && key in rawWindow) { + if (isConstructor(microAppWindow[key]) && key in rawWindow && !UN_PROXY_INSTANCEOF_KEYS.includes(key)) { rawDefineProperty(microAppWindow[key], Symbol.hasInstance, { configurable: true, enumerable: false, From 2f57bd9187d22a0c9b61ee92f1de48a5c93e0345 Mon Sep 17 00:00:00 2001 From: raoenhui Date: Tue, 15 Oct 2024 16:07:22 +0800 Subject: [PATCH 5/7] Update Contact.md --- Contact.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Contact.md b/Contact.md index e3aac489..e83cce37 100644 --- a/Contact.md +++ b/Contact.md @@ -1,6 +1,7 @@ 欢迎小伙伴们加入micro-app微信群交流^ ^ -![IMG_1098](https://github.com/user-attachments/assets/d6715819-6d98-4189-9bd4-93f6838aaaaf) +![IMG_1210](https://github.com/user-attachments/assets/4dad4e21-7a08-43a0-ad5e-a3c4968d0b49) + From 321b89bdcfab8b1aa030194bd480e979ce1e21ff Mon Sep 17 00:00:00 2001 From: timhub66 Date: Wed, 16 Oct 2024 20:05:27 +0800 Subject: [PATCH 6/7] =?UTF-8?q?feat:=20a=E6=A0=87=E7=AD=BEhref=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81excludeAssetFilter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sandbox/iframe/element.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/sandbox/iframe/element.ts b/src/sandbox/iframe/element.ts index 1614f8ff..e67cf5d4 100644 --- a/src/sandbox/iframe/element.ts +++ b/src/sandbox/iframe/element.ts @@ -11,11 +11,14 @@ import { isElement, isNode, isDocumentFragment, + isFunction, + isBrowser, } from '../../libs/utils' import { updateElementInfo, getIframeParentNodeDesc, } from '../adapter' +import microApp from '../../micro_app' /** * patch Element & Node of child app @@ -242,7 +245,11 @@ function patchIframeAttribute (url: string, microAppWindow: microAppWindowType): ((key === 'src' || key === 'srcset') && /^(img|script|video|audio|source|embed)$/i.test(this.tagName)) || (key === 'href' && /^(a|link|image)$/i.test(this.tagName)) ) { - value = CompletionPath(value, url) + let _url = url + if (isBrowser && key === 'href' && /^a$/i.test(this.tagName) && isFunction(microApp.options.excludeAssetFilter) && microApp.options.excludeAssetFilter(value)) { + _url = document.baseURI + } + value = CompletionPath(value, _url) } rawMicroSetAttribute.call(this, key, value) } From 2a99397305c0de8820bc43b7258c506b14c62e88 Mon Sep 17 00:00:00 2001 From: timhub66 Date: Wed, 16 Oct 2024 21:25:50 +0800 Subject: [PATCH 7/7] feat: release 1.0.0-rc.13 --- docs/zh-cn/changelog.md | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/zh-cn/changelog.md b/docs/zh-cn/changelog.md index 3529bdee..5e65845d 100644 --- a/docs/zh-cn/changelog.md +++ b/docs/zh-cn/changelog.md @@ -7,6 +7,14 @@ - 修订版本号:每周末会进行日常 bugfix 更新。(如果有紧急的 bugfix,则任何时候都可发布) --- +### 1.0.0-rc.13 + +`2024-10-16` +- **Bug Fix** + - 🐞 修复 子应用instanceof Array无法正确判定,[issue 1400](https://github.com/micro-zoe/micro-app/issues/1400)。 + - 🐞 修复 子应用a标签href为undefined引起异常。 +- **Feature** + - 支持 cesium mars3d 生态。 ### 1.0.0-rc.12 diff --git a/package.json b/package.json index 6c0490d2..54a43090 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@micro-zoe/micro-app", - "version": "1.0.0-rc.12", + "version": "1.0.0-rc.13", "description": "A lightweight, efficient and powerful micro front-end framework", "private": false, "main": "lib/index.min.js",