2023-05-26 16:28:53 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
<button style="cursor: pointer;display:none;" :class="triggerName" :data-clipboard-text="alipayLink">
|
|
|
|
|
</button>
|
|
|
|
|
<!-- 支付宝支付界面 -->
|
2023-05-26 16:35:25 +08:00
|
|
|
|
<u-modal :show="show" title="支付宝支付" @confirm="handleConfirm">
|
2023-05-26 16:28:53 +08:00
|
|
|
|
<view class="slot-content">
|
|
|
|
|
链接已复制,请到外部浏览器完成支付
|
|
|
|
|
</view>
|
|
|
|
|
</u-modal>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import Clipboard from 'clipboard'
|
|
|
|
|
export default {
|
|
|
|
|
name: 'AlipayLinkCopy',
|
|
|
|
|
props: {
|
|
|
|
|
alipayLink: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: ''
|
|
|
|
|
},
|
|
|
|
|
show: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false
|
|
|
|
|
},
|
|
|
|
|
triggerName: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: 'clipboard'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2023-05-26 16:35:25 +08:00
|
|
|
|
|
2023-05-26 16:28:53 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
new Clipboard('.clipboard')
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
handleConfirm() {
|
|
|
|
|
this.$emit('update:show', false)
|
|
|
|
|
this.$emit('confirm')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
</style>
|