Explorar el Código

feat: 复制到剪贴板失败时输出错误到控制台

Jinyao hace 5 años
padre
commit
b372c4d6aa
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/utils/clipboard.ts

+ 2 - 1
src/utils/clipboard.ts

@@ -11,11 +11,12 @@ export function copy(content: string) {
         message: '成功复制到剪贴板',
       }),
     );
-  } catch {
+  } catch (e) {
     // @ts-ignore
     this.$message({
       type: 'error',
       message: '复制到剪贴板失败',
     });
+    console.error(e);
   }
 }