forked from github/dataease
Merge pull request #9847 from dataease/pr@dev@fix_picture-url3
fix(仪表板): 修复图片组件不能相对路径访问的问题
This commit is contained in:
commit
d96027f49a
@ -447,7 +447,7 @@ export default {
|
||||
icon: '',
|
||||
hyperlinks: HYPERLINKS,
|
||||
mobileStyle: BASE_MOBILE_STYLE,
|
||||
propValue: imgUrlTrans(fileUrl),
|
||||
propValue: fileUrl,
|
||||
commonBackground: deepCopy(COMMON_BACKGROUND),
|
||||
style: {
|
||||
...PIC_STYLE
|
||||
|
@ -299,7 +299,7 @@ export function colorReverse(OldColorValue) {
|
||||
}
|
||||
|
||||
export function imgUrlTrans(url) {
|
||||
if (url && typeof url === 'string' && url.indexOf('static-resource') > -1 && url.indexOf('http') === -1) {
|
||||
if (url && typeof url === 'string' && url.indexOf('static-resource') > -1 && url.indexOf('http') === -1 && url.indexOf('./') === -1) {
|
||||
return process.env.VUE_APP_BASE_API + url.replace('/static-resource', 'static-resource')
|
||||
} else {
|
||||
return url
|
||||
|
Loading…
Reference in New Issue
Block a user