Browse Source

优化应用全局主题逻辑

pipipi-pikachu 5 năm trước cách đây
mục cha
commit
2393630318
1 tập tin đã thay đổi với 6 bổ sung4 xóa
  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