我一直在使用bootstrap,我发现material ui也是一个很好的框架,并决定也开始学习如何使用它。在进入 MUI 组件时我陷入了困境。我想知道如何在不自定义的情况下使用默认的 MUI 组件。例如,我想复制card component并将其输出到浏览器上。
例如,其中一份文档的代码是:
import * as React from 'react';
import Card from '@mui/material/Card';
import CardContent from '@mui/material/CardContent';
import CardMedia from '@mui/material/CardMedia';
import Typography from '@mui/material/Typography';
import { Button, CardActionArea, CardActions } from '@mui/material';
export default function MultiActionAreaCard() {
return (
<Card sx={{ maxWidth: 345 }}>
<CardActionArea>
<CardMedia
component="img"
height="140"
image="/static/images/cards/contemplative-reptile.jpg"
alt="green iguana"
/>
<CardContent>
<Typography gutterBottom variant="h5" component="div">
Lizard
</Typography>
<Typography variant="body2" color="text.secondary">
Lizards are a widespread group of squamate reptiles, with over …Run Code Online (Sandbox Code Playgroud) 由于我来自 Windows 背景,因此尝试部署到 aws EC2 ubuntu 服务器对我来说非常困难。我在尝试将 django 应用程序绑定到 Gunicorn 时遇到错误。我正在运行的命令是sudo gunicorn --bind 0.0.0.0:8000 logistics.wsgi:application错误日志如下所示:
(venv) ubuntu@ip-172-31-18-196:/var/www/html$ sudo gunicorn --bind 0.0.0.0:8000 logistics.wsgi:application
[2021-09-08 11:21:00 +0000] [29379] [INFO] Starting gunicorn 20.1.0
[2021-09-08 11:21:00 +0000] [29379] [INFO] Listening at: http://0.0.0.0:8000 (29379)
[2021-09-08 11:21:00 +0000] [29379] [INFO] Using worker: sync
[2021-09-08 11:21:00 +0000] [29382] [INFO] Booting worker with pid: 29382
[2021-09-08 11:21:00 +0000] [29382] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/gunicorn/arbiter.py", line 589, in spawn_worker
worker.init_process() …Run Code Online (Sandbox Code Playgroud) amazon-ec2 ×1
django ×1
gunicorn ×1
javascript ×1
material-ui ×1
python-3.x ×1
reactjs ×1
ubuntu ×1