Quellcode durchsuchen

feat: 解决多频多台序号输入框无法出现的问题

332777428@qq.com vor 1 Monat
Ursprung
Commit
ff4691ee0f
2 geänderte Dateien mit 9 neuen und 14 gelöschten Zeilen
  1. 2 2
      src/views/operation/channel/detail.vue
  2. 7 12
      src/views/operation/channels/detail.vue

+ 2 - 2
src/views/operation/channel/detail.vue

@@ -129,11 +129,11 @@
               <el-input
                 v-else
                 v-model="scope.row.indexNum"
-                @input="handleInput"
                 size="mini"
                 style="width: 60px"
                 type="number"
                 @blur="onNumberBlur(scope.row, scope.$index)"
+                @input="handleInput"
                 @keyup.enter.native="onNumberBlurEnter(scope.row, scope.$index)"
                 placeholder="序号"
                 ref="numberInput"
@@ -233,7 +233,7 @@ export default {
       this.editData.currentEditSort = row.indexNum;
       this.$nextTick(() => {
         this.$refs.numberInput.focus();
-        // this.$refs.numberInput.select();
+        this.$refs.numberInput.select();
       });
     },
 

+ 7 - 12
src/views/operation/channels/detail.vue

@@ -120,17 +120,6 @@
                   @click.native="handleEditClick(scope.row, scope.$index)"
                 />
               </div>
-              <!-- 
-              <el-input
-                v-else
-                v-model="scope.row.indexNum"
-                type="number"
-                rows="12"
-                placeholder="序号"
-                @blur="onNumberBlur(scope.row, scope.$index)"
-                @keyup.enter.native="onNumberBlurEnter(scope.row, scope.$index)"
-              /> -->
-
 
               <el-input
                 v-else
@@ -139,6 +128,7 @@
                 style="width: 60px"
                 type="number"
                 @blur="onNumberBlur(scope.row, scope.$index)"
+                @input="handleInput"f s s s s
                 @keyup.enter.native="onNumberBlurEnter(scope.row, scope.$index)"
                 placeholder="序号"
                 ref="numberInput"
@@ -235,10 +225,15 @@ export default {
       this.editData.currentEditSort = row.indexNum;
       this.$nextTick(() => {
         this.$refs.numberInput.focus();
-        // this.$refs.numberInput.select();
+        this.$refs.numberInput.select();
       });
     },
 
+    handleInput(value) {
+      this.form.list[this.editData.currentEditIndex].indexNum = value;
+      this.form.list = this.form.list.filter((i) => i);
+    },
+
     onNumberBlurEnter(row, index) {
       this.editData.currentEditIndex = -1;
     },