react引入图片October 30, 2022方式一:先导入再使用import logo from './images/logo.png'const Example = () => { return <img src={logo} alt="" /> }方式二:直接请求使用const Example = () => { return <img src={<img src={require('./images/logo.png')} alt="" />} alt="" /> }