From 440c7ffcb98707b4a0df3f9ecc243f664d552da9 Mon Sep 17 00:00:00 2001 From: nsnail Date: Wed, 27 Nov 2024 16:54:15 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=94=A8=20=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E9=93=BE=E6=8E=A5=E6=8C=89=E9=92=AE=20(#224)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: tk --- .../src/components/naColOperation/index.vue | 10 ++++- .../admin/src/views/sys/doc/list/index.vue | 43 ++++++++++++++----- 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/src/frontend/admin/src/components/naColOperation/index.vue b/src/frontend/admin/src/components/naColOperation/index.vue index 29a08091..6bfb9e71 100644 --- a/src/frontend/admin/src/components/naColOperation/index.vue +++ b/src/frontend/admin/src/components/naColOperation/index.vue @@ -18,8 +18,14 @@ size="small"> - {{ item.title }} + diff --git a/src/frontend/admin/src/views/sys/doc/list/index.vue b/src/frontend/admin/src/views/sys/doc/list/index.vue index afbf0e42..4a970a45 100644 --- a/src/frontend/admin/src/views/sys/doc/list/index.vue +++ b/src/frontend/admin/src/views/sys/doc/list/index.vue @@ -48,7 +48,7 @@
@@ -107,23 +107,30 @@ + width="180" /> @@ -232,7 +239,21 @@ export default { this.$refs.table.upData() }, - + async share(row) { + const textarea = document.createElement('textarea') + textarea.readOnly = 'readonly' + textarea.style.position = 'absolute' + textarea.style.left = '-9999px' + textarea.value = window.location.origin + `/guest/view-doc/${row.id}` + document.body.appendChild(textarea) + textarea.select() + textarea.setSelectionRange(0, textarea.value.length) + const result = document.execCommand('Copy') + if (result) { + this.$message.success(this.$t('文档链接已复制')) + } + document.body.removeChild(textarea) + }, //删除 async rowDel(row) { try {