二维码复制

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

@@ -351,7 +351,7 @@ export default {
}; };
}, },
viewTopic(data) { viewTopic(data) {
window.open(this.webBaseUrl+'/case/detail?id='+data.id, '_blank'); this.$router.push({path:'/case/detail',query:{id:data.id}})
} }
} }
}; };

View File

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