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

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

Loading…
Cancel
Save