Browse Source

fix: 处理预览背景图展示问题

奔跑的面条 3 years ago
parent
commit
3eb3527226
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/views/preview/utils/style.ts

+ 1 - 1
src/views/preview/utils/style.ts

@@ -28,7 +28,7 @@ export const getEditCanvasConfigStyle = (canvas: EditCanvasConfigType) => {
   const computedBackground = canvas.selectColor
     ? { background: canvas.background }
     : {
-        background: `url(${canvas.backgroundImage}) no-repeat center/100% !important`
+        background: `url(${canvas.backgroundImage}) center center / cover no-repeat !important`
       }
   return {
     position: 'relative' as const,