From 4a66fd49b0539d5939afe0d9f672647e4e28891b Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Tue, 11 Apr 2023 18:17:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=8D=E5=88=B6=E6=8F=92=E4=BB=B6=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/common/js/common.js | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/public/static/common/js/common.js b/public/static/common/js/common.js index d503207bf..6aa50fe17 100755 --- a/public/static/common/js/common.js +++ b/public/static/common/js/common.js @@ -4716,21 +4716,24 @@ $(function() }); // 文本信息复制 - var text_copy_clipboard = new ClipboardJS('.text-copy-submit', + if($('.text-copy-submit').length > 0) { - text: function(e) - { - return $(e).data('value'); - } - }); - text_copy_clipboard.on('success', function(e) - { - Prompt(window['lang_copy_success'] || '复制成功', 'success'); - }); - text_copy_clipboard.on('error', function(e) - { - Prompt(window['lang_copy_fail'] || '复制失败'); - }); + var text_copy_clipboard = new ClipboardJS('.text-copy-submit', + { + text: function(e) + { + return $(e).data('value'); + } + }); + text_copy_clipboard.on('success', function(e) + { + Prompt(window['lang_copy_success'] || '复制成功', 'success'); + }); + text_copy_clipboard.on('error', function(e) + { + Prompt(window['lang_copy_fail'] || '复制失败'); + }); + } // 调起视频扫码、持续扫码 var $video_scan_popup = $('#common-video-scan-popup');