From 5b51c0fbc5e39a2303e32059c1ecc86d04b88d72 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期四, 23 五月 2024 10:21:26 +0800 Subject: [PATCH] 完善键盘切换功能 --- src/views/quality/rawMaterial/rawMaterial-form.vue | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/views/quality/rawMaterial/rawMaterial-form.vue b/src/views/quality/rawMaterial/rawMaterial-form.vue index a9ed951..7de2c9a 100644 --- a/src/views/quality/rawMaterial/rawMaterial-form.vue +++ b/src/views/quality/rawMaterial/rawMaterial-form.vue @@ -205,15 +205,16 @@ <el-tooltip :disabled="scope.row.deviceId != null" class="item" effect="dark" content="璇峰厛閫夋嫨璁惧锛�" placement="top-start"> <el-autocomplete clearable cache="false" - ref="testValueInput" @blur="checkTestValues(scope.row,'blur',$event)" @select="checkTestValues(scope.row,'select',$event)" :disabled="scope.row.deviceId == null || (dataForm.id!=null&&(resultVal!=null && resultVal!=''))" v-model="scope.row.testValueList[index]" :fetch-suggestions="querySearch" placeholder="璇疯緭鍏ユ垨閫夋嫨妫�娴嬪��" + :ref="`detectionValue${index}`+scope.$index" :id="`detectionValue${index}`+scope.$index" - @keyup.native="moveFocus($event, scope.$index, `detectionValue${index}`)"> + @keyup.native="moveFocus($event, scope.$index, `detectionValue${index}`)" + popper-class="no-keyboard-events"> <template slot-scope="{ item }"> <div>{{ item.value }}</div> </template> @@ -1095,6 +1096,9 @@ return } document.getElementById(key + index).blur() + if(key.includes('detectionValue')){ + this.$refs[key + index][0].activated = false; + } let i = 0; while (true){ let dom = document.getElementById(key + (index - 1-i)) @@ -1116,6 +1120,9 @@ return } document.getElementById(key + index).blur() + if(key.includes('detectionValue')){ + this.$refs[key + index][0].activated = false; + } this.$nextTick(() => { let i = 0; while (true){ @@ -1184,6 +1191,10 @@ </script> <style> +.no-keyboard-events * { + pointer-events: none; + /* 鍏朵粬闇�瑕佺殑鏍峰紡 */ +} .rawMaterial-detail { width: 100%; height: 530px; -- Gitblit v1.9.3