This commit is contained in:
2025-11-13 11:04:40 +08:00
parent e55a52f20b
commit 2982d53800
8 changed files with 45 additions and 31 deletions

View File

@@ -632,11 +632,11 @@ async function handleSubmit() {
for (const param of selectedMethod.value.params) {
const value = dynamicParams.value[param.name];
if (param.type === 'String' && (!value || value.trim() === '')) {
if (param.required && param.type === 'String' && (!value || value.trim() === '')) {
ElMessage.warning(`请输入${param.description}`);
return;
}
if (param.type === 'Integer' && (value === undefined || value === null || value === '')) {
if (param.required && param.type === 'Integer' && (value === undefined || value === null || value === '')) {
ElMessage.warning(`请输入${param.description}`);
return;
}