世界上最伟大的投资就是投资自己的教育

全场限时 5 折

 2018-08-15

 2018-08-14

 2018-08-12

  • Messi-Q · 凡人
    Messi-Q · 凡人 在视频 React & Redux & React-Router & Node.js 实战 crud 项目 #1 项目搭建 回复了

    加载图片的 url,在乌班图系统中识别不了本地的图片地址

  • Messi-Q · 凡人
    Messi-Q · 凡人 在视频 React & Redux & React-Router & Node.js 实战 crud 项目 #6 连接数据库 MongoDB 回复了

    加载图片的 url,在乌班图系统中识别不了本地的图片地址

  • loungcingzeon · 金丹
    loungcingzeon · 金丹 在视频 React 基础实践篇免费视频教程 - 小型财务系统 #2 实现 records 列表页 回复了

    import React, { PureComponent } from 'react';

    import Record from './Record';

    class Records extends PureComponent{

     constructor(props){
         super(props);
         this.state = {
             records: [
                 {"id": 1, "date": "2018-01-09", "title": "收入", "amount": 20},
                 {"id": 2, "date": "2018-01-03", "title": "录视频收入", "amount": 199},
                 {"id": 2, "date": "2018-01-03", "title": "录视频收入", "amount": 199},
             ]
         }
     }
    
     render(){
         return (
             <div className="records">
                 <h2>Records</h2>
                 <table className="table table-borderd">
                     <thead>
                         <tr>
                             <th>Date</th>
                             <th>Title</th>
                             <th>Amount</th>
                         </tr>
                     </thead>
                     <tbody>
                        <Record recordData={this.state.records}/>
                     </tbody>
                 </table>
             </div>
         );
     }
    

    }

    export default Records;

    import React, { PureComponent } from 'react';
    import PropTypes from 'prop-types';

    class Record extends PureComponent{
    static propTypes = {
    recordData: PropTypes.array.isRequired,
    }

    render(){
        const { recordData=[] } = this.props;
        console.log(recordData);
        return (
            recordData && recordData.map((item, index) => {
                return <tr key={index}>
                            <td>{item.date}</td>
                            <td>{item.title}</td>
                            <td>{item.amount}</td>
                        </tr>
            })
        );
    }
    

    }

    export default Record;

 2018-08-11

  • loungcingzeon · 金丹
    loungcingzeon · 金丹 在视频 诱人的 React 免费视频教程 - 基础篇 #13 双向数据绑定 回复了

    value={this.state.initialName} 大佬,应该是不是应该如下,这样设置好一点呢。我看你 初始值也没有,

    this.state = {

    initialName:'',
    }

    onHandleChange = (event) => {
    this.setState({
    homeLink: event.target.value,
    initialName: event.target.value,
    })

        console.log(event.target.value);
    }
    

    {this.state.initialName}

    this.onHandleChange(event)} /> Change Header Link

 2018-08-10

 2018-08-09

 2018-08-08

 2018-08-05

 2018-08-03

 2018-08-02

 2018-08-01

© 汕尾市求知科技有限公司 | Rails365 Gitlab | Qiuzhi99 Gitlab | 知乎 | b 站 | 搜索

粤公网安备 44152102000088号粤公网安备 44152102000088号 | 粤ICP备19038915号

Top