<template>
  <u-popup
    v-model="props.show"
    mode="center"
    closeable
    border-radius="15"
    width="80%"
  >
    <view class="qrcode">
      <view class="title">{{ title }}</view>
      <view class="image">
        <u-image width="100%" height="500rpx" :src="baseUrl + '/' + Url" />
      </view>
    </view>
    <!-- <view class="footer">
      <u-button type="primary" size="medium" @tap="saveImage(qrCodeUrl)"
        >保存二维码</u-button
      >
    </view> -->
  </u-popup>
</template>

<script setup lang="ts">
import { baseUrl } from "@/utils/request";

const props = defineProps({
  show: Boolean,
  Url: String,
  title: String,
});
</script>

<style lang="scss" scoped>
:deep(.u-mode-center-box) {
  background-color: transparent;
}
.qrcode {
  padding: 24rpx;
  background-color: #fff;
  border-bottom-right-radius: 15rpx;
  border-bottom-left-radius: 15rpx;

  .title {
    font-size: larger;
    font-weight: bolder;
  }
  .image {
    padding: 46rpx;
  }
}
.footer {
  margin-top: 50rpx;
  background-color: #fff;
  border-top-left-radius: 10rpx;
  border-top-right-radius: 10rpx;
  padding: 20rpx;

  .u-btn {
    width: 100%;
  }
}
</style>
