diff --git a/src/pages/componentDevelopment/componentCoding/index.tsx b/src/pages/componentDevelopment/componentCoding/index.tsx index 2aa73b6..b618264 100644 --- a/src/pages/componentDevelopment/componentCoding/index.tsx +++ b/src/pages/componentDevelopment/componentCoding/index.tsx @@ -44,7 +44,7 @@ const ComponentCoding = () => { }, []); useEffect(() => { - getComponentInfo(); + componentCoding.id && getComponentInfo(); const uri = process.env.NEXT_PUBLIC_DEV_CODE_SERVER_HOST; const codeServerFolderPre = '/app/data'; diff --git a/src/pages/componentDevelopment/componentList/handleButtonGroup.tsx b/src/pages/componentDevelopment/componentList/handleButtonGroup.tsx index e9f9473..e8d17d3 100644 --- a/src/pages/componentDevelopment/componentList/handleButtonGroup.tsx +++ b/src/pages/componentDevelopment/componentList/handleButtonGroup.tsx @@ -41,7 +41,7 @@ const HandleButtonGroup: React.FC = ({ // 检查组件状态是否符合条件 const isEligible = (eligibleStatuses: string[], currentStatus: string) => { - return eligibleStatuses.includes(currentStatus); + return eligibleStatuses.includes(currentStatus.toLowerCase()); }; // 构建更多操作菜单 @@ -96,15 +96,17 @@ const HandleButtonGroup: React.FC = ({ return ( <> - {/* 发布组件/更新版本/查看审核 */} - {row.publicStatus !== publicStatus.REVIEW ? ( + {/* 发布组件/更新版本*/} + {row.publicStatus !== publicStatus.REVIEW && isEligible([componentStatusConstant.CODING, componentStatusConstant.DEPLOYED, componentStatusConstant.PUBLISHED], row.componentStatus) && ( - ) : ( + )} + + {(row.publicStatus === publicStatus.REVIEW || row.publicStatus === publicStatus.REJECTED) && ( )} - {/* 接口设计/查看接口 */} - {isEligible([componentStatusConstant.DESIGN, componentStatusConstant.DEFAULT], row.componentStatus) ? ( - - ) : null} - {/* 组件编码 */} {isEligible([componentStatusConstant.CODING], row.componentStatus) ? (