From 9f80b1e8e7fa000f9dd0f7f96bf6f868a2a55e35 Mon Sep 17 00:00:00 2001 From: "3075067877@qq.com" <3075067877@qq.com> Date: Mon, 29 Jan 2024 14:44:32 +0800 Subject: [PATCH] clean keyboard --- .../src/components/index/keyboard/input_box_QR.vue | 32 ++++------------------ .../components/index/keyboard/view_keyboard.vue | 12 +------- 2 files changed, 7 insertions(+), 37 deletions(-) diff --git a/uniapp_project_code/src/components/index/keyboard/input_box_QR.vue b/uniapp_project_code/src/components/index/keyboard/input_box_QR.vue index 325b5e2..5b9542e 100644 --- a/uniapp_project_code/src/components/index/keyboard/input_box_QR.vue +++ b/uniapp_project_code/src/components/index/keyboard/input_box_QR.vue @@ -24,7 +24,6 @@ import util from "@/utils/util.js" import viewKeyboard from "@/components/index/keyboard/view_keyboard.vue"; - import { onMounted, ref @@ -58,12 +57,6 @@ inputValue.value = i } - const getNumBtnClass = (i) => { - if (i == 11) { - return "num-btn-last-child" - } - return "num-btn" - } // getInputClass const getInputClass = () => { if (inputValue.value == "") { @@ -76,25 +69,6 @@ if (i == 10) return "0" if (i == 11) return "" //delete } - //click keyboard - const clickKeyboard = util.debounce((i) => { - console.log("clickKeyboard:", i) - // add input react - activeValue.value = i - setTimeout(() => { - activeValue.value = "" - }, 100) - - if (i == 11) { //handle delete input - inputValue.value = inputValue.value.substring(0, inputValue.value.length - 1) - } else { - //limit maxInput - if (inputValue.value.length >= props.maxInput) { - return util.showNone(`最大输入${props.maxInput}位`) - } - inputValue.value += getNumClick(i) - } - }, 20, true)