From c713c05133f442b8a11bd9fdaf364a75575baffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AD=A3=E6=98=93?= Date: Wed, 11 Dec 2024 16:47:35 +0800 Subject: [PATCH] 1 --- .../touchScreen/components/scanInput.vue | 36 +- src/views/touchScreen/main/index.vue | 24 +- src/views/touchScreen/report/index.vue | 355 ++++++++++++------ src/vuetify-theme.json | 16 +- 4 files changed, 302 insertions(+), 129 deletions(-) diff --git a/src/views/touchScreen/components/scanInput.vue b/src/views/touchScreen/components/scanInput.vue index bd9306e..76de8ef 100644 --- a/src/views/touchScreen/components/scanInput.vue +++ b/src/views/touchScreen/components/scanInput.vue @@ -1,10 +1,19 @@ @@ -21,11 +30,17 @@ function autoInputFocus() { }) } } +// 回车确认提交 +const handleKeyPress = (event) => { + if (event.key === 'Enter') { + doInputChange(input.value); + } +}; // 失去焦点时,重新聚焦 function doInputBlur() { - setTimeout(() => { - autoInputFocus() - }, 500) + // setTimeout(() => { + // autoInputFocus() + // }, 500) } // 输入框变化时,重新聚焦 function doInputChange(value) { @@ -35,9 +50,9 @@ function doInputChange(value) { return } input.value = '' - setTimeout(() => { - autoInputFocus() - }, 500) + // setTimeout(() => { + // autoInputFocus() + // }, 500) proxy.$emit('scanInput', _value) } @@ -55,6 +70,7 @@ onUnmounted(() => { \ No newline at end of file diff --git a/src/vuetify-theme.json b/src/vuetify-theme.json index d8c6465..ed95088 100644 --- a/src/vuetify-theme.json +++ b/src/vuetify-theme.json @@ -2,15 +2,15 @@ "dark": false, "colors": { "background": "#3F51B5", - "surface": "#303F9F", - "surface-bright": "#3D5AFE", - "surface-light": "#5C6BC0", - "surface-variant": "#303F9F", + "surface": "#3949AB", + "surface-bright": "#9FA8DA", + "surface-light": "#7986CB", + "surface-variant": "#7986CB", "on-surface-variant": "#E8EAF6", - "primary": "#3F51B5", - "primary-darken-1": "#303F9F", - "secondary": "#E8EAF6", - "secondary-darken-1": "#B39DDB", + "primary": "#1E88E5", + "primary-darken-1": "#1565C0", + "secondary": "#9FA8DA", + "secondary-darken-1": "#7986CB", "error": "#D32F2F", "info": "#2196F3", "success": "#4CAF50",