diff --git a/package.json b/package.json index 4b370ca6d2b91b6e0553c6587393488eba685d78..03ec7e393227a28dd605b263d180ec1189533f94 100755 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "qs": "^6.5.2", "rc-drawer": "^1.5.2", "react-container-query": "^0.11.0", + "react-copy-to-clipboard": "^5.0.1", "react-document-title": "^2.0.3", "react-fittext": "^1.0.0", "rollbar": "^2.3.4", diff --git a/src/components/SettingDarwer/index.js b/src/components/SettingDarwer/index.js index d395029458ae0b39652cc8e8de7caa0b5b4da691..891e37de04d577b59a2e9fc6a260cacc5d251df4 100644 --- a/src/components/SettingDarwer/index.js +++ b/src/components/SettingDarwer/index.js @@ -1,6 +1,7 @@ import React, { PureComponent } from 'react'; import { Select, message, List, Switch, Divider, Icon } from 'antd'; import DrawerMenu from 'rc-drawer'; +import { CopyToClipboard } from 'react-copy-to-clipboard'; import { connect } from 'dva'; import styles from './index.less'; import ThemeColor from './ThemeColor'; @@ -145,108 +146,117 @@ class SettingDarwer extends PureComponent { }; render() { - const { - setting: { collapse, silderTheme, themeColor, layout, colorWeak }, - } = this.props; + const { setting } = this.props; + const { collapse, silderTheme, themeColor, layout, colorWeak } = setting; return ( -