Explorar o código

优化应用全局主题逻辑

pipipi-pikachu %!s(int64=5) %!d(string=hai) anos
pai
achega
2393630318
Modificáronse 1 ficheiros con 6 adicións e 4 borrados
  1. 6 4
      src/views/Editor/Toolbar/SlideStylePanel.vue

+ 6 - 4
src/views/Editor/Toolbar/SlideStylePanel.vue

@@ -279,10 +279,12 @@ export default defineComponent({
       const { themeColor, backgroundColor, fontColor } = theme.value
 
       for(const slide of newSlides) {
-        slide.background = {
-          ...slide.background,
-          type: 'solid',
-          color: backgroundColor
+        if(!slide.background || slide.background.type !== 'image') {
+          slide.background = {
+            ...slide.background,
+            type: 'solid',
+            color: backgroundColor
+          }
         }
 
         const elements = slide.elements