PrinceLee 5 rokov pred
rodič
commit
2ab049c92b

+ 5 - 2
src/views/projectManage/bugList/details/filterList.vue

@@ -21,7 +21,7 @@
                 v-focus="focusState"
                 autofocus
                 placeholder="请输入过滤器名称"
-                @keyup.enter.native="updateFilter(scope.row,true)"
+                @keyup.enter="updateFilter(scope.row,true)"
                 @blur="updateFilter(scope.row)"
               >
               <i class="el-icon-edit" @click.stop="cancel(scope.row)" />
@@ -94,7 +94,8 @@ export default {
       curIndex: 1,
       pageSize: 5,
       showEdit: false,
-      filterName: '' // 当前修改的过滤器名称
+      filterName: '', // 当前修改的过滤器名称
+      isControl: NaN
     }
   },
   watch: {
@@ -125,6 +126,7 @@ export default {
       }
     },
     editFilter(e) {
+      this.isControl = e.index
       this.focusState = true
       this.$set(this.filterList[e.index], 'showEdit', true)
     },
@@ -144,6 +146,7 @@ export default {
       this.getFilterList()
     },
     async updateFilter(e, keyup = null) {
+      if (this.isControl !== e.index) { return false }
       if (keyup) {
         this.$set(this.filterList[e.index], 'showEdit', false)
         return false