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' }, { required: true, message: '请输入指标Key' },
{ validator: async (_,value:string)=>{ { validator: async (_,value:string)=>{
if(!value || /^[A-Za-z][A-Za-z0-9_]*$/.test(value)){ if(!value || /^[A-Za-z][A-Za-z0-9_]*$/.test(value)){
return true return
} }
throw new Error('指标Key只能包含字母、数字和下划线,且必须以字母开头') throw new Error('指标Key只能包含字母、数字和下划线,且必须以字母开头')
}} }}
@ -148,12 +148,12 @@ function handleSave() {
// status: undefined, // status: undefined,
// }; // };
runAsync({ runAsync({
id:saveData.value.id, id:saveData.value!.id,
product_id: saveData.value.product_id, product_id: saveData.value?.product_id,
key: saveData.value.key, key: saveData.value?.key,
name: saveData.value.name, name: saveData.value?.name,
placeholder: saveData.value.placeholder, placeholder: saveData.value?.placeholder,
unit: saveData.value.unit, unit: saveData.value?.unit,
}).then(() => { }).then(() => {
refresh() refresh()
saveData.value = undefined; saveData.value = undefined;