From 72c58083b2c959aed82383d8078e76e5b2109e32 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Fri, 18 Oct 2024 11:17:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mycomponents/qty/numbeIntegerrBox.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mycomponents/qty/numbeIntegerrBox.vue b/src/mycomponents/qty/numbeIntegerrBox.vue index d3b3ce1f..61c3fed0 100644 --- a/src/mycomponents/qty/numbeIntegerrBox.vue +++ b/src/mycomponents/qty/numbeIntegerrBox.vue @@ -78,7 +78,13 @@ var hint = event.detail.value; if (!Number.isInteger(hint)) { // 如果不是整数,则设置为上一个有效值 - this.inputValue = hint.toString().match(/^\d+/) + var temp = hint.toString().match(/^\d+/) + if(Array.isArray(temp)){ + this.inputValue =temp[0] + }else { + this.inputValue =temp + } + // this.inputValue = hint.toString().match(/^\d+/) || 0; } else { // 如果是整数,则更新数据