feat(component): 添加组件测试用例启动功能并优化组件列表界面

master
钟良源 2 weeks ago
parent 0e68a74e70
commit 526a2e48a6

@ -49,3 +49,8 @@ export function importTestCases(params: { componentBaseId: string, file: File })
}
});
}
// 开启测试用例
export function startTestCase(id) {
return axios.get(`${urlPrefix}/componentTestCase/connect`, { params: { id } });
}

@ -629,32 +629,32 @@ const GlobalVarContainer = () => {
</Space>
</div>
<div className={styles['comp-list-handle']}>
<Radio.Group
defaultValue={''}
name="button-radio-group"
value={componentStatus}
onChange={handleStatusChange}
style={{ marginRight: 30 }}
>
{[{ label: '全部', value: '' }, ...componentStatusDict].map((item) => {
return (
<Radio key={item.value} value={item.value}>
{({ checked }) => {
return (
<Button
tabIndex={-1}
key={item.value}
shape="round"
type={checked ? 'primary' : 'default'}
>
{item.label}
</Button>
);
}}
</Radio>
);
})}
</Radio.Group>
{/*<Radio.Group*/}
{/* defaultValue={''}*/}
{/* name="button-radio-group"*/}
{/* value={componentStatus}*/}
{/* onChange={handleStatusChange}*/}
{/* style={{ marginRight: 30 }}*/}
{/*>*/}
{/* {[{ label: '全部', value: '' }, ...componentStatusDict].map((item) => {*/}
{/* return (*/}
{/* <Radio key={item.value} value={item.value}>*/}
{/* {({ checked }) => {*/}
{/* return (*/}
{/* <Button*/}
{/* tabIndex={-1}*/}
{/* key={item.value}*/}
{/* shape="round"*/}
{/* type={checked ? 'primary' : 'default'}*/}
{/* >*/}
{/* {item.label}*/}
{/* </Button>*/}
{/* );*/}
{/* }}*/}
{/* </Radio>*/}
{/* );*/}
{/* })}*/}
{/*</Radio.Group>*/}
{selectedItem === '我的组件' && <Space split={<Divider type="vertical" />}>
{/*<Button type="secondary" status="success" style={{ borderRadius: 4 }}>生成组件</Button>*/}
<Button
@ -671,7 +671,6 @@ const GlobalVarContainer = () => {
</Button>
</Space>}
</div>
</div>
{/*数据列表*/}
<div className={styles['comp-list-list']}>

@ -40,12 +40,16 @@
justify-content: space-between;
margin-bottom: 15px;
flex-shrink: 0;
flex-direction: column;
.comp-list-title {
font-size: 18px;
font-weight: 700;
}
.comp-list-search {
margin-bottom: 20px;
}
.comp-list-handle {
}
}

Loading…
Cancel
Save