From a388db74dd67a274b85b26b2c8ebc95e505c75dc Mon Sep 17 00:00:00 2001 From: callmeyan Date: Tue, 22 Jul 2025 20:01:41 +0800 Subject: [PATCH] fix(frontend): fix build error --- src/pages/product/input/index.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/product/input/index.vue b/src/pages/product/input/index.vue index 6de858a..4b06114 100644 --- a/src/pages/product/input/index.vue +++ b/src/pages/product/input/index.vue @@ -61,7 +61,7 @@ { required: true, message: '请输入指标Key' }, { validator: async (_,value:string)=>{ if(!value || /^[A-Za-z][A-Za-z0-9_]*$/.test(value)){ - return true + return } throw new Error('指标Key只能包含字母、数字和下划线,且必须以字母开头') }} @@ -148,12 +148,12 @@ function handleSave() { // status: undefined, // }; runAsync({ - id:saveData.value.id, - product_id: saveData.value.product_id, - key: saveData.value.key, - name: saveData.value.name, - placeholder: saveData.value.placeholder, - unit: saveData.value.unit, + id:saveData.value!.id, + product_id: saveData.value?.product_id, + key: saveData.value?.key, + name: saveData.value?.name, + placeholder: saveData.value?.placeholder, + unit: saveData.value?.unit, }).then(() => { refresh() saveData.value = undefined;