style={{width:`${this.props.progress}%`}} 這里的引號是反引號 在鍵盤上 1 的左邊那個 es6 字符串組合用的 很是巧妙 大家別弄錯了
2017-12-28
推薦https://ke.qq.com/course/227111這個react關(guān)于環(huán)境搭建步驟,很好
2017-12-28
我學(xué)這個簡單的小思路啊,就是看你著重學(xué)什么,很明顯老師沒有把配置這一塊詳細講,自己配置真的太頭疼,我就直接把老師github上的這個項目全部下載下來,老師講哪一塊,我就找到那個文件,把代碼全部打上注釋,這就相當(dāng)于下邊是正確答案,自己上邊打草稿,因為我著重想學(xué)下react組件這一塊,那對于配置就聽聽跳過,不糾結(jié)
2017-12-27
點擊歌曲進度條,播放狀態(tài)顯示play
progressChangeHandler(progress) {
$('#player').jPlayer('play', duration * progress);
this.setState({
isPlay: true,
});
},
progressChangeHandler(progress) {
$('#player').jPlayer('play', duration * progress);
this.setState({
isPlay: true,
});
},
2017-12-25
如果用es6class創(chuàng)建組件不要用getInitialState React在ES6的實現(xiàn)中去掉了getInitialState……
Class App extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
...
}
Class App extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
...
}
2017-12-22
createClass已經(jīng)廢棄了 用createComponent或者es6 class 唉技術(shù)更新太快里面好多過時了 坑有點多
2017-12-22
每個章節(jié)的代碼已上傳
https://github.com/xzylogic/workspaces.git
最重要的一步:選擇我的分支 xzy_reactMusic_? 來查看不同小節(jié)課程的代碼,commit里看介紹
然后點擊進入React,再點擊進入react-music-player,里面就是不同章節(jié)代碼
https://github.com/xzylogic/workspaces.git
最重要的一步:選擇我的分支 xzy_reactMusic_? 來查看不同小節(jié)課程的代碼,commit里看介紹
然后點擊進入React,再點擊進入react-music-player,里面就是不同章節(jié)代碼
2017-12-20