소스 검색

复制成功提示

yusheng 9 달 전
부모
커밋
c25d883994
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/views/doc/components/info.vue

+ 3 - 2
src/views/doc/components/info.vue

@@ -159,8 +159,9 @@
         textArea.select();
         try {
           var successful = document.execCommand('copy');
-          var msg = successful ? 'successful' : 'unsuccessful';
-          console.log('Copying text command was ' + msg);
+        if(successful){
+           this.$message.success('复制成功')
+        }
         } catch (err) {
           console.error('Oops, unable to copy', err);
         }