帮助了 AmazingCounters.com 位小伙伴

react 组件创建

/**
 * 数据屏蔽
 * Created by 2016-12-02.
 */
import React, {Component} from 'react';

export default class DataMaskingMain extends Component {
    render() {
        return (
            <div>
                开发中……
            </div>
        )
    }
}

 

//定义一个组件
renderData = (history, xyml, columns, dataSource) => { if (!history.id || !xyml.itemId) { return <div style={{textAlign: 'center',marginTop: 30}}>暂无数据</div>; } else return ( <Table bordered size="small" columns={columns} dataSource={dataSource} pagination={false}/> ) }; //================= render() { return ( <div> <div className="block-box-header"> <div className="block-box-body">
          //调用组件
{this.renderData(history, xyml, columns, dataSource)} </div> </div> </div> ); }

 

posted on 2017-02-21 16:30  云的旋律  阅读(146)  评论(0编辑  收藏  举报

导航

前端攻城狮分享群