From a2368883a54e792faea4a6531f3de53b6bcf2e40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Fri, 10 Aug 2018 09:04:52 +0800 Subject: [PATCH] use drawer repalce rc-drawer --- .stylelintrc | 1 + package.json | 11 +++++------ src/components/SiderMenu/index.js | 19 ++++++++----------- src/routes/List/TableList.js | 4 ++-- src/routes/List/TableList.less | 1 + 5 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.stylelintrc b/.stylelintrc index a883e81c..65945123 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -13,6 +13,7 @@ "function-parentheses-newline-inside": null, "function-max-empty-lines": null, "function-whitespace-after": null, + "no-missing-end-of-source-newline": null, "number-leading-zero": null, "number-no-trailing-zeros": null, "rule-empty-line-before": null, diff --git a/package.json b/package.json index 5081f6c3..a3a222ed 100755 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "prettier": "prettier --write ./src/**/**/**/*" }, "dependencies": { - "@antv/data-set": "^0.8.0", + "@antv/data-set": "^0.9.0", "@babel/polyfill": "^7.0.0-beta.36", "antd": "^3.8.0", "bizcharts": "^3.1.10", @@ -38,7 +38,6 @@ "path-to-regexp": "^2.1.0", "prop-types": "^15.5.10", "qs": "^6.5.0", - "rc-drawer": "^1.2.0", "react": "^16.4.1", "react-container-query": "^0.11.0", "react-document-title": "^2.0.3", @@ -56,7 +55,7 @@ "babel-plugin-transform-decorators-legacy": "^1.3.4", "cross-env": "^5.1.1", "cross-port-killer": "^1.0.1", - "enzyme": "^3.1.0", + "enzyme": "^3.4.1", "eslint": "^5.0.0", "eslint-config-airbnb": "^17.0.0", "eslint-config-prettier": "^2.9.0", @@ -70,15 +69,15 @@ "husky": "^0.14.3", "lint-staged": "^7.2.0", "mockjs": "^1.0.1-beta3", - "prettier": "1.14.0", + "prettier": "1.14.2", "pro-download": "^1.0.1", - "react-loadable": "^5.4.0", + "react-loadable": "^5.5.0", "redbox-react": "^1.5.0", "regenerator-runtime": "^0.12.0", "roadhog": "^2.4.2", "roadhog-api-doc": "^1.1.2", "stylelint": "^9.2.1", - "stylelint-config-prettier": "^3.0.4", + "stylelint-config-prettier": "^4.0.0", "stylelint-config-standard": "^18.0.0" }, "optionalDependencies": { diff --git a/src/components/SiderMenu/index.js b/src/components/SiderMenu/index.js index e1f060cf..07b7ea10 100644 --- a/src/components/SiderMenu/index.js +++ b/src/components/SiderMenu/index.js @@ -1,25 +1,22 @@ -import 'rc-drawer/assets/index.css'; import React from 'react'; -import DrawerMenu from 'rc-drawer'; +import { Drawer } from 'antd'; import SiderMenu from './SiderMenu'; const SiderMenuWrapper = props => { const { isMobile, collapsed } = props; return isMobile ? ( - } - onHandleClick={() => { - props.onCollapse(!collapsed); + { + onClose={() => { props.onCollapse(true); }} > - + ) : ( ); diff --git a/src/routes/List/TableList.js b/src/routes/List/TableList.js index c84f1f3b..a3e4e8ec 100644 --- a/src/routes/List/TableList.js +++ b/src/routes/List/TableList.js @@ -295,7 +295,7 @@ export default class TableList extends PureComponent {
- +
@@ -305,7 +305,7 @@ export default class TableList extends PureComponent { 收起 - +
); diff --git a/src/routes/List/TableList.less b/src/routes/List/TableList.less index 60405f26..f3d627ea 100644 --- a/src/routes/List/TableList.less +++ b/src/routes/List/TableList.less @@ -30,6 +30,7 @@ } } .submitButtons { + display: block; white-space: nowrap; margin-bottom: 24px; } -- GitLab