From 984f04e4717aed612bd345aad5b6d04ce82904ba Mon Sep 17 00:00:00 2001 From: zzyuan <781948537@qq.com> Date: Tue, 25 Mar 2025 15:53:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E5=AD=97=E8=BE=93=E5=85=A5=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dish/dish/index.vue | 2 +- src/views/dish/material/components/MaterialDialog.vue | 1 - src/views/dish/nutritionInfo/index.vue | 2 +- src/views/superstore/shopMaterial/components/MaterialDialog.vue | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/views/dish/dish/index.vue b/src/views/dish/dish/index.vue index 475db255..eb9e307e 100644 --- a/src/views/dish/dish/index.vue +++ b/src/views/dish/dish/index.vue @@ -1098,7 +1098,7 @@ handleNumericInput(field, event) { - const value = event.target.value; + const value = event; // 只允许输入数字和小数点 let newValue = value.replace(/[^\d.]/g, ''); diff --git a/src/views/dish/material/components/MaterialDialog.vue b/src/views/dish/material/components/MaterialDialog.vue index 07573307..33cbf892 100644 --- a/src/views/dish/material/components/MaterialDialog.vue +++ b/src/views/dish/material/components/MaterialDialog.vue @@ -511,7 +511,6 @@ export default { handleNumericInput(field, event) { - console.log(event) // const value = event.target.value; const value = event; // 只允许输入数字和小数点 diff --git a/src/views/dish/nutritionInfo/index.vue b/src/views/dish/nutritionInfo/index.vue index 09bfb55d..040a8a57 100644 --- a/src/views/dish/nutritionInfo/index.vue +++ b/src/views/dish/nutritionInfo/index.vue @@ -736,7 +736,7 @@ export default { * @param {Event} event - 输入事件 */ handleNumericInput(field, event) { - const value = event.target.value; + const value = event; // 只允许输入数字和小数点 let newValue = value.replace(/[^\d.]/g, ''); diff --git a/src/views/superstore/shopMaterial/components/MaterialDialog.vue b/src/views/superstore/shopMaterial/components/MaterialDialog.vue index 240b90d8..6f4a18fe 100644 --- a/src/views/superstore/shopMaterial/components/MaterialDialog.vue +++ b/src/views/superstore/shopMaterial/components/MaterialDialog.vue @@ -398,7 +398,7 @@ export default { }, //数字输入 handleNumericInput(field, event) { - const value = event.target.value; + const value = event; // 只允许输入数字和小数点 let newValue = value.replace(/[^\d.]/g, '');