提交 8b6f48b1 authored 作者: vipcxj's avatar vipcxj

1. update dependencies.

2. make eslint happy.
上级 b893ad75
...@@ -33,8 +33,12 @@ ...@@ -33,8 +33,12 @@
"no-multi-assign": "off", "no-multi-assign": "off",
"no-await-in-loop": "off", "no-await-in-loop": "off",
"prefer-destructuring": "off", "prefer-destructuring": "off",
"lines-between-class-members": "off",
"no-multiple-empty-lines": "off",
"react/require-default-props": "off", "react/require-default-props": "off",
"react/no-array-index-key": "off", "react/no-array-index-key": "off",
"react/destructuring-assignment": "off",
"react/jsx-one-expression-per-line": "off",
"lodash-fp/use-fp": "off", "lodash-fp/use-fp": "off",
"lodash-fp/no-unused-result": "off" "lodash-fp/no-unused-result": "off"
}, },
......
...@@ -16,117 +16,117 @@ ...@@ -16,117 +16,117 @@
"ie >= 9" "ie >= 9"
], ],
"dependencies": { "dependencies": {
"@babel/runtime": "^7.0.0-beta.51", "@babel/runtime": "^7.0.0",
"antd": "^3.6.2", "antd": "^3.9.2",
"axo": "^0.0.2", "axo": "^0.0.2",
"bowser": "^1.9.3", "bowser": "^1.9.4",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"dva": "^2.3.1", "dva": "^2.4.0",
"dva-loading": "^2.0.3", "dva-loading": "^2.0.5",
"fastjson_ref_resolver": "^0.0.3", "fastjson_ref_resolver": "^0.0.3",
"fingerprintjs": "^0.5.3", "fingerprintjs": "^0.5.3",
"github-markdown-css": "^2.10.0", "github-markdown-css": "^2.10.0",
"highlight.js": "^9.12.0", "highlight.js": "^9.12.0",
"history": "^4.7.2", "history": "^4.7.2",
"hoist-non-react-statics": "^2.5.4", "hoist-non-react-statics": "^3.0.1",
"is-promise": "^2.1.0", "is-promise": "^2.1.0",
"lodash": "^4.17.10", "lodash": "^4.17.10",
"lowdb": "^1.0.0", "lowdb": "^1.0.0",
"moment": "^2.22.2", "moment": "^2.22.2",
"prop-types": "^15.6.1", "prop-types": "^15.6.2",
"react": "^16.4.1", "react": "^16.5.0",
"react-async-wrapper": "^1.0.5", "react-async-wrapper": "^1.0.5",
"react-dom": "^16.4.1", "react-dom": "^16.5.0",
"react-json-view": "^1.17.1", "react-json-view": "^1.19.1",
"react-markdown": "^3.3.3", "react-markdown": "^3.6.0",
"react-router-4-compat": "^1.0.8", "react-router-4-compat": "^1.0.8",
"react-sizeme": "2.4.1", "react-sizeme": "^2.5.2",
"redux-persist": "^5.10.0", "redux-persist": "^5.10.0",
"resolve-pathname": "^2.2.0", "resolve-pathname": "^2.2.0",
"uuid": "^3.2.1", "uuid": "^3.3.2",
"word-wrap": "^1.2.3", "word-wrap": "^1.2.3",
"xml2js": "^0.4.19" "xml2js": "^0.4.19"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.0.0-beta.51", "@babel/core": "^7.0.0",
"@babel/helper-plugin-utils": "^7.0.0-beta.51", "@babel/helper-plugin-utils": "^7.0.0",
"@babel/plugin-proposal-async-generator-functions": "^7.0.0-beta.51", "@babel/plugin-proposal-async-generator-functions": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.51", "@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0-beta.51", "@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-do-expressions": "^7.0.0-beta.51", "@babel/plugin-proposal-do-expressions": "^7.0.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0-beta.51", "@babel/plugin-proposal-export-default-from": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0-beta.51", "@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-function-bind": "^7.0.0-beta.51", "@babel/plugin-proposal-function-bind": "^7.0.0-beta.51",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0-beta.51", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.51", "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-proposal-optional-catch-binding": "^7.0.0-beta.51", "@babel/plugin-proposal-optional-catch-binding": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.0.0-beta.51", "@babel/plugin-proposal-optional-chaining": "^7.0.0",
"@babel/plugin-proposal-pipeline-operator": "^7.0.0-beta.51", "@babel/plugin-proposal-pipeline-operator": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0-beta.51", "@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-transform-react-constant-elements": "^7.0.0-beta.51", "@babel/plugin-transform-react-constant-elements": "^7.0.0",
"@babel/plugin-transform-react-inline-elements": "^7.0.0-beta.51", "@babel/plugin-transform-react-inline-elements": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0-beta.51", "@babel/plugin-transform-runtime": "^7.0.0",
"@babel/polyfill": "^7.0.0-beta.51", "@babel/polyfill": "^7.0.0",
"@babel/preset-env": "^7.0.0-beta.51", "@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0-beta.51", "@babel/preset-react": "^7.0.0",
"@babel/register": "^7.0.0-beta.51", "@babel/register": "^7.0.0",
"@storybook/addon-actions": "^4.0.0-alpha.9", "@storybook/addon-actions": "^4.0.0-alpha.21",
"@storybook/addon-info": "^4.0.0-alpha.9", "@storybook/addon-info": "^4.0.0-alpha.21",
"@storybook/addon-links": "^4.0.0-alpha.9", "@storybook/addon-links": "^4.0.0-alpha.21",
"@storybook/react": "^4.0.0-alpha.9", "@storybook/react": "^4.0.0-alpha.21",
"@types/webpack": "^4.4.0", "@types/webpack": "^4.4.11",
"autoprefixer": "^8.6.2", "autoprefixer": "^9.1.5",
"awesome-typescript-loader": "^5.0.0", "awesome-typescript-loader": "^5.2.1",
"babel-core": "^7.0.0-bridge.0", "babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^8.2.3", "babel-eslint": "^9.0.0",
"babel-loader": "^8.0.0-beta.3", "babel-loader": "^8.0.2",
"babel-plugin-dev-expression": "^0.2.1", "babel-plugin-dev-expression": "^0.2.1",
"babel-plugin-dva-hmr": "^0.4.1", "babel-plugin-dva-hmr": "^0.4.1",
"babel-plugin-import": "^1.8.0", "babel-plugin-import": "^1.8.0",
"babel-plugin-lodash": "^3.3.4", "babel-plugin-lodash": "^3.3.4",
"babel-plugin-react-require": "^3.0.0", "babel-plugin-react-require": "^3.0.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.13", "babel-plugin-transform-react-remove-prop-types": "^0.4.15",
"cache-loader": "^1.2.2", "cache-loader": "^1.2.2",
"case-sensitive-paths-webpack-plugin": "^2.1.2", "case-sensitive-paths-webpack-plugin": "^2.1.2",
"chai": "^4.1.2", "chai": "^4.1.2",
"clean-webpack-plugin": "^0.1.19", "clean-webpack-plugin": "^0.1.19",
"copy-webpack-plugin": "^4.5.1", "copy-webpack-plugin": "^4.5.2",
"cross-env": "^5.2.0", "cross-env": "^5.2.0",
"ejs-loader": "^0.3.1", "ejs-loader": "^0.3.1",
"enzyme": "^3.3.0", "enzyme": "^3.3.0",
"eslint": "^4.19.1", "eslint": "^5.5.0",
"eslint-config-airbnb": "^16.1.0", "eslint-config-airbnb": "^17.1.0",
"eslint-loader": "^2.0.0", "eslint-loader": "^2.1.0",
"eslint-plugin-import": "^2.11.0", "eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.0.3", "eslint-plugin-jsx-a11y": "^6.1.1",
"eslint-plugin-lodash-fp": "^2.1.3", "eslint-plugin-lodash-fp": "^2.1.3",
"eslint-plugin-react": "^7.7.0", "eslint-plugin-react": "^7.11.1",
"highlight-loader": "^0.7.2", "highlight-loader": "^0.7.2",
"html-webpack-plugin": "^3.2.0", "html-webpack-plugin": "^3.2.0",
"http-proxy-middleware": "^0.18.0", "http-proxy-middleware": "^0.19.0",
"jest": "^23.1.0", "jest": "^23.6.0",
"jsdom": "^11.11.0", "jsdom": "^12.0.0",
"less": "^3.0.4", "less": "^3.8.1",
"less-loader": "^4.1.0", "less-loader": "^4.1.0",
"lodash-webpack-plugin": "^0.11.5", "lodash-webpack-plugin": "^0.11.5",
"markdown-loader": "^2.0.2", "markdown-loader": "^4.0.0",
"mini-css-extract-plugin": "^0.4.0", "mini-css-extract-plugin": "^0.4.2",
"mockjs": "^1.0.1-beta3", "mockjs": "^1.0.1-beta3",
"optimize-css-assets-webpack-plugin": "^4.0.2", "optimize-css-assets-webpack-plugin": "^5.0.1",
"path": "^0.12.7", "path": "^0.12.7",
"postcss-flexbugs-fixes": "^3.3.1", "postcss-flexbugs-fixes": "^4.1.0",
"raw-loader": "^0.5.1", "raw-loader": "^0.5.1",
"react-dev-utils": "^5.0.1", "react-dev-utils": "^5.0.2",
"react-test-renderer": "^16.4.1", "react-test-renderer": "^16.5.0",
"redbox-react": "^1.6.0", "redbox-react": "^1.6.0",
"style-loader": "^0.21.0", "style-loader": "^0.23.0",
"uglifyjs-webpack-plugin": "^1.2.5", "uglifyjs-webpack-plugin": "^1.3.0",
"url-loader": "^1.0.1", "url-loader": "^1.1.1",
"webpack": "^4.12.0", "webpack": "^4.18.0",
"webpack-bundle-analyzer": "^2.13.1", "webpack-bundle-analyzer": "^2.13.1",
"webpack-cli": "^3.0.6", "webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.4", "webpack-dev-server": "^3.1.8",
"webpack-manifest-plugin": "^2.0.3", "webpack-manifest-plugin": "^2.0.3",
"webpack-merge": "^4.1.3" "webpack-merge": "^4.1.4"
} }
} }
...@@ -46,11 +46,13 @@ class TableEx extends Component { ...@@ -46,11 +46,13 @@ class TableEx extends Component {
const state = this.state.columns[index]; const state = this.state.columns[index];
if (ret.filterType) { if (ret.filterType) {
const onSearch = (filter) => { const onSearch = (filter) => {
const newColumns = [...this.state.columns]; this.setState((preState) => {
newColumns[index].filter = filter; const newColumns = [...preState.columns];
newColumns[index].filtered = !!filter; newColumns[index].filter = filter;
newColumns[index].filterDropdownVisible = false; newColumns[index].filtered = !!filter;
this.setState({ columns: newColumns }, () => { newColumns[index].filterDropdownVisible = false;
return { columns: newColumns };
}, () => {
this.props.onFilter(this.state.columns.map(c => ({ this.props.onFilter(this.state.columns.map(c => ({
key: c.key, key: c.key,
filter: c.filter, filter: c.filter,
...@@ -62,9 +64,11 @@ class TableEx extends Component { ...@@ -62,9 +64,11 @@ class TableEx extends Component {
); );
ret.filterDropdownVisible = state.filterDropdownVisible; ret.filterDropdownVisible = state.filterDropdownVisible;
ret.onFilterDropdownVisibleChange = (visible) => { ret.onFilterDropdownVisibleChange = (visible) => {
const newColumns = [...this.state.columns]; this.setState((preState) => {
newColumns[index].filterDropdownVisible = visible; const newColumns = [...preState.columns];
this.setState({ columns: newColumns }); newColumns[index].filterDropdownVisible = visible;
return { columns: newColumns };
});
}; };
ret.filterIcon = Search.getIcon(ret.filterType, state.filtered); ret.filterIcon = Search.getIcon(ret.filterType, state.filtered);
} }
...@@ -110,4 +114,3 @@ TableEx.defaultProps = { ...@@ -110,4 +114,3 @@ TableEx.defaultProps = {
}; };
export default TableEx; export default TableEx;
...@@ -45,9 +45,9 @@ class EnumSearch extends Component { ...@@ -45,9 +45,9 @@ class EnumSearch extends Component {
} }
} }
reset() { reset() {
this.setState({ this.setState(preState => ({
checked: this.state.checked.map(() => false), checked: preState.checked.map(() => false),
}); }));
} }
render() { render() {
...@@ -57,9 +57,11 @@ class EnumSearch extends Component { ...@@ -57,9 +57,11 @@ class EnumSearch extends Component {
{ {
filterEnums.map((filterEnum, index) => { filterEnums.map((filterEnum, index) => {
const onChange = (e) => { const onChange = (e) => {
const checked = [...this.state.checked]; this.setState((preState) => {
checked[index] = e.target.checked; const checked = [...preState.checked];
this.setState({ checked }); checked[index] = e.target.checked;
return { checked };
});
}; };
return ( return (
<span key={index}> <span key={index}>
......
...@@ -134,7 +134,7 @@ class HeaderPane extends React.Component { ...@@ -134,7 +134,7 @@ class HeaderPane extends React.Component {
<div className={styles.board}> <div className={styles.board}>
<Breadcrumb {...breadsProps} /> <Breadcrumb {...breadsProps} />
<Menu {...menuProps}> <Menu {...menuProps}>
<SubMenu title={userTitle} key="user" > <SubMenu title={userTitle} key="user">
<Menu.Item key="logout"> <Menu.Item key="logout">
<span> <span>
<Icon type="logout" /> <Icon type="logout" />
......
...@@ -130,10 +130,10 @@ export function padDigits(number, digits) { ...@@ -130,10 +130,10 @@ export function padDigits(number, digits) {
} }
export function is(obj, type) { export function is(obj, type) {
return (type === 'Null' && obj === null) || return (type === 'Null' && obj === null)
(type === 'Undefined' && obj === void 0) || // eslint-disable-line no-void || (type === 'Undefined' && obj === void 0) // eslint-disable-line no-void
(type === 'Number' && Number.isFinite(obj)) || || (type === 'Number' && Number.isFinite(obj))
Object.prototype.toString.call(obj).slice(8, -1) === type; || Object.prototype.toString.call(obj).slice(8, -1) === type;
} }
export function makePromise0(thunk) { export function makePromise0(thunk) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论