fix: 背景图片空url 问题

This commit is contained in:
wangjiahao 2021-05-08 11:06:45 +08:00
parent 104a8a48fa
commit 7ff46ff804

View File

@ -22,9 +22,13 @@ export default {
},
computed: {
classBackground() {
return {
background: `url(${this.template.snapshot}) no-repeat`,
'background-size': `100% 100%`
if (this.template.snapshot) {
return {
background: `url(${this.template.snapshot}) no-repeat`,
'background-size': `100% 100%`
}
} else {
return {}
}
}
},