<Stack direction="row" style={{ margin: 0, padding: 0, display: "flex" }} spacing={{ xs: 1, sm: 2, md: 4 }}>
<Paper elevation={5} style={{margin:"4px 0 4px 12px"}} >
{typeList && typeList.map((item: any, index: any) => (
<ListM component="div">
<ListItem button style={typeId == item.id ? { background: '#ccc', height: "30px" } : { height: "30px" }} onClick={() => handleSelectType(item.id)}>
<ListItemText>{item.name}</ListItemText>
</ListItem>
</ListM>
))}
</Paper>
<Paper style={{flexGrow: "1", margin: "4px"}}>
<List hasCreate={true} filter={typeId ? { style_id: id, mat_id: typeId } : { style_id: id }} exporter={false} hasEdit={true} resource="t_base_style_materiel">
<MaterialTabChange typeId={typeId} value={value}></MaterialTabChange>
</List>
</Paper>
</Stack>
运行结果