weirenchun hace 2 años
padre
commit
2f0c7736ee
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  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