mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
二维码复制
This commit is contained in:
@@ -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();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user