From d8d707175caa2e0a7c483a938f8b15726c4efe7d Mon Sep 17 00:00:00 2001 From: kuaifan Date: Tue, 14 Jun 2022 14:48:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E9=93=BE=E6=8E=A5=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E7=82=B9=E5=87=BB=E5=A4=8D=E5=88=B6=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/js/pages/manage/components/FileContent.vue | 9 ++++++--- resources/assets/js/pages/manage/file.vue | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/resources/assets/js/pages/manage/components/FileContent.vue b/resources/assets/js/pages/manage/components/FileContent.vue index f4c2207ca..543b76a7c 100644 --- a/resources/assets/js/pages/manage/components/FileContent.vue +++ b/resources/assets/js/pages/manage/components/FileContent.vue @@ -90,7 +90,7 @@ :mask-closable="false">
-
{{$L('可通过此链接浏览文件。')}}
+
{{$L('可通过此链接浏览文件。')}}{{$L('点击复制链接')}}
@@ -458,7 +458,7 @@ export default { this.linkData = Object.assign(data, { id: this.linkData.id }); - this.linkCopy(); + this.linkFocus(); }).catch(({msg}) => { this.linkShow = false $A.modalError(msg); @@ -471,6 +471,7 @@ export default { if (!this.linkData.url) { return; } + this.linkFocus(); this.$copyText(this.linkData.url).then(_ => { $A.messageSuccess('复制成功'); }).catch(_ => { @@ -479,7 +480,9 @@ export default { }, linkFocus() { - this.$refs.linkInput.focus({cursor:'all'}); + this.$nextTick(_ => { + this.$refs.linkInput.focus({cursor:'all'}); + }); }, exportMenu(act) { diff --git a/resources/assets/js/pages/manage/file.vue b/resources/assets/js/pages/manage/file.vue index 727a0a7ed..c58895132 100644 --- a/resources/assets/js/pages/manage/file.vue +++ b/resources/assets/js/pages/manage/file.vue @@ -312,7 +312,7 @@ :mask-closable="false">
-
{{$L('可通过此链接浏览文件。')}}
+
{{$L('可通过此链接浏览文件。')}}{{$L('点击复制链接')}}
@@ -1213,7 +1213,7 @@ export default { this.linkData = Object.assign(data, { id: this.linkData.id }); - this.linkCopy(); + this.linkFocus(); }).catch(({msg}) => { this.linkShow = false $A.modalError(msg); @@ -1226,6 +1226,7 @@ export default { if (!this.linkData.url) { return; } + this.linkFocus(); this.$copyText(this.linkData.url).then(_ => { $A.messageSuccess('复制成功'); }).catch(_ => { @@ -1234,7 +1235,9 @@ export default { }, linkFocus() { - this.$refs.linkInput.focus({cursor:'all'}); + this.$nextTick(_ => { + this.$refs.linkInput.focus({cursor:'all'}); + }); }, shearTo() {