diff --git a/package.json b/package.json
index 4b370ca6..03ec7e39 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 d3950294..891e37de 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 (
-
-
- {!collapse ? (
-
- ) : (
-
- )}
-
- }
- placement="right"
- width="336px"
- style={{
- zIndex: 999,
- }}
- onMaskClick={this.togglerContent}
- >
-
-
- this.changeSetting('silderTheme', value)}
+
+ {!collapse ? (
+
-
-
-
+ ) : (
+
+ )}
+
+ }
+ placement="right"
+ width="336px"
+ style={{
+ zIndex: 999,
+ }}
+ onMaskClick={this.togglerContent}
+ >
+
+
message.success('copy success')}
+ >
+
+

+
+
+
+
this.changeSetting('silderTheme', value)}
+ />
+
-
+
-
- this.changeSetting('layout', value)}
- />
-
+
- {item.title}}
+
+ this.changeSetting('layout', value)}
/>
+
-
+ {item.title}}
+ />
-
- this.changeSetting('colorWeak', checked)}
- />,
- ]}
- >
- 色弱模式
-
-
-
-
-
+
+
+
+ this.changeSetting('colorWeak', checked)}
+ />,
+ ]}
+ >
+ 色弱模式
+
+
+
+
);
}
}
diff --git a/src/components/SettingDarwer/index.less b/src/components/SettingDarwer/index.less
index 972a9091..4a21f999 100644
--- a/src/components/SettingDarwer/index.less
+++ b/src/components/SettingDarwer/index.less
@@ -5,6 +5,15 @@
min-height: 100%;
padding: 24px;
background: #fff;
+ position: relative;
+ .clipboard {
+ position: absolute;
+ top: 10px;
+ right: 10px;
+ cursor: pointer;
+ width: 16px;
+ height: 16px;
+ }
}
.blockChecbox {