[英]Why do I have an error when I try a multiple import of icons in mui icons?
I saw on the forum that there is a way to do a multiple import of Material UI icons, so I tried to go from this:我在论坛上看到有一种方法可以多次导入 Material UI 图标,所以我尝试从这里导入 go:
import InterestsRoundedIcon from "@mui/icons-material/InterestsRounded";
import AccountCircleRoundedIcon from "@mui/icons-material/AccountCircleRounded";
import SettingsRoundedIcon from "@mui/icons-material/SettingsRounded";
to this对此
import { InterestsRoundedIcon, AccountCircleRoundedIcon, SettingsRoundedIcon } from "@mui/icons-material";
but when I try to launch my start my code I got this issue但是当我尝试启动我的代码时,我遇到了这个问题
Compiled with problems: ERROR in./src/components/sidebar/Sidebar.jsx 44:42-62 export 'InterestsRoundedIcon' (imported as 'InterestsRoundedIcon') was not found in >'@mui/icons-material'编译有问题:错误 in./src/components/sidebar/Sidebar.jsx 44:42-62 export 'InterestsRoundedIcon' (imported as 'InterestsRoundedIcon') was not found in >'@mui/icons-material'
and I got those problems if i try to import either from "@mui/icons-material" or "@material-ui/icons"如果我尝试从“@mui/icons-material”或“@material-ui/icons”导入,我会遇到这些问题
Try this:尝试这个:
import {
InterestsRounded as InterestsRoundedIcon,
AccountCircleRounded as AccountCircleRoundedIcon,
SettingsRounded as SettingsRoundedIcon,
} from "@mui/icons-material";
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.