diff --git a/package.json b/package.json index 68a6cb43..bbcfd1ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@micro-zoe/micro-app", - "version": "1.0.0-rc.27", + "name": "bl-micro-app", + "version": "1.0.1", "description": "A lightweight, efficient and powerful micro front-end framework", "private": false, "main": "lib/index.min.js", @@ -52,7 +52,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/jd-opensource/micro-app.git" + "url": "https://github.com/kuaijing-bailing/micro-app.git" }, "publishConfig": { "access": "public" diff --git a/src/libs/utils.ts b/src/libs/utils.ts index d4dc48a9..bd31ddee 100644 --- a/src/libs/utils.ts +++ b/src/libs/utils.ts @@ -319,7 +319,7 @@ export function formatAppURL(url: string | null, appName: string | null = null): * BUG FIX: Never using '/' to complete url, refer to https://github.com/jd-opensource/micro-app/issues/1147 */ const fullPath = `${origin}${pathname}${search}` - return /^https?:\/\//.test(fullPath) ? fullPath : '' + return /^\w+?:\/\//.test(fullPath) ? fullPath : '' } catch (e) { logError(e, appName) return '' @@ -366,7 +366,7 @@ export function getEffectivePath(url: string): string { export function CompletionPath(path: string, baseURI: string): string { if ( !path || - /^((((ht|f)tps?)|file):)?\/\//.test(path) || + /^((\w+):)?\/\//.test(path) || /^(data|blob):/.test(path) ) return path diff --git a/src/sandbox/adapter.ts b/src/sandbox/adapter.ts index 72938c57..b40489dd 100644 --- a/src/sandbox/adapter.ts +++ b/src/sandbox/adapter.ts @@ -157,7 +157,9 @@ export function updateElementInfo (node: T, appName: string | null): T { if (isAnchorElement(node)) { // a 标签 const microApp = AppManager.getInstance().get(appName) - if (microApp) { + const hrefDescriptor = Object.getOwnPropertyDescriptor(node, 'href') + const hrefConfigurable = hrefDescriptor?.configurable || !hrefDescriptor + if (microApp && hrefConfigurable) { props.href = { get() { return this.getAttribute('href')