dever 6 years ago
parent
commit
18b56bc612
2 changed files with 22 additions and 0 deletions
  1. 6 0
      assets/lib/clipboard/clipboard.js
  2. 16 0
      assets/lib/manage/main.js

File diff suppressed because it is too large
+ 6 - 0
assets/lib/clipboard/clipboard.js


+ 16 - 0
assets/lib/manage/main.js

@@ -61,6 +61,7 @@ function init(ew)
 	initLayui();
 	initLayui();
 	initColor();
 	initColor();
 	initUpdate();
 	initUpdate();
+	initClipboard();
 
 
 	//更新页面一些功能,上边的一些功能等找时间再优化吧
 	//更新页面一些功能,上边的一些功能等找时间再优化吧
 	dever_update.init();
 	dever_update.init();
@@ -70,6 +71,21 @@ function init(ew)
 	table();
 	table();
 }
 }
 
 
+function initClipboard()
+{
+	var clipboard = new ClipboardJS('.clipboard');
+
+	clipboard.on('success', function(e) {
+	    
+		notify('复制成功', $('.clipboard'));
+	    e.clearSelection();
+	});
+
+	clipboard.on('error', function(e) {
+	    notify('复制失败', $('.clipboard'));
+	});
+}
+
 function initUpdate()
 function initUpdate()
 {
 {
 	if ($('.update_show_editor').length) {
 	if ($('.update_show_editor').length) {

Some files were not shown because too many files changed in this diff