| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <script>
- export default {
- name: 'shareImg',
- props: {
- cvsTempImg: {
- type: String,
- default: ''
- }
- },
- data() {
- return {
- show: false
- }
- },
- methods: {
- save() {
- uni.saveImageToPhotosAlbum({
- filePath: this.cvsTempImg,
- success: () => {
- this.show = false
- this.$common.toast('保存成功')
- }
- })
- }
- }
- }
- </script>
- <template>
- <u-popup :show="show" mode="center" @close="show = false" bg-color="transparent">
- <view class="container"><image :src="cvsTempImg" class="cvsTempImg"></image></view>
- <view class="mt-20 flex flex-center">
- <view class="cancel-icon" @click="show = false">
- <u-icon name="close" size="40rpx" color="#fff"></u-icon>
- </view>
- <view class="download-icon ml-40" @click="save">
- <u-icon name="download" size="40rpx" color="#fff"></u-icon>
- </view>
- </view>
- </u-popup>
- </template>
- <style lang="scss" scoped>
- .cancel-icon,
- .download-icon {
- width: 70rpx;
- height: 70rpx;
- border-radius: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- background-color: rgba(0, 0, 0, 0.3);
- }
- .cvsTempImg {
- width: calc(375rpx * 1.2);
- height: calc(667rpx * 1.2);
- }
- </style>
|