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">
@@ -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('可通过此链接浏览文件。')}}
+
@@ -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() {