forked from github/dataease
fix(嵌入式): 嵌入式二级路径问题
This commit is contained in:
parent
b5a9a9779c
commit
04528acb14
@ -26,6 +26,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sourcemap: true
|
sourcemap: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,8 @@ const formatterUrl = <T extends Node>(node: T, prefix: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (url.includes(suffix) || url.includes('dataease-private')) {
|
if (url.includes(suffix) || url.includes('dataease-private')) {
|
||||||
const currentUrlprefix = new URL(url).origin
|
const { origin, pathname } = new URL(url)
|
||||||
|
const currentUrlprefix = `${origin}${pathname.slice(0, pathname.length - 1)}`
|
||||||
const newUrl = url.replace(currentUrlprefix, prefix)
|
const newUrl = url.replace(currentUrlprefix, prefix)
|
||||||
if (node instanceof HTMLLinkElement) {
|
if (node instanceof HTMLLinkElement) {
|
||||||
node.href = newUrl
|
node.href = newUrl
|
||||||
|
Loading…
Reference in New Issue
Block a user