From b70514a3adc9e800f224c1b0b11a26a032ddf5cd Mon Sep 17 00:00:00 2001 From: yanglbme Date: Thu, 7 Nov 2019 14:58:14 +0800 Subject: [PATCH] feat: update editor.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新复制时的提示信息及展示方式 --- assets/scripts/editor.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/assets/scripts/editor.js b/assets/scripts/editor.js index 894a491..68dc48a 100644 --- a/assets/scripts/editor.js +++ b/assets/scripts/editor.js @@ -131,22 +131,28 @@ let app = new Vue({ try { if (document.execCommand('copy')) { - this.$message({ + this.$notify({ showClose: true, - message: '已复制文章到剪贴板,可直接到公众号后台粘贴', + message: '已复制文章到剪贴板,可直接到公众号后台粘贴', + offset: 80, + duration: 1600, type: 'success' }); } else { - this.$message({ + this.$notify({ showClose: true, - message: '未能复制文章到剪贴板,请全选后右键复制', + message: '未能复制文章到剪贴板,请全选后右键复制', + offset: 80, + duration: 1600, type: 'warning' }); } } catch (err) { - this.$message({ + this.$notify({ showClose: true, - message: '未能复制文章到剪贴板,请全选后右键复制', + message: '未能复制文章到剪贴板,请全选后右键复制', + offset: 80, + duration: 1600, type: 'warning' }); }