Commit 2e0efbb0 authored by afc163's avatar afc163

update dependencies and fix lint and test case

parent e2b1261c
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
"selector-list-comma-newline-after": null, "selector-list-comma-newline-after": null,
"selector-pseudo-element-colon-notation": null, "selector-pseudo-element-colon-notation": null,
"unit-no-unknown": null, "unit-no-unknown": null,
"no-descending-specificity": null,
"value-list-max-empty-lines": null "value-list-max-empty-lines": null
} }
} }
...@@ -26,13 +26,11 @@ ...@@ -26,13 +26,11 @@
"bizcharts": "^3.1.0-beta.4", "bizcharts": "^3.1.0-beta.4",
"bizcharts-plugin-slider": "^2.0.1", "bizcharts-plugin-slider": "^2.0.1",
"classnames": "^2.2.5", "classnames": "^2.2.5",
"core-js": "^2.5.1",
"dva": "^2.1.0", "dva": "^2.1.0",
"enquire-js": "^0.1.1", "enquire-js": "^0.1.1",
"fastclick": "^1.0.6", "fastclick": "^1.0.6",
"lodash": "^4.17.4", "lodash": "^4.17.4",
"lodash-decorators": "^4.4.1", "lodash-decorators": "^4.4.1",
"lodash.clonedeep": "^4.5.0",
"moment": "^2.19.1", "moment": "^2.19.1",
"numeral": "^2.0.6", "numeral": "^2.0.6",
"prop-types": "^15.5.10", "prop-types": "^15.5.10",
...@@ -46,8 +44,8 @@ ...@@ -46,8 +44,8 @@
}, },
"devDependencies": { "devDependencies": {
"babel-eslint": "^8.0.1", "babel-eslint": "^8.0.1",
"babel-jest": "^21.0.0", "babel-jest": "^22.0.4",
"babel-plugin-dva-hmr": "^0.3.2", "babel-plugin-dva-hmr": "^0.4.0",
"babel-plugin-import": "^1.2.1", "babel-plugin-import": "^1.2.1",
"babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4", "babel-plugin-transform-decorators-legacy": "^1.3.4",
...@@ -68,8 +66,9 @@ ...@@ -68,8 +66,9 @@
"eslint-plugin-react": "^7.0.1", "eslint-plugin-react": "^7.0.1",
"gh-pages": "^1.0.0", "gh-pages": "^1.0.0",
"husky": "^0.14.3", "husky": "^0.14.3",
"jest": "^21.0.1", "jest": "^22.0.4",
"lint-staged": "^4.3.0", "jsdom": "^11.5.1",
"lint-staged": "^6.0.0",
"mockjs": "^1.0.1-beta3", "mockjs": "^1.0.1-beta3",
"prettier": "^1.9.0", "prettier": "^1.9.0",
"pro-download": "^1.0.0", "pro-download": "^1.0.0",
...@@ -79,7 +78,7 @@ ...@@ -79,7 +78,7 @@
"roadhog-api-doc": "^0.3.3", "roadhog-api-doc": "^0.3.3",
"rollbar": "^2.3.1", "rollbar": "^2.3.1",
"stylelint": "^8.1.0", "stylelint": "^8.1.0",
"stylelint-config-standard": "^17.0.0" "stylelint-config-standard": "^18.0.0"
}, },
"optionalDependencies": { "optionalDependencies": {
"nightmare": "^2.10.0" "nightmare": "^2.10.0"
......
...@@ -6,8 +6,8 @@ import styles from './index.less'; ...@@ -6,8 +6,8 @@ import styles from './index.less';
export default ({ className, title, col = 3, layout = 'horizontal', gutter = 32, export default ({ className, title, col = 3, layout = 'horizontal', gutter = 32,
children, size, ...restProps }) => { children, size, ...restProps }) => {
const clsString = classNames(styles.descriptionList, styles[layout], className, { const clsString = classNames(styles.descriptionList, styles[layout], className, {
[styles.descriptionListSmall]: size === 'small', [styles.small]: size === 'small',
[styles.descriptionListLarge]: size === 'large', [styles.large]: size === 'large',
}); });
const column = col > 4 ? 4 : col; const column = col > 4 ? 4 : col;
return ( return (
......
...@@ -40,8 +40,29 @@ ...@@ -40,8 +40,29 @@
display: table-cell; display: table-cell;
} }
&.vertical { &.small {
// offset the padding-bottom of last row
:global {
.ant-row {
margin-bottom: -8px;
}
}
.title {
margin-bottom: 12px;
color: @text-color;
}
.term, .detail {
padding-bottom: 8px;
}
}
&.large {
.title {
font-size: 16px;
}
}
&.vertical {
.term { .term {
padding-bottom: 8px; padding-bottom: 8px;
display: block; display: block;
...@@ -52,24 +73,3 @@ ...@@ -52,24 +73,3 @@
} }
} }
} }
.descriptionListSmall {
// offset the padding-bottom of last row
:global {
.ant-row {
margin-bottom: -8px;
}
}
.title {
margin-bottom: 12px;
color: @text-color;
}
.term, .detail {
padding-bottom: 8px;
}
}
.descriptionListLarge {
.title {
font-size: 16px;
}
}
...@@ -60,8 +60,8 @@ i.trigger { ...@@ -60,8 +60,8 @@ i.trigger {
font-size: 16px; font-size: 16px;
vertical-align: middle; vertical-align: middle;
} }
&:global(.ant-popover-open), &:hover,
&:hover { &:global(.ant-popover-open) {
background: @primary-1; background: @primary-1;
} }
} }
......
...@@ -83,11 +83,6 @@ ...@@ -83,11 +83,6 @@
padding-right: 24px; padding-right: 24px;
line-height: 55px; line-height: 55px;
} }
}
}
.salesCard {
:global {
.ant-card-head { .ant-card-head {
position: relative; position: relative;
} }
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
} }
.money { .money {
font-family: Helvetica Neue; font-family: "Helvetica Neue", sans-serif;
font-weight: 500; font-weight: 500;
font-size: 20px; font-size: 20px;
line-height: 14px; line-height: 14px;
......
...@@ -15,15 +15,13 @@ ...@@ -15,15 +15,13 @@
} }
.ant-list-pagination { .ant-list-pagination {
text-align: right; text-align: right;
margin-top: 24px;
} }
.ant-avatar-lg { .ant-avatar-lg {
width: 48px; width: 48px;
height: 48px; height: 48px;
line-height: 48px; line-height: 48px;
} }
.ant-list-pagination {
margin-top: 24px;
}
} }
.headerInfo { .headerInfo {
position: relative; position: relative;
......
...@@ -3,7 +3,7 @@ global.requestAnimationFrame = ...@@ -3,7 +3,7 @@ global.requestAnimationFrame =
global.requestAnimationFrame || function requestAnimationFrame(callback) { global.requestAnimationFrame || function requestAnimationFrame(callback) {
setTimeout(callback, 0); setTimeout(callback, 0);
}; };
import { jsdom } from 'jsdom'; import { JSDOM } from 'jsdom';
import Enzyme from 'enzyme'; import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16'; import Adapter from 'enzyme-adapter-react-16';
...@@ -11,6 +11,6 @@ Enzyme.configure({ adapter: new Adapter() }); ...@@ -11,6 +11,6 @@ Enzyme.configure({ adapter: new Adapter() });
// fixed jsdom miss // fixed jsdom miss
const documentHTML = '<!doctype html><html><body><div id="root"></div></body></html>'; const documentHTML = '<!doctype html><html><body><div id="root"></div></body></html>';
global.document = jsdom(documentHTML); global.document = new JSDOM(documentHTML);
global.window = document.defaultView; global.window = document.defaultView;
global.navigator = global.window.navigator; global.navigator = global.window.navigator;
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