diff --git a/src/pages/componentDevelopment/componentList/compReview.tsx b/src/pages/componentDevelopment/componentList/compReview.tsx index cbef0d8..10dc171 100644 --- a/src/pages/componentDevelopment/componentList/compReview.tsx +++ b/src/pages/componentDevelopment/componentList/compReview.tsx @@ -57,27 +57,29 @@ const CompReview = ({ componentDesignData }) => {
output
- {dataArray.map((data, index) => { - // 确保响应始终是数组格式 + {dataArray.every((data) => { const responses = Array.isArray(data.responses) ? data.responses : (data.responses ? [data.responses] : []); - - return ( -
- {responses.length > 0 ? ( - responses.map((response, responseIndex) => ( + return responses.length === 0; + }) ? ( +
+ 无输出参数 +
+ ) : ( + dataArray.map((data, index) => { + const responses = Array.isArray(data.responses) ? data.responses : + (data.responses ? [data.responses] : []); + return ( +
+ {responses.map((response, responseIndex) => (
{response.type} {response.ident}
- )) - ) : ( -
- 无输出参数 -
- )} -
- ); - })} + ))} +
+ ); + }) + )}