diff --git a/src/views/preview/utils/style.ts b/src/views/preview/utils/style.ts index 6cd25cba..507c7a22 100644 --- a/src/views/preview/utils/style.ts +++ b/src/views/preview/utils/style.ts @@ -33,7 +33,7 @@ export const getStatusStyle = (attr: StatusType) => { export const getEditCanvasConfigStyle = (canvas: EditCanvasConfigType) => { // 背景 const computedBackground = canvas.selectColor - ? { background: canvas.background } + ? { background: canvas.background || '#000000' } : { background: `url(${canvas.backgroundImage}) center center / cover no-repeat !important` }