diff --git a/.gitignore b/.gitignore index aa3fce5825a412febff24ef3bf577105b08862ec..fd9bf875668fb3b3a8d6df470ce665a4ad130bd1 100755 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ _roadhog-api-doc # production /dist +/vscode # misc .DS_Store diff --git a/.prettierignore b/.prettierignore index a28adee000e27af29301242eb0b0d5a9e55f3611..5ac589ef742af4f9060cc098282e84ba24f6bc8e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,3 @@ **/*.md -**/*.svg \ No newline at end of file +**/*.svg +package.json diff --git a/package.json b/package.json index 94012aabe5ece49a474a3f3224139c5920257b73..bb588a2757eeec812922719ab95f6c9356fe87c6 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ant-design-pro", - "version": "1.2.0", + "version": "1.2.1", "description": "An out-of-box UI solution for enterprise applications", "private": true, "scripts": { @@ -84,7 +84,10 @@ "puppeteer": "^1.1.1" }, "lint-staged": { - "**/*.{js,jsx,less}": ["prettier --wirter", "git add"], + "**/*.{js,jsx,less}": [ + "prettier --wirter", + "git add" + ], "**/*.{js,jsx}": "lint-staged:js", "**/*.less": "stylelint --syntax less" }, diff --git a/src/components/GlobalHeader/index.js b/src/components/GlobalHeader/index.js index a1a4b47f3476642364e0dd1a64a088835a9c3e6e..92591214db625065578e3c7077b9a960ef89b01b 100644 --- a/src/components/GlobalHeader/index.js +++ b/src/components/GlobalHeader/index.js @@ -9,13 +9,14 @@ export default class GlobalHeader extends PureComponent { componentWillUnmount() { this.triggerResizeEvent.cancel(); } + /* eslint-disable*/ @Debounce(600) - triggerResizeEvent = () => { + triggerResizeEvent() { // eslint-disable-line const event = document.createEvent('HTMLEvents'); event.initEvent('resize', true, false); window.dispatchEvent(event); - }; + } toggle = () => { const { collapsed, onCollapse } = this.props; onCollapse(!collapsed); diff --git a/src/components/StandardTable/index.js b/src/components/StandardTable/index.js index 95198e4c915f7452ee3aa04efcefa67e14322ca9..281d60e6b2f771609ec250f768191b5dbbf749f7 100644 --- a/src/components/StandardTable/index.js +++ b/src/components/StandardTable/index.js @@ -63,7 +63,7 @@ class StandardTable extends PureComponent { render() { const { selectedRowKeys, needTotalList } = this.state; - const { data: { list, pagination }, loading, columns } = this.props; + const { data: { list, pagination }, loading, columns, rowKey } = this.props; const paginationProps = { showSizeChanger: true, @@ -105,7 +105,7 @@ class StandardTable extends PureComponent { record.key} + rowKey={rowKey || 'key'} rowSelection={rowSelection} dataSource={list} columns={columns} diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index 9713b700ca2ed6784915ac0b699872c3b2e4e47c..3e472658a10e85751ca7171e48814860000cca9c 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -59,6 +59,7 @@ const query = { minWidth: 1200, }, }; + class BasicLayout extends React.PureComponent { static childContextTypes = { location: PropTypes.object,