forked from github/dataease
fix(仪表板): 修复图片组件不能相对路径访问的问题
This commit is contained in:
parent
e49eb97396
commit
0f0c48169b
@ -447,7 +447,7 @@ export default {
|
|||||||
icon: '',
|
icon: '',
|
||||||
hyperlinks: HYPERLINKS,
|
hyperlinks: HYPERLINKS,
|
||||||
mobileStyle: BASE_MOBILE_STYLE,
|
mobileStyle: BASE_MOBILE_STYLE,
|
||||||
propValue: imgUrlTrans(fileUrl),
|
propValue: fileUrl,
|
||||||
commonBackground: deepCopy(COMMON_BACKGROUND),
|
commonBackground: deepCopy(COMMON_BACKGROUND),
|
||||||
style: {
|
style: {
|
||||||
...PIC_STYLE
|
...PIC_STYLE
|
||||||
|
@ -299,7 +299,7 @@ export function colorReverse(OldColorValue) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function imgUrlTrans(url) {
|
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')
|
return process.env.VUE_APP_BASE_API + url.replace('/static-resource', 'static-resource')
|
||||||
} else {
|
} else {
|
||||||
return url
|
return url
|
||||||
|
Loading…
Reference in New Issue
Block a user