Fix:修复主题配置中背景图片为none时会发起一个异常请求的问题

This commit is contained in:
wanglin2 2023-08-09 18:43:43 +08:00
parent bbf424c6d2
commit d9a6981df4

View File

@ -17,7 +17,7 @@ class Style {
// 设置新样式
let { backgroundColor, backgroundImage, backgroundRepeat, backgroundPosition, backgroundSize } = themeConfig
el.style.backgroundColor = backgroundColor
if (backgroundImage) {
if (backgroundImage && backgroundImage !== 'none') {
el.style.backgroundImage = `url(${backgroundImage})`
el.style.backgroundRepeat = backgroundRepeat
el.style.backgroundPosition = backgroundPosition