|
|
@@ -3,7 +3,7 @@
|
|
|
<el-button type="primary" icon="Share" @click="show = true"
|
|
|
>分 享</el-button
|
|
|
>
|
|
|
- <el-dialog v-model="show" title="分享" width="450px" :show-close="false">
|
|
|
+ <el-dialog v-model="show" title="分享" width="450px">
|
|
|
<div>
|
|
|
<el-empty
|
|
|
v-if="qrCodeText.length === 0"
|
|
|
@@ -20,7 +20,7 @@
|
|
|
/>
|
|
|
<el-input disabled v-model="qrCodeText" class="mt-20">
|
|
|
<template #append>
|
|
|
- <el-button>复 制</el-button>
|
|
|
+ <el-button @click="copy(qrCodeText)">复 制</el-button>
|
|
|
</template>
|
|
|
</el-input>
|
|
|
</div>
|
|
|
@@ -69,6 +69,17 @@ export default {
|
|
|
this.$message.error(res.msg)
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ copy(item) {
|
|
|
+ this.$Clipboard({
|
|
|
+ text: item
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$message.success('复制成功')
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message.error('复制失败')
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|