Browse Source

fix: 优化需求245

ldong 2 months ago
parent
commit
5b2cbef1b7
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/views/dataEntry_manage/components/barOptionSection.vue

+ 4 - 1
src/views/dataEntry_manage/components/barOptionSection.vue

@@ -150,7 +150,10 @@ export default {
   },
   },
   watch: {
   watch: {
     datedata(newval) {
     datedata(newval) {
-      this.dateList = newval.map((_,index) => ({
+      if(!newval){
+        newval=[]
+      }
+      this.dateList =newval.map((_,index) => ({
         ...this.dateList[index],
         ...this.dateList[index],
         Color: _.Color,
         Color: _.Color,
         RealDate: this.dateList[index].Type === 3 ? this.dateList[index].Date : _.Date,
         RealDate: this.dateList[index].Type === 3 ? this.dateList[index].Date : _.Date,