From ec6569a8ab16b799f2d0d9a5cd31822705e3c471 Mon Sep 17 00:00:00 2001 From: ZLY Date: Mon, 15 Dec 2025 15:36:46 +0800 Subject: [PATCH] =?UTF-8?q?feat(component-env):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=8A=B6=E6=80=81=E5=B1=95=E7=A4=BA=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增测试状态列,显示未测试、测试通过、测试失败三种状态 - 更新环境配置按钮的显示条件,需测试通过才可点击 - 优化按钮loading状态的初始化代码结构 --- .../componentEnv/index.tsx | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/src/pages/componentDevelopment/componentEnv/index.tsx b/src/pages/componentDevelopment/componentEnv/index.tsx index 8dc1bf6..e07d339 100644 --- a/src/pages/componentDevelopment/componentEnv/index.tsx +++ b/src/pages/componentDevelopment/componentEnv/index.tsx @@ -33,7 +33,10 @@ const ComponentEnv = () => { const [selectedArch, setSelectedArch] = useState(null); // 选中的架构类型 const [searchText, setSearchText] = useState(''); // 搜索文本 const [addItem, setAddItem] = useState(null); // 点击环境配置按钮时记录当前信息 - const [loadingActions, setLoadingActions] = useState<{ id: number | null; action: string | null }>({ id: null, action: null }); // 按钮loading状态 + const [loadingActions, setLoadingActions] = useState<{ id: number | null; action: string | null }>({ + id: null, + action: null + }); // 按钮loading状态 const columns: TableColumnProps[] = [ { @@ -87,13 +90,36 @@ const ComponentEnv = () => { ) }, + { + title: '测试状态', + dataIndex: 'available', + render: (_, record: any) => ( +
+ {record.available == '0' && ( + + 未测试 + + )} + {record.available == '1' && ( + + 测试通过 + + )} + {record.available == '-1' && ( + + 测试失败 + + )} +
+ ) + }, { title: '操作', width: 230, align: 'center', render: (_, record: any) => ( - {record.isEnable === 'NOT_EXIST' && ( + {record.isEnable === 'NOT_EXIST' && record.available == '1' && (