-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
轮播组件开发,mock數據 key有錯 #24
Comments
另外, import React from 'react';
import Slider from '../../components/slider';
import RecommendList from '../../components/list';
function Recommend() {
// mock数据
const bannerList = [1,2,3,4].map(item => {
return { imageUrl: "http://p1.music.126.net/ZYLJ2oZn74yUz5x8NBGkVA==/109951164331219056.jpg" }
});
const recommendList = [1,2,3,4,5,6,7,8,9,10].map(item => {
return {
picUrl: "https://p1.music.126.net/fhmefjUfMD-8qtj3JKeHbA==/18999560928537533.jpg",
playCount: 17171122,
name: "朴树、许巍、李健、郑钧、老狼、赵雷"
}
});
return (
<div>
<Slider bannerList={bannerList}></Slider>
Recommend
</div>
)
}
export default React.memo(Recommend); 第23行 |
加油~挺喜歡這計畫的,對於正在學習 react的我幫助很大 |
谢谢你的反馈,已经全部更正。能够帮到你我也感到很开心 |
可以了 完全没想起来用这个属性 只想着怎么改before的样式了... |
大佬好,我有一个问题恳请回答。 在大佬第三章的 做到这里预览页面的时候推荐的图片都被压缩变形了,而调整回 谢谢大佬的教程啦! |
最后我只是说明一下,其实代码里面已经这些写了。decorate是绝对定位的啊,是img_wrapper下单独的一个元素,和img标签没有关系,可能是你动错了元素。 |
@sanyuan0704 谢谢大佬回复,我检查了一下自己的 |
https://sanyuan0704.github.io/react-cloud-music/chapter3/slider.html
src
應該改成imageUrl
The text was updated successfully, but these errors were encountered: