mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-28 04:40:37 +00:00
文件链接新增点击复制按钮
This commit is contained in:
parent
de45332543
commit
d8d707175c
@ -90,7 +90,7 @@
|
|||||||
:mask-closable="false">
|
:mask-closable="false">
|
||||||
<div>
|
<div>
|
||||||
<Input ref="linkInput" v-model="linkData.url" type="textarea" :rows="3" @on-focus="linkFocus" readonly/>
|
<Input ref="linkInput" v-model="linkData.url" type="textarea" :rows="3" @on-focus="linkFocus" readonly/>
|
||||||
<div class="form-tip" style="padding-top:6px">{{$L('可通过此链接浏览文件。')}}</div>
|
<div class="form-tip" style="padding-top:6px">{{$L('可通过此链接浏览文件。')}}<a href="javascript:void(0)" @click="linkCopy">{{$L('点击复制链接')}}</a></div>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="adaption">
|
<div slot="footer" class="adaption">
|
||||||
<Button type="default" @click="linkShow=false">{{$L('取消')}}</Button>
|
<Button type="default" @click="linkShow=false">{{$L('取消')}}</Button>
|
||||||
@ -458,7 +458,7 @@ export default {
|
|||||||
this.linkData = Object.assign(data, {
|
this.linkData = Object.assign(data, {
|
||||||
id: this.linkData.id
|
id: this.linkData.id
|
||||||
});
|
});
|
||||||
this.linkCopy();
|
this.linkFocus();
|
||||||
}).catch(({msg}) => {
|
}).catch(({msg}) => {
|
||||||
this.linkShow = false
|
this.linkShow = false
|
||||||
$A.modalError(msg);
|
$A.modalError(msg);
|
||||||
@ -471,6 +471,7 @@ export default {
|
|||||||
if (!this.linkData.url) {
|
if (!this.linkData.url) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.linkFocus();
|
||||||
this.$copyText(this.linkData.url).then(_ => {
|
this.$copyText(this.linkData.url).then(_ => {
|
||||||
$A.messageSuccess('复制成功');
|
$A.messageSuccess('复制成功');
|
||||||
}).catch(_ => {
|
}).catch(_ => {
|
||||||
@ -479,7 +480,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
linkFocus() {
|
linkFocus() {
|
||||||
this.$refs.linkInput.focus({cursor:'all'});
|
this.$nextTick(_ => {
|
||||||
|
this.$refs.linkInput.focus({cursor:'all'});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
exportMenu(act) {
|
exportMenu(act) {
|
||||||
|
|||||||
@ -312,7 +312,7 @@
|
|||||||
:mask-closable="false">
|
:mask-closable="false">
|
||||||
<div>
|
<div>
|
||||||
<Input ref="linkInput" v-model="linkData.url" type="textarea" :rows="3" @on-focus="linkFocus" readonly/>
|
<Input ref="linkInput" v-model="linkData.url" type="textarea" :rows="3" @on-focus="linkFocus" readonly/>
|
||||||
<div class="form-tip" style="padding-top:6px">{{$L('可通过此链接浏览文件。')}}</div>
|
<div class="form-tip" style="padding-top:6px">{{$L('可通过此链接浏览文件。')}}<a href="javascript:void(0)" @click="linkCopy">{{$L('点击复制链接')}}</a></div>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="adaption">
|
<div slot="footer" class="adaption">
|
||||||
<Button type="default" @click="linkShow=false">{{$L('取消')}}</Button>
|
<Button type="default" @click="linkShow=false">{{$L('取消')}}</Button>
|
||||||
@ -1213,7 +1213,7 @@ export default {
|
|||||||
this.linkData = Object.assign(data, {
|
this.linkData = Object.assign(data, {
|
||||||
id: this.linkData.id
|
id: this.linkData.id
|
||||||
});
|
});
|
||||||
this.linkCopy();
|
this.linkFocus();
|
||||||
}).catch(({msg}) => {
|
}).catch(({msg}) => {
|
||||||
this.linkShow = false
|
this.linkShow = false
|
||||||
$A.modalError(msg);
|
$A.modalError(msg);
|
||||||
@ -1226,6 +1226,7 @@ export default {
|
|||||||
if (!this.linkData.url) {
|
if (!this.linkData.url) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.linkFocus();
|
||||||
this.$copyText(this.linkData.url).then(_ => {
|
this.$copyText(this.linkData.url).then(_ => {
|
||||||
$A.messageSuccess('复制成功');
|
$A.messageSuccess('复制成功');
|
||||||
}).catch(_ => {
|
}).catch(_ => {
|
||||||
@ -1234,7 +1235,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
linkFocus() {
|
linkFocus() {
|
||||||
this.$refs.linkInput.focus({cursor:'all'});
|
this.$nextTick(_ => {
|
||||||
|
this.$refs.linkInput.focus({cursor:'all'});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
shearTo() {
|
shearTo() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user