fix(frontend): fix build error

This commit is contained in:
LittleBoy 2025-07-22 20:01:41 +08:00
parent 8d9c454fcc
commit a388db74dd

View File

@ -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;