From f56e73ca9cab240ff04a01c89d7c48beef1734ed Mon Sep 17 00:00:00 2001
From: maochaoying <925670706@qq.com>
Date: Mon, 4 Sep 2023 18:26:16 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E9=99=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/LiquidHandle.vue | 38 ++++++++++++++++++++++++++++++++------
src/components/Operator.vue | 8 +++++++-
2 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/src/components/LiquidHandle.vue b/src/components/LiquidHandle.vue
index ea05e54..3b7a1d8 100644
--- a/src/components/LiquidHandle.vue
+++ b/src/components/LiquidHandle.vue
@@ -79,10 +79,10 @@
@@ -151,7 +151,8 @@
@@ -187,15 +188,24 @@ const props = defineProps({
},
})
-const addLiquidVal = ref(2000)
+const addLiquidVal = ref('2000')
const tipModalVisible = ref(false)
const webSocketStore = useWebSocketStore()
const isPopLiquidStatus = ref(false)
+const formatter = value => {
+ if (parseInt(value) > 5000) {
+ return '5000'
+ }
+ if (parseInt(value) <= 0) {
+ return '0'
+ }
+ return value.replace(/^0+/gi, '')
+}
+
const startAdd = () => {
if (!(operatorStore.replenishingFluidsWorkState == 1)) {
- console.log(startReplenishingFluidsJSON(parseInt(addLiquidVal.value)))
webSocketStore.sendCommandMsg(
startReplenishingFluidsJSON(parseInt(addLiquidVal.value)),
)
@@ -227,6 +237,22 @@ const hideTabLiquid = () => {
const deviceStore = useDeviceStore()
const { disinfectantCapacity } = storeToRefs(deviceStore)
+
+const isFirstClick = ref(true)
+
+const handleInput = value => {
+ if (isFirstClick.value) {
+ setTimeout(() => {
+ addLiquidVal.value = value + ''
+ })
+ isFirstClick.value = false
+ }
+}
+
+const handleClickInput = () => {
+ isFirstClick.value = true
+ numberKeyboardShow.value = true
+}