From f9a45a8fd655e08dc2af49e27efb428a43447597 Mon Sep 17 00:00:00 2001 From: lan Date: Mon, 19 Dec 2022 13:59:44 +0800 Subject: [PATCH] =?UTF-8?q?add:=E7=82=B9=E5=87=BB=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E5=8F=96=E4=BB=B6=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/index.html | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/templates/index.html b/templates/index.html index e02c17e..1b049cd 100644 --- a/templates/index.html +++ b/templates/index.html @@ -29,14 +29,16 @@ border-radius: 20px; } - + .el-card { + border-radius: 20px; + }
- + - - - + + + @@ -107,7 +109,6 @@ - + + +
@@ -187,7 +191,10 @@ ${ file.name } - 取件码:

${ file.code }

+ 取件码: +

+ ${ file.code } +

@@ -292,6 +299,21 @@ }) }) }, + copyCode: function (value) { + const input = document.createElement('input'); + input.setAttribute('readonly', 'readonly'); + input.setAttribute('value', `我在${window.location.href}分享了给你文件,取件码:${value}`); + document.body.appendChild(input); + input.select(); + if (document.execCommand('copy')) { + document.execCommand('copy'); + this.$message({ + message: '复制成功,快去分享给你的朋友吧', + type: 'success' + }); + } + document.body.removeChild(input); + }, getFile: function () { const that = this; this.http('post', `?code=${that.code}`).then(res => {