Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/libs/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''
Expand Down Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion src/sandbox/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ export function updateElementInfo <T> (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')
Expand Down