weirenchun il y a 2 ans
Parent
commit
2f0c7736ee
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 3 2
      src/views/project/componens/info6.vue

+ 3 - 2
src/views/project/componens/info6.vue

@@ -213,8 +213,9 @@ export default {
           return true
         }
       })
-      this.data.splice(index, 1)
-
+      if (index != -1) {
+        this.data.splice(index, 1)
+      }
       this.data.push(item)
       //重新计算合计
       this.allPlanInvestment = 0