Quellcode durchsuchen

季节性图表 chartTheme为空兼容

hbchen vor 4 Monaten
Ursprung
Commit
d68421682e

+ 1 - 1
src/views/dataEntry_manage/mixins/chartPublic.js

@@ -1099,7 +1099,7 @@ export const chartSetMixin = {
       /* 主题样式*/
       const chartTheme =  this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
       // 跟颜色对应
-      chartTheme.lineOptionList=chartTheme.lineOptionList.reverse().slice(-chartDataHandle.length)
+      chartTheme && (chartTheme.lineOptionList=chartTheme.lineOptionList.reverse().slice(-chartDataHandle.length))
       let seasonYdata = [],
         seasonData = [];
 

+ 1 - 1
src/views/ppt_manage/mixins/mixins.js

@@ -450,7 +450,7 @@ export default {
       temChartDataList
 
       // 跟颜色对应
-      chartTheme.lineOptionList=chartTheme.lineOptionList.reverse().slice(-chartDataHandle.length)
+      chartTheme && (chartTheme.lineOptionList=chartTheme.lineOptionList.reverse().slice(-chartDataHandle.length))
 
       let seasonYdata = [],
         seasonData = []