二维码复制

This commit is contained in:
zhaofang
2022-06-15 15:10:33 +08:00
parent af9be97044
commit f6e98a1375
2 changed files with 8 additions and 3 deletions

View File

@@ -203,8 +203,8 @@
<el-dialog title="二维码" center :visible.sync="qrcodeShow" @close="closeCode" width="500px">
<div style="height:250px;display: flex;flex-direction:column;justify-content: space-evenly;align-items: center;">
<div id="qrcode" ref="qrcode"></div>
<el-input v-model="qrcode"></el-input>
<el-button type="primary" size="mini">复制链接</el-button>
<el-input v-model="qrcode" id="text"></el-input>
<el-button type="primary" size="mini" @click="myCopy()">复制链接</el-button>
</div>
<span slot="footer" class="dialog-footer">
@@ -397,6 +397,11 @@ export default {
},
methods: {
myCopy(){
var ele = document.getElementById("text");
ele.select();
document.execCommand("Copy");
},
inputOn() {
this.$forceUpdate();
},