Commit 8fe4c6f1 authored by ddcat1115's avatar ddcat1115

Merge remote-tracking branch 'origin/master' into v2

parents 6ef237e5 a982dedf
...@@ -8,6 +8,7 @@ _roadhog-api-doc ...@@ -8,6 +8,7 @@ _roadhog-api-doc
# production # production
/dist /dist
/vscode
# misc # misc
.DS_Store .DS_Store
......
**/*.md **/*.md
**/*.svg **/*.svg
package.json
{ {
"name": "ant-design-pro", "name": "ant-design-pro",
"version": "1.2.0", "version": "1.2.1",
"description": "An out-of-box UI solution for enterprise applications", "description": "An out-of-box UI solution for enterprise applications",
"private": true, "private": true,
"scripts": { "scripts": {
...@@ -84,7 +84,10 @@ ...@@ -84,7 +84,10 @@
"puppeteer": "^1.1.1" "puppeteer": "^1.1.1"
}, },
"lint-staged": { "lint-staged": {
"**/*.{js,jsx,less}": ["prettier --wirter", "git add"], "**/*.{js,jsx,less}": [
"prettier --wirter",
"git add"
],
"**/*.{js,jsx}": "lint-staged:js", "**/*.{js,jsx}": "lint-staged:js",
"**/*.less": "stylelint --syntax less" "**/*.less": "stylelint --syntax less"
}, },
......
...@@ -9,13 +9,14 @@ export default class GlobalHeader extends PureComponent { ...@@ -9,13 +9,14 @@ export default class GlobalHeader extends PureComponent {
componentWillUnmount() { componentWillUnmount() {
this.triggerResizeEvent.cancel(); this.triggerResizeEvent.cancel();
} }
/* eslint-disable*/
@Debounce(600) @Debounce(600)
triggerResizeEvent = () => { triggerResizeEvent() {
// eslint-disable-line // eslint-disable-line
const event = document.createEvent('HTMLEvents'); const event = document.createEvent('HTMLEvents');
event.initEvent('resize', true, false); event.initEvent('resize', true, false);
window.dispatchEvent(event); window.dispatchEvent(event);
}; }
toggle = () => { toggle = () => {
const { collapsed, onCollapse } = this.props; const { collapsed, onCollapse } = this.props;
onCollapse(!collapsed); onCollapse(!collapsed);
......
...@@ -63,7 +63,7 @@ class StandardTable extends PureComponent { ...@@ -63,7 +63,7 @@ class StandardTable extends PureComponent {
render() { render() {
const { selectedRowKeys, needTotalList } = this.state; const { selectedRowKeys, needTotalList } = this.state;
const { data: { list, pagination }, loading, columns } = this.props; const { data: { list, pagination }, loading, columns, rowKey } = this.props;
const paginationProps = { const paginationProps = {
showSizeChanger: true, showSizeChanger: true,
...@@ -105,7 +105,7 @@ class StandardTable extends PureComponent { ...@@ -105,7 +105,7 @@ class StandardTable extends PureComponent {
</div> </div>
<Table <Table
loading={loading} loading={loading}
rowKey={record => record.key} rowKey={rowKey || 'key'}
rowSelection={rowSelection} rowSelection={rowSelection}
dataSource={list} dataSource={list}
columns={columns} columns={columns}
......
...@@ -59,6 +59,7 @@ const query = { ...@@ -59,6 +59,7 @@ const query = {
minWidth: 1200, minWidth: 1200,
}, },
}; };
class BasicLayout extends React.PureComponent { class BasicLayout extends React.PureComponent {
static childContextTypes = { static childContextTypes = {
location: PropTypes.object, location: PropTypes.object,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment