自荐react-native Table组件 react-native-easy-table



  • 推荐个自己写的Table组件,使用简单,直观,支持点击行列头来高亮对应行列功能,支持自定义table cell组件。

    安装:
    npm install --save react-native-easy-table

    使例:

    import Table, { SimpleCell } from 'react-native-easy-table'
    
    <Table rowTitle={['A','B','C','D','E']}
                 columnTitle={['a','b','c','d','e']}
                 rowComponent={{com:SimpleCell, style:{height:30}}}
                 columnComponent={{com:SimpleCell}}
                 crossComponent={{com:SimpleCell}}
                 crossData={'X'}
                 cellData={[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}
                 cellComponent={{com:SimpleCell, style:[{height:30}]}}
                 highlightAndColor={{color:'red'}}
                 crossHighlight
                 style={[styles.topBorder, styles.bottomBorder]}
            />
    

    alt text

    Github地址:
    https://github.com/pandafeeder/react-native-easy-table

    求任何意见与建议,谢谢


登录后回复