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
# production
/dist
/vscode
# misc
.DS_Store
......
**/*.md
**/*.svg
\ No newline at end of file
**/*.svg
package.json
{
"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"
},
......
......@@ -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);
......
......@@ -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 {
</div>
<Table
loading={loading}
rowKey={record => record.key}
rowKey={rowKey || 'key'}
rowSelection={rowSelection}
dataSource={list}
columns={columns}
......
......@@ -59,6 +59,7 @@ const query = {
minWidth: 1200,
},
};
class BasicLayout extends React.PureComponent {
static childContextTypes = {
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