qx
qx
2025-03-17 3d140ae64725f57f8d0be9f8182dfd6f9b3999fd
qx
1个文件已修改
7 ■■■■■ 已修改文件
src/views/doctor/check/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doctor/check/index.vue
@@ -288,7 +288,7 @@
                        @input="vale"></el-input> -->
                    <template slot-scope="{ row, $index }">
                      <el-input  type="textarea" autosize size="mini" v-model="row.proResult" :ref="`input-${$index}`"
                        @keyup.enter.native="keyInputConfirm($event, $index)" @focus="handleFocus(row)"
                        @keydown.enter.native="keyInputConfirm($event, $index)" @focus="handleFocus(row)"
                        @blur="handleInputConfirm(row)" @input="vale"></el-input>
                    </template>
                  </el-table-column>
@@ -428,7 +428,7 @@
                    <!-- slot-scope="scope" -->
                    <template slot-scope="{ row, $index }">
                      <el-input  type="textarea" autosize size="mini" v-model="row.proResult" :ref="`input-${$index}`"
                        @keyup.enter.native="keyInputConfirm($event, $index)" @focus="handleFocus(row)"
                      @keydown.enter.native="keyInputConfirm($event, $index)" @focus="handleFocus(row)"
                        @blur="handleInputConfirm(row)" @input="vale"></el-input>
                      <!-- <el-input type="textarea" autosize size="mini" v-model="scope.row.proResult" autocomplete="off"   :ref="`input-${scope.$index}-${scope.row.proResult}`"
@@ -1285,6 +1285,7 @@
    keyInputConfirm(event, currentRowIndex) {
      // 阻止默认回车行为,比如提交表单
      event.preventDefault();
     event.stopPropagation()
      const nextRowIndex = currentRowIndex + 1; // 计算下一行索引
      // 如果下一行存在,则聚焦该行的输入框
@@ -1296,7 +1297,7 @@
            // 处理 ref 可能为数组的情况(如动态渲染)
            const target = Array.isArray(nextInput) ? nextInput[0] : nextInput;
            target.focus(); // 聚焦输入框
            target.select(); // 可选:选中文本
            // target.select(); // 可选:选中文本
          }
        });
      }