From ef167ff064373ceff7002ae0f586b8d2730ea4b9 Mon Sep 17 00:00:00 2001 From: MaYuanhai <414199639@qq.com> Date: Sun, 30 Jun 2019 11:09:19 +0800 Subject: [PATCH] perf[clipboard.js]: remove redundant code (#2307) --- src/utils/clipboard.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/utils/clipboard.js b/src/utils/clipboard.js index e916a44d..cf5b07a1 100644 --- a/src/utils/clipboard.js +++ b/src/utils/clipboard.js @@ -22,14 +22,10 @@ export default function handleClipboard(text, event) { }) clipboard.on('success', () => { clipboardSuccess() - clipboard.off('error') - clipboard.off('success') clipboard.destroy() }) clipboard.on('error', () => { clipboardError() - clipboard.off('error') - clipboard.off('success') clipboard.destroy() }) clipboard.onClick(event)