cyywl_server/yudao-ui-app/components/aliPayLinkCopy/index.vue

51 lines
986 B
Vue
Raw Normal View History

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>