Browse Source

成本测算新增

duy 2 years ago
parent
commit
73ee21606a
1 changed files with 6 additions and 5 deletions
  1. 6 5
      src/views/project/cost/form.vue

+ 6 - 5
src/views/project/cost/form.vue

@@ -116,7 +116,7 @@
                         <el-input v-model="row.key15" />
                     </template> 
                     <template #action="{ row, index }">
-                        <el-button size="small" type="primary" @click="addRow">
+                        <el-button size="small" type="primary" @click="addRow(row, index)">
                             <HcIcon name="add" />
                             <span>新增</span>
                         </el-button>
@@ -394,10 +394,11 @@ const tableColumn = [
 
 
 
-const addRow = ()=>{
-    tableData.value.push({
-        isEdit:true,
-    })
+const addRow = (row, index)=>{
+    // tableData.value.push({
+    //     isEdit:true,
+    // })
+    tableData.value.splice(index + 1, 0, { isEdit:true })
 }
 const delRow = (index)=>{
     tableData.value.splice(index, 1)