From 0ca2baa44a8c10374bb6ca166e536967ff0fde9e Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Thu, 7 Nov 2024 15:13:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/IpAddress/index.vue | 23 +++++++-------- frontend/src/components/TimeControl/index.vue | 2 +- .../machine/device/components/devicePopup.vue | 28 +++++++++++++------ frontend/src/views/machine/device/index.vue | 20 +++++++++++-- 4 files changed, 50 insertions(+), 23 deletions(-) diff --git a/frontend/src/components/IpAddress/index.vue b/frontend/src/components/IpAddress/index.vue index 44d13bd..d2ecf7c 100644 --- a/frontend/src/components/IpAddress/index.vue +++ b/frontend/src/components/IpAddress/index.vue @@ -55,7 +55,7 @@ }) // 证明在开始阶段 if (input.selectionStart == 0) { - console.log('鼠标设置了,', index) + //console.log('鼠标设置了,', index) markFlag.value[index].left = true } else { markFlag.value[index].left = false @@ -111,7 +111,7 @@ // 检查ip输入 const checkIpVal = (item: any) => { let val = item.value; - console.log(val, '===========') + //console.log(val, '===========') // 处理非数字 val = val.toString().replace(/[^0-9]/g, ""); val = parseInt(val, 10); @@ -130,7 +130,7 @@ } } item.value = val; - console.log(item.value, '=========') + //console.log(item.value, '=========') } // 判断光标左右移动位置 @@ -170,19 +170,19 @@ markFlag.value[index].right = false } } else if (e.keyCode === 8) { - console.log('删除键把当前数据删除完毕后会跳转到前一个input') + //console.log('删除键把当前数据删除完毕后会跳转到前一个input') // 删除键把当前数据删除完毕后会跳转到前一个input,左一不做任何处理 if (index !== 0 && e.currentTarget.selectionStart === 0) { if (markFlag.value[index].left) { ipInputRefs.value[index - 1].focus(); markFlag.value[index].left = false } else { - console.log('左键设置了删除,', index) + //console.log('左键设置了删除,', index) markFlag.value[index].left = true } } } else if (e.keyCode === 13 || e.keyCode === 32) { - console.log('回车键、空格键、冒号均向右跳转,右一不做任何措施') + //console.log('回车键、空格键、冒号均向右跳转,右一不做任何措施') // 回车键、空格键、冒号均向右跳转,右一不做任何措施 if (index !== 3) { ipInputRefs.value[index + 1].focus(); @@ -190,7 +190,7 @@ } else if (e.keyCode === 110 || e.keyCode === 190) { // 点 . 向右跳转,右一不做任何措施 - console.log('点击') + // console.log('点击') if (item.value == '') { return } @@ -199,10 +199,11 @@ } } else if (item.value.toString().length === 3) { - console.log('满3位,光标自动向下一个文本框') + //console.log('满3位,光标自动向下一个文本框') // 满3位,光标自动向下一个文本框. if (index !== 3) { - ipInputRefs.value[index + 1].setSelectionRange(0, 0) + //ipInputRefs.value[index + 1].setSelectionRange(0, 0) + ipInputRefs.value[index + 1].focus(); } } } @@ -220,7 +221,7 @@ } else { if (direction == 'toRight') { // 可以直接跳回 - console.log('右键focus,', index) + //console.log('右键focus,', index) markFlag.value[index].left = true // 设置光标为左边第一个 ipInputRefs.value[index].setSelectionRange(0, 0) @@ -251,7 +252,7 @@ // 监听数据变化,并初始化显示四个数据 watch(() => props.value, () => { - console.log('变化了~', props.value); + //console.log('变化了~', props.value); if(flag.value){ }else{ diff --git a/frontend/src/components/TimeControl/index.vue b/frontend/src/components/TimeControl/index.vue index 275caec..8a4f812 100644 --- a/frontend/src/components/TimeControl/index.vue +++ b/frontend/src/components/TimeControl/index.vue @@ -109,7 +109,7 @@ const timeUnits = ref( // 发出日期变化事件 const emitDateChange = () => { emit('update-dates', formatDate(startDate.value), formatDate(endDate.value)) - console.log('emitDateChange', startDate.value, endDate.value) + //console.log('emitDateChange', startDate.value, endDate.value) } // 在组件挂载时更新日期范围 diff --git a/frontend/src/views/machine/device/components/devicePopup.vue b/frontend/src/views/machine/device/components/devicePopup.vue index 1ef1c2a..9a60cfa 100644 --- a/frontend/src/views/machine/device/components/devicePopup.vue +++ b/frontend/src/views/machine/device/components/devicePopup.vue @@ -94,7 +94,7 @@ - + @@ -150,7 +150,7 @@ \ No newline at end of file