53 lines
1.2 KiB
Vue
53 lines
1.2 KiB
Vue
<template>
|
|
<view v-if="isPayTip" class="dlg" @click.stop="goBack">
|
|
<image :src="imageSrc" mode="aspectFit" style="height: 800rpx;" @click.stop=""></image>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default{
|
|
data(){
|
|
return{
|
|
isPayTip:true,
|
|
imageSrc:'/static/kf.png'
|
|
}
|
|
},
|
|
methods:{
|
|
goBack(){
|
|
this.isPayTip = false
|
|
this.$emit("isClose")
|
|
},
|
|
// saveImageToLocal() {
|
|
// const image = new Image();
|
|
// image.src = this.imageSrc;
|
|
// image.onload = () => {
|
|
// const canvas = document.createElement('canvas');
|
|
// canvas.width = image.width;
|
|
// canvas.height = image.height;
|
|
// const ctx = canvas.getContext('2d');
|
|
// ctx.drawImage(image, 0, 0);
|
|
// const link = document.createElement('a');
|
|
// link.href = canvas.toDataURL();
|
|
// link.download = '客服.jpg'; // 指定下载文件名
|
|
// link.click();
|
|
// this.$api.msg("保存成功")
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.dlg {
|
|
width: 100%;
|
|
height: 100vh;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 888;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
</style> |