This commit is contained in:
2026-01-22 15:52:11 +08:00
parent 5d91d408dd
commit bd49e05911
2 changed files with 8 additions and 3 deletions

View File

@@ -31,8 +31,9 @@ const fileSuffix = ref('');
watch(
() => props.modelValue,
(val: any) => {
fileName.value = val.split('.')[0];
fileSuffix.value = val.split('.')[1];
const lastDotIndex = val.lastIndexOf('.');
fileName.value = val.slice(0, lastDotIndex);
fileSuffix.value = val.slice(lastDotIndex + 1);
},
{
immediate: true,

View File

@@ -84,7 +84,11 @@ watch(
setValidateFun(formConfigData.value);
setTimeout(() => {
nextTick(() => {
formRef.value?.resetFields();
formConfigData.value.forEach((item: any) => {
if (item.inForm && item.validate) {
formRef.value?.clearValidate(item.key);
}
});
});
}, 0);
}