Feature7.jsx 828 Bytes
Newer Older
bert committed
1 2 3 4 5
// 纯数据展现情况列表
import React from 'react';
import { Upload, Icon } from 'antd';
import baidubce from 'bce-sdk-js';

bert committed
6
import BDUploader from '../components/BDUploader';
bert committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

const Feature7 = React.createClass({
    getInitialState: function() {
        return {
            img_url:''
        };
    },

    render: function() {
        const self = this;
        return  <div>
                    <h3 className="f-title">{this.props.title}</h3>
                    <input type="text" value={this.state.img_url} />
                    <img src={this.state.img_url} />
                    <BDUploader success={this.uploadSuccess} />
                </div>;
    },

    uploadSuccess: function(url){
        console.log(url)
        this.setState({
            img_url: url
        })
    }
});

export default Feature7;