Browse Source

折线图区域填充透明度未应用bug

zhuth 6 years ago
parent
commit
5392476348

+ 3 - 3
kanban-client/app/component/converter.js

@@ -599,15 +599,15 @@ function getLineSeries(fontSize, series, lineconfig, colors, themeColor) {
 
             if(gradient == 'null') {
                 cfg = {
-                    opacity: opacity,
                     normal: {
+                        opacity: opacity,
                         color: color
                     }
                 }
             }else if(gradient == 'horizontal') {
                 cfg = {
-                    opacity: opacity,
                     normal: {
+                        opacity: opacity,
                         color: {
                             type: 'linear',
                             x: 0,
@@ -625,8 +625,8 @@ function getLineSeries(fontSize, series, lineconfig, colors, themeColor) {
                 }
             }else if(gradient == 'vertical') {
                 cfg = {
-                    opacity: opacity,
                     normal: {
+                        opacity: opacity,
                         color: {
                             type: 'linear',
                             x: 1,

+ 11 - 4
kanban-client/app/component/theme/applyTheme.js

@@ -48,9 +48,11 @@ function applyTitle(theme) {
     let title = document.getElementsByClassName('rc-title')[0];
     let styles = theme.title;
     
-    if(title) {
+    if(title && title.offsetHeight > 0) {
         for(let styleKey in styles) {
-            title.style[styleKey] = styles[styleKey];
+            if(!title.style[styleKey]) {
+                title.style[styleKey] = styles[styleKey];
+            }
         }
     }
 }
@@ -61,7 +63,9 @@ function applyLayout(theme) {
 
     if(layout) {
         for(let styleKey in styles) {
-            layout.style[styleKey] = styles[styleKey];
+            if(!layout.style[styleKey]) {
+                layout.style[styleKey] = styles[styleKey];
+            }
         }
     }
 }
@@ -78,13 +82,16 @@ function applyItems(theme) {
             let item = items[i];
     
             for(let styleKey in styles) {
-                item.style[styleKey] = styles[styleKey];
+                if(!item.style[styleKey]) {
+                    item.style[styleKey] = styles[styleKey];
+                }
             }
         }
     }
 }
 
 function applyTable(theme) {
+    // table有换屏逻辑,这里不能处理
     return;
 }