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

51 lines
986 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view>
<button style="cursor: pointer;display:none;" :class="triggerName" :data-clipboard-text="alipayLink">
</button>
<!-- 支付宝支付界面 -->
<u-modal :show="show" title="支付宝支付" @confirm="handleConfirm">
<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 {
}
},
mounted() {
new Clipboard('.clipboard')
},
methods: {
handleConfirm() {
this.$emit('update:show', false)
this.$emit('confirm')
}
}
}
</script>
<style>
</style>