Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-table

Package Overview
Dependencies
Maintainers
2
Versions
440
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-table - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

.editorconfig

4

index.js

@@ -1,3 +0,1 @@

var table = require('./lib/Table');
module.exports = table;
module.exports = require('./lib/Table');

@@ -6,8 +6,7 @@ /** @jsx React.DOM */

//表格列
var TableColumn = React.createClass({
render: function () {
class TableColumn extends React.Component {
render() {
return (<th width={this.props.width}>{this.props.title}</th>);
}
});
}

@@ -17,5 +16,4 @@ /**

*/
var TableRow = React.createClass({
render: function () {
class TableRow extends React.Component {
render() {
var self = this,

@@ -30,4 +28,4 @@ columns = self.props.columns,

text = record[col.dataIndex];
if (renderer){
text = renderer(text,record,index);
if (renderer) {
text = renderer(text, record, index);
}

@@ -38,7 +36,6 @@ cells.push(<td>{text}</td>);

}
});
}
var Table = React.createClass({
_getColumns: function () {
class Table extends React.Component {
_getColumns() {
var self = this,

@@ -52,4 +49,5 @@ columns = self.props.columns,

return rst;
},
_getRows: function () {
}
_getRows() {
var self = this,

@@ -66,10 +64,14 @@ data = self.props.data,

},
render: function () {
}
render() {
var self = this,
columns = self._getColumns(),
rows = self._getRows();
var className = 'rc-table';
if (this.props.className) {
className += ' ' + this.props.className;
}
return (
<table className={this.props.className}>
<table className={className}>
<thead>

@@ -86,4 +88,4 @@ <tr>

}
});
}
module.exports = Table;
module.exports = Table;
{
"name": "rc-table",
"version": "1.0.1",
"description": "",
"keywords": ["react","table","rc-table"],
"homepage": "https://github.com/react-component/table",
"author": "dxq613@gmail.com",
"version": "2.0.0",
"description": "table ui component for react",
"keywords": [
"react",
"react-table"
],
"homepage": "http://github.com/react-component/table",
"maintainers": [
"dxq613@gmail.com",
"yiminghe@gmail.com"
],
"repository": {
"type": "git",
"url": "https://github.com/react-component/table.git"
"url": "git@github.com:react-component/table.git"
},
"bugs": {
"url": "https://github.com/react-component/table/issues"
"url": "http://github.com/react-component/table/issues"
},
"licenses": "MIT",
"spm": {},
"config":{
"port":8000
"spm": {
"dependencies": {
"react": "*"
}
},
"config": {
"port": 8000
},
"scripts": {
"start": "node --harmony server",
"publish": "gulp tag",
"lint": "gulp lint",
"build": "rc-tools run build",
"less": "rc-tools run less",
"gh-pages": "rc-tools run gh-pages",
"history": "rc-tools run history",
"start": "node --harmony node_modules/.bin/rc-server",
"publish": "rc-tools run tag && spm publish",
"lint": "rc-tools run lint",
"test": "",
"browser-test": "mocha-phantomjs http://localhost:$npm_package_config_port/tests/runner.html",
"browser-test-cover": "mocha-phantomjs -R node_modules/node-jscover/lib/reporters/mocha/console http://localhost:$npm_package_config_port/tests/runner.html?coverage"
"saucelabs": "rc-tools run saucelabs",
"browser-test": "rc-tools run browser-test",
"browser-test-cover": "rc-tools run browser-test-cover"
},
"devDependencies": {
"es5-shim": "~4.0.5",
"expect.js": "~0.3.1",
"gh-changelog": "^1.0.5",
"gulp": "^3.8.7",
"gulp-jscs": "^1.1.0",
"gulp-jshint": "^1.8.4",
"gulp-jsx": "~0.6.0",
"gulp-util": "^3.0.1",
"jquery": "~1.11.1",
"jshint": "^2.5.5",
"jshint-stylish": "^0.4.0",
"koa": "~0.13.0",
"koa-body": "^0.4.0",
"koa-jsx": "^1.1.3",
"koa-modularize": "^2.0.0",
"koa-mount": "~1.3.0",
"koa-node-jscover": "^1.0.0",
"koa-serve-index": "~1.0.1",
"koa-static": "~1.4.7",
"mocha": "~2.0.1",
"modulex": "~1.7.0",
"modulex-npm": "^2.0.0",
"node-jscover": "^0.6.8",
"node-jscover-coveralls": "^1.0.13",
"jquery": "^1.11.2",
"precommit-hook": "^1.0.7",
"react": "~0.12.1",
"react-tools": "~0.12.1",
"simulate-dom-event": "^1.0.1"
"rc-server": "^2.0.0",
"rc-tools": "2.x",
"react": "~0.13.0"
},
"precommit": [
"lint"
],
"browserify-shim": {
"react": "global:React",
"jquery": "global:jQuery"
},
"browserify": {
"transform": [
[
"browserify-jsx"
],
[
"browserify-shim"
]
]
},
"dependencies": {
"browserify-shim": "^3.8.0",
"browserify-jsx": "^0.1.0"
}
"lint",
"less"
]
}

@@ -29,2 +29,16 @@ # rc-table

## Development
```
npm install
npm start
```
## Example
http://localhost:8000/examples/
online example: http://react-component.github.io/table/build/examples/
## Usage

@@ -35,19 +49,17 @@

var columns = [
{title : 'header 1',dataIndex :'a', width:100},
{id: '123',title : 'header 2',dataIndex :'b', width:100},
{title : 'header 3',dataIndex : 'c',width:200},
{title : 'operate',dataIndex : '',renderer :function (value,obj) {
return <a href="#">edit</a>
}}
];
var columns = [
{title : 'header 1',dataIndex :'a', width:100},
{id: '123',title : 'header 2',dataIndex :'b', width:100},
{title : 'header 3',dataIndex : 'c',width:200},
{title : 'operate',dataIndex : '',renderer :function (value,obj) {
return <a href="#">edit</a>
}}
];
var data = [{a:'123'},{a:'cdd',b:'edd'},{a:'1333',c:'eee',d:2}];
var data = [{a:'123'},{a:'cdd',b:'edd'},{a:'1333',c:'eee',d:2}];
var table = React.renderComponent(
<Table columns={columns} data={data} className="table"/>,
document.getElementById('t1')
);
// use table
React.renderComponent(
<Table columns={columns} data={data} className="table"/>,
document.getElementById('t1')
);
```

@@ -72,9 +84,2 @@ ## API

## Development
```
npm install
npm start
```
## Test Case

@@ -86,9 +91,6 @@

http://localhost:8000/node_modules/node-jscover/lib/front-end/jscoverage.html?w=http://localhost:8004/tests/runner.html?coverage
http://localhost:8000/node_modules/rc-server/node_modules/node-jscover/lib/front-end/jscoverage.html?w=http://localhost:8000/tests/runner.html?coverage
## License
rc-table is released under the MIT license.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc