|
@@ -61,6 +61,7 @@ function init(ew)
|
|
|
initLayui();
|
|
|
initColor();
|
|
|
initUpdate();
|
|
|
+ initClipboard();
|
|
|
|
|
|
//更新页面一些功能,上边的一些功能等找时间再优化吧
|
|
|
dever_update.init();
|
|
@@ -70,6 +71,21 @@ function init(ew)
|
|
|
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()
|
|
|
{
|
|
|
if ($('.update_show_editor').length) {
|