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 { // 如果是整数,则更新数据