Explorar o código

fix: 修复因画布未默认设置背景色或背景图片导致预览时的混合状态未生效问题

tnt group %!s(int64=3) %!d(string=hai) anos
pai
achega
bd7d3fe23e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/views/preview/utils/style.ts

+ 1 - 1
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`
       }