diff --git a/.eslintrc.js b/.eslintrc.js index 93b5d49312..76b261a1f0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -61,6 +61,7 @@ if (process.env.RUN_ENV === 'DEMO') { 'no-console': 0, 'no-plusplus': 0, 'eol-last': 0, + 'no-script-url': 0, 'prefer-rest-params': 0, 'react/no-multi-comp': 0, 'react/prefer-stateless-function': 0, diff --git a/components/table/__tests__/__snapshots__/demo.test.js.snap b/components/table/__tests__/__snapshots__/demo.test.js.snap index de27ffcbd7..221ce8f1e6 100644 --- a/components/table/__tests__/__snapshots__/demo.test.js.snap +++ b/components/table/__tests__/__snapshots__/demo.test.js.snap @@ -175,7 +175,7 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = ` style="padding-left:0px" /> John Brown @@ -195,7 +195,7 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = ` > Action 一 John Brown @@ -203,7 +203,7 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = ` class="ant-divider ant-divider-vertical" /> Delete @@ -212,7 +212,7 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = ` /> More actions Jim Green @@ -253,7 +253,7 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = ` > Action 一 Jim Green @@ -261,7 +261,7 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = ` class="ant-divider ant-divider-vertical" /> Delete @@ -270,7 +270,7 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = ` /> More actions Joe Black @@ -311,7 +311,7 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = ` > Action 一 Joe Black @@ -319,7 +319,7 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = ` class="ant-divider ant-divider-vertical" /> Delete @@ -328,7 +328,7 @@ exports[`renders ./components/table/demo/basic.md correctly 1`] = ` /> More actions John Brown @@ -480,7 +480,7 @@ exports[`renders ./components/table/demo/bordered.md correctly 1`] = ` style="padding-left:0px" /> Jim Green @@ -507,7 +507,7 @@ exports[`renders ./components/table/demo/bordered.md correctly 1`] = ` style="padding-left:0px" /> Joe Black @@ -648,7 +648,7 @@ exports[`renders ./components/table/demo/colspan-rowspan.md correctly 1`] = ` style="padding-left:0px" /> John Brown @@ -685,7 +685,7 @@ exports[`renders ./components/table/demo/colspan-rowspan.md correctly 1`] = ` style="padding-left:0px" /> Jim Green @@ -722,7 +722,7 @@ exports[`renders ./components/table/demo/colspan-rowspan.md correctly 1`] = ` style="padding-left:0px" /> Joe Black @@ -760,7 +760,7 @@ exports[`renders ./components/table/demo/colspan-rowspan.md correctly 1`] = ` style="padding-left:0px" /> Jim Red @@ -793,7 +793,7 @@ exports[`renders ./components/table/demo/colspan-rowspan.md correctly 1`] = ` style="padding-left:0px" /> Jake White @@ -1835,7 +1835,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` class="" > John Brown @@ -1855,7 +1855,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` > Action 一 John Brown @@ -1863,7 +1863,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` class="ant-divider ant-divider-vertical" /> Delete @@ -1872,7 +1872,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` /> More actions John Brown @@ -1937,7 +1937,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` > Action 一 John Brown @@ -1945,7 +1945,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` class="ant-divider ant-divider-vertical" /> Delete @@ -1954,7 +1954,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` /> More actions John Brown @@ -2019,7 +2019,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` > Action 一 John Brown @@ -2027,7 +2027,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` class="ant-divider ant-divider-vertical" /> Delete @@ -2036,7 +2036,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` /> More actions John Brown @@ -2101,7 +2101,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` > Action 一 John Brown @@ -2109,7 +2109,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` class="ant-divider ant-divider-vertical" /> Delete @@ -2118,7 +2118,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` /> More actions John Brown @@ -2183,7 +2183,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` > Action 一 John Brown @@ -2191,7 +2191,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` class="ant-divider ant-divider-vertical" /> Delete @@ -2200,7 +2200,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` /> More actions John Brown @@ -2265,7 +2265,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` > Action 一 John Brown @@ -2273,7 +2273,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` class="ant-divider ant-divider-vertical" /> Delete @@ -2282,7 +2282,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` /> More actions John Brown @@ -2347,7 +2347,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` > Action 一 John Brown @@ -2355,7 +2355,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` class="ant-divider ant-divider-vertical" /> Delete @@ -2364,7 +2364,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` /> More actions John Brown @@ -2429,7 +2429,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` > Action 一 John Brown @@ -2437,7 +2437,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` class="ant-divider ant-divider-vertical" /> Delete @@ -2446,7 +2446,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` /> More actions John Brown @@ -2511,7 +2511,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` > Action 一 John Brown @@ -2519,7 +2519,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` class="ant-divider ant-divider-vertical" /> Delete @@ -2528,7 +2528,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` /> More actions John Brown @@ -2593,7 +2593,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` > Action 一 John Brown @@ -2601,7 +2601,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` class="ant-divider ant-divider-vertical" /> Delete @@ -2610,7 +2610,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` /> More actions Delete @@ -2824,7 +2824,7 @@ exports[`renders ./components/table/demo/edit-cell.md correctly 1`] = ` class="" > Delete @@ -3543,7 +3543,7 @@ exports[`renders ./components/table/demo/expand.md correctly 1`] = ` class="" > Delete @@ -3578,7 +3578,7 @@ exports[`renders ./components/table/demo/expand.md correctly 1`] = ` class="" > Delete @@ -3613,7 +3613,7 @@ exports[`renders ./components/table/demo/expand.md correctly 1`] = ` class="" > Delete @@ -4077,7 +4077,7 @@ exports[`renders ./components/table/demo/fixed-columns.md correctly 1`] = ` class="" > action @@ -4144,7 +4144,7 @@ exports[`renders ./components/table/demo/fixed-columns.md correctly 1`] = ` class="" > action @@ -4280,7 +4280,7 @@ exports[`renders ./components/table/demo/fixed-columns.md correctly 1`] = ` class="" > action @@ -4293,7 +4293,7 @@ exports[`renders ./components/table/demo/fixed-columns.md correctly 1`] = ` class="" > action @@ -4592,7 +4592,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -4659,7 +4659,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -4726,7 +4726,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -4793,7 +4793,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -4860,7 +4860,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -4927,7 +4927,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -4994,7 +4994,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -5061,7 +5061,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -5128,7 +5128,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -5195,7 +5195,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -5506,7 +5506,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -5519,7 +5519,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -5532,7 +5532,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -5545,7 +5545,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -5558,7 +5558,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -5571,7 +5571,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -5584,7 +5584,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -5597,7 +5597,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -5610,7 +5610,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -5623,7 +5623,7 @@ exports[`renders ./components/table/demo/fixed-columns-header.md correctly 1`] = class="" > action @@ -8513,7 +8513,7 @@ exports[`renders ./components/table/demo/jsx.md correctly 1`] = ` > Action 一 @@ -8521,7 +8521,7 @@ exports[`renders ./components/table/demo/jsx.md correctly 1`] = ` class="ant-divider ant-divider-vertical" /> Delete @@ -8530,7 +8530,7 @@ exports[`renders ./components/table/demo/jsx.md correctly 1`] = ` /> More actions Action 一 @@ -8580,7 +8580,7 @@ exports[`renders ./components/table/demo/jsx.md correctly 1`] = ` class="ant-divider ant-divider-vertical" /> Delete @@ -8589,7 +8589,7 @@ exports[`renders ./components/table/demo/jsx.md correctly 1`] = ` /> More actions Action 一 @@ -8639,7 +8639,7 @@ exports[`renders ./components/table/demo/jsx.md correctly 1`] = ` class="ant-divider ant-divider-vertical" /> Delete @@ -8648,7 +8648,7 @@ exports[`renders ./components/table/demo/jsx.md correctly 1`] = ` /> More actions Publish @@ -8891,7 +8891,7 @@ exports[`renders ./components/table/demo/nested-table.md correctly 1`] = ` class="" > Publish @@ -8941,7 +8941,7 @@ exports[`renders ./components/table/demo/nested-table.md correctly 1`] = ` class="" > Publish @@ -9394,7 +9394,7 @@ exports[`renders ./components/table/demo/row-selection.md correctly 1`] = ` style="padding-left:0px" /> John Brown @@ -9443,7 +9443,7 @@ exports[`renders ./components/table/demo/row-selection.md correctly 1`] = ` style="padding-left:0px" /> Jim Green @@ -9492,7 +9492,7 @@ exports[`renders ./components/table/demo/row-selection.md correctly 1`] = ` style="padding-left:0px" /> Joe Black @@ -9542,7 +9542,7 @@ exports[`renders ./components/table/demo/row-selection.md correctly 1`] = ` style="padding-left:0px" /> Disabled User diff --git a/components/table/demo/basic.md b/components/table/demo/basic.md index 148cad63ea..96b4d7cb58 100644 --- a/components/table/demo/basic.md +++ b/components/table/demo/basic.md @@ -20,7 +20,7 @@ const columns = [{ title: 'Name', dataIndex: 'name', key: 'name', - render: text => {text}, + render: text => {text}, }, { title: 'Age', dataIndex: 'age', @@ -34,11 +34,11 @@ const columns = [{ key: 'action', render: (text, record) => ( - Action 一 {record.name} + Action 一 {record.name} - Delete + Delete - + More actions diff --git a/components/table/demo/bordered.md b/components/table/demo/bordered.md index 751ae242b5..7aac4c2eb8 100644 --- a/components/table/demo/bordered.md +++ b/components/table/demo/bordered.md @@ -19,7 +19,7 @@ import { Table } from 'antd'; const columns = [{ title: 'Name', dataIndex: 'name', - render: text => {text}, + render: text => {text}, }, { title: 'Cash Assets', className: 'column-money', diff --git a/components/table/demo/colspan-rowspan.md b/components/table/demo/colspan-rowspan.md index 8d1d81826a..f290d14cd8 100644 --- a/components/table/demo/colspan-rowspan.md +++ b/components/table/demo/colspan-rowspan.md @@ -38,10 +38,10 @@ const columns = [{ dataIndex: 'name', render: (text, row, index) => { if (index < 4) { - return {text}; + return {text}; } return { - children: {text}, + children: {text}, props: { colSpan: 5, }, diff --git a/components/table/demo/dynamic-settings.md b/components/table/demo/dynamic-settings.md index 5e173abd50..a0393c5c0d 100644 --- a/components/table/demo/dynamic-settings.md +++ b/components/table/demo/dynamic-settings.md @@ -22,7 +22,7 @@ const columns = [{ dataIndex: 'name', key: 'name', width: 150, - render: text => {text}, + render: text => {text}, }, { title: 'Age', dataIndex: 'age', @@ -38,11 +38,11 @@ const columns = [{ width: 360, render: (text, record) => ( - Action 一 {record.name} + Action 一 {record.name} - Delete + Delete - + More actions diff --git a/components/table/demo/edit-cell.md b/components/table/demo/edit-cell.md index fa1870e190..90559b3dc4 100644 --- a/components/table/demo/edit-cell.md +++ b/components/table/demo/edit-cell.md @@ -94,7 +94,7 @@ class EditableTable extends React.Component { this.state.dataSource.length > 1 ? ( this.onDelete(record.key)}> - Delete + Delete ) : null ); diff --git a/components/table/demo/expand.md b/components/table/demo/expand.md index 02ffde89a9..f73ad8e9d6 100644 --- a/components/table/demo/expand.md +++ b/components/table/demo/expand.md @@ -20,7 +20,7 @@ const columns = [ { title: 'Name', dataIndex: 'name', key: 'name' }, { title: 'Age', dataIndex: 'age', key: 'age' }, { title: 'Address', dataIndex: 'address', key: 'address' }, - { title: 'Action', dataIndex: '', key: 'x', render: () => Delete }, + { title: 'Action', dataIndex: '', key: 'x', render: () => Delete }, ]; const data = [ diff --git a/components/table/demo/fixed-columns-header.md b/components/table/demo/fixed-columns-header.md index 6a07c14971..ae4e0ad5e1 100644 --- a/components/table/demo/fixed-columns-header.md +++ b/components/table/demo/fixed-columns-header.md @@ -40,7 +40,7 @@ const columns = [ key: 'operation', fixed: 'right', width: 100, - render: () => action, + render: () => action, }, ]; diff --git a/components/table/demo/fixed-columns.md b/components/table/demo/fixed-columns.md index 1663d87bc4..ffa113d218 100644 --- a/components/table/demo/fixed-columns.md +++ b/components/table/demo/fixed-columns.md @@ -40,7 +40,7 @@ const columns = [ key: 'operation', fixed: 'right', width: 100, - render: () => action, + render: () => action, }, ]; diff --git a/components/table/demo/jsx.md b/components/table/demo/jsx.md index ce4cdb142f..a6d0739157 100644 --- a/components/table/demo/jsx.md +++ b/components/table/demo/jsx.md @@ -71,11 +71,11 @@ ReactDOM.render( key="action" render={(text, record) => ( - Action 一 {record.name} + Action 一 {record.name} - Delete + Delete - + More actions diff --git a/components/table/demo/nested-table.md b/components/table/demo/nested-table.md index cf3b15bb21..6d678c8968 100644 --- a/components/table/demo/nested-table.md +++ b/components/table/demo/nested-table.md @@ -41,10 +41,10 @@ function NestedTable() { key: 'operation', render: () => ( - Pause - Stop + Pause + Stop - + More @@ -78,7 +78,7 @@ function NestedTable() { { title: 'Upgraded', dataIndex: 'upgradeNum', key: 'upgradeNum' }, { title: 'Creator', dataIndex: 'creator', key: 'creator' }, { title: 'Date', dataIndex: 'createdAt', key: 'createdAt' }, - { title: 'Action', key: 'operation', render: () => Publish }, + { title: 'Action', key: 'operation', render: () => Publish }, ]; const data = []; diff --git a/components/table/demo/row-selection.md b/components/table/demo/row-selection.md index e300fa9756..7a384f6be4 100644 --- a/components/table/demo/row-selection.md +++ b/components/table/demo/row-selection.md @@ -23,7 +23,7 @@ import { Table } from 'antd'; const columns = [{ title: 'Name', dataIndex: 'name', - render: text => {text}, + render: text => {text}, }, { title: 'Age', dataIndex: 'age',