这个示例“图像头像” https://material-ui.com/demos/avatars/来自material-ui v3.2.0网站,但不知何故我在实现时看不到图像。
为什么我在
material -ui-v3.2.0“图像头像”示例中看不到图像?
在示例中'icon avatars','Letter avatars'我可以看到图像。我使用create-react-app 'react-scripts': '^2.0.4', but also tried on 'react-scripts': '^1.1.5'但没有任何效果。
PFB 代码如下:
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { withStyles } from '@material-ui/core/styles';
import Avatar from '@material-ui/core/Avatar';
const styles = {
row: {
display: 'flex',
justifyContent: 'center',
},
avatar: {
margin: 10,
},
bigAvatar: {
width: 60,
height: 60,
},
};
function ImageAvatars(props) {
const { …Run Code Online (Sandbox Code Playgroud)