首页 > 其他分享 >前端项目实战叁佰肆拾伍react-admin和material ui-stack和paper设置样式

前端项目实战叁佰肆拾伍react-admin和material ui-stack和paper设置样式

时间:2023-09-02 10:38:28浏览次数:37  
标签:item admin material stack react typeList paper 叁佰肆 any


<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>

运行结果

 

前端项目实战叁佰肆拾伍react-admin和material ui-stack和paper设置样式_react.js

标签:item,admin,material,stack,react,typeList,paper,叁佰肆,any
From: https://blog.51cto.com/u_15460007/7330753

相关文章