From aaca87ccc7e71d6660a176e77e2299fd49ea74de Mon Sep 17 00:00:00 2001 From: yoyo837 Date: Mon, 11 Jun 2018 19:47:24 +0800 Subject: [PATCH] rc-drawer-menu is deprecated, use rc-drawer instead. Apply API change, fix iconHandle not work. --- package.json | 2 +- src/components/SiderMenu/index.js | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 0b384699..8581d966 100755 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "path-to-regexp": "^2.1.0", "prop-types": "^15.5.10", "qs": "^6.5.0", - "rc-drawer-menu": "^0.5.0", + "rc-drawer": "^1.2.0", "react": "^16.2.0", "react-container-query": "^0.9.1", "react-document-title": "^2.0.3", diff --git a/src/components/SiderMenu/index.js b/src/components/SiderMenu/index.js index a0dca978..a23459d5 100644 --- a/src/components/SiderMenu/index.js +++ b/src/components/SiderMenu/index.js @@ -1,19 +1,21 @@ -import 'rc-drawer-menu/assets/index.css'; +import 'rc-drawer/assets/index.css'; import React from 'react'; -import DrawerMenu from 'rc-drawer-menu'; +import DrawerMenu from 'rc-drawer'; import SiderMenu from './SiderMenu'; const SiderMenuWrapper = props => props.isMobile ? ( } + onHandleClick={() => { + props.onCollapse(!props.collapsed); + }} open={!props.collapsed} onMaskClick={() => { props.onCollapse(true); }} - width="256px" > -- GitLab