forked from github/dataease
Merge pull request #8605 from dataease/pr@dev-v2@fix_embedded_div_dynamic_url
fix: 嵌入式div方式在动态访问路径场景下静态资源路径错误
This commit is contained in:
commit
f8461e62fd
@ -99,6 +99,10 @@ htmlStream.pipe(parserStream).on('finish', () => {
|
||||
}
|
||||
if (url.includes(suffix)) {
|
||||
prefix = new URL(url).origin
|
||||
const index = url.indexOf(\`/js/div_import_${suffix}\`)
|
||||
if (index > 0) {
|
||||
prefix = url.substring(0, index)
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,10 @@ const getPrefix = (): string => {
|
||||
}
|
||||
if (url.includes(suffix)) {
|
||||
prefix = new URL(url).origin
|
||||
const index = url.indexOf(`/js/div_import_${suffix}`)
|
||||
if (index > 0) {
|
||||
prefix = url.substring(0, index)
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user