zhouteng 6 năm trước cách đây
mục cha
commit
b27b4f17f1
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/views/form/advancedForm/AdvancedForm.vue

+ 1 - 1
src/views/form/advancedForm/AdvancedForm.vue

@@ -141,7 +141,7 @@ export default {
     newMember () {
       const length = this.data.length
       this.data.push({
-        key: (parseInt(this.data[length - 1].key) + 1).toString(),
+        key: length === 0 ? '1' : (parseInt(this.data[length - 1].key) + 1).toString(),
         name: '',
         workId: '',
         department: '',