Forráskód Böngészése

feat: 对定制频道和多频多台enter键处理

332777428@qq.com 1 hónapja
szülő
commit
280187c6d5
1 módosított fájl, 9 hozzáadás és 2 törlés
  1. 9 2
      src/views/operation/channels/index.vue

+ 9 - 2
src/views/operation/channels/index.vue

@@ -39,6 +39,7 @@
               @click.native="handleEditClick(scope.row, scope.$index)"
             />
           </div>
+
           <el-input
             v-else
             v-model="scope.row.indexNum"
@@ -46,7 +47,7 @@
             style="width: 60px"
             type="number"
             @blur="onNumberBlur(scope.row, scope.$index)"
-            @keyup.enter.native="onNumberBlur(scope.row, scope.$index)"
+            @keyup.enter.native="onNumberBlurEnter(scope.row, scope.$index)"
             placeholder="序号"
             ref="numberInput"
           />
@@ -312,6 +313,7 @@
 <script>
 import {
   change,
+  channeledit,
   channels,
   classEdit,
   classRemove,
@@ -436,6 +438,10 @@ export default {
       });
     },
 
+    onNumberBlurEnter(row, index) {
+      this.editData.currentEditIndex = -1;
+    },
+
     // 输入框失去焦点时隐藏
     onNumberBlur(row, index) {
       var newSort = row.indexNum;
@@ -467,7 +473,8 @@ export default {
       }
       this.editData.currentEditIndex = -1;
 
-      // channeledit(this.dialogForm).then((res) => {
+      // channeledit(this.tableData).then((res) => {
+      //   console.log("编辑成功:", JSON.stringify(res));
       //   if (res.code === 0) {
       //     this.$message.success("编辑成功!");
       //     this.getList();