imgPopup.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <view class="content">
  3. <uni-popup class="popup" ref="popup" type="center">
  4. <view class="popupContent">
  5. <view class="title">奖品预览</view>
  6. <image class="img" :src="imgUrl" mode="widthFix"></image>
  7. <p class="name">
  8. <span style="margin-right: 10px">奖品名称:</span>
  9. {{ name }}
  10. </p>
  11. </view>
  12. </uni-popup>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. emits: ['callBack'],
  18. props: {
  19. value: {
  20. type: Object,
  21. default: {},
  22. },
  23. },
  24. computed: {},
  25. data() {
  26. return {
  27. imgUrl: '',
  28. name: '',
  29. }
  30. },
  31. mounted() {
  32. // this.$refs.popup2.open('center')
  33. // this.getLotteryResults()
  34. },
  35. methods: {
  36. show(value) {
  37. this.imgUrl = value.icon
  38. this.name = value.name
  39. this.$refs.popup.open()
  40. },
  41. },
  42. }
  43. </script>
  44. <style scoped lang="scss">
  45. .popupContent {
  46. padding: 10px;
  47. width: 70vw;
  48. min-height: 40vh;
  49. background: #fff;
  50. border-radius: 5px;
  51. display: flex;
  52. justify-content: center;
  53. align-content: flex-start;
  54. flex-wrap: wrap;
  55. .title {
  56. margin-bottom: 10px;
  57. text-align: center;
  58. }
  59. .img {
  60. width: 60vw;
  61. height: 60vw;
  62. box-shadow: 1px 1px 4px #9c9c9c;
  63. }
  64. .name {
  65. width: 100%;
  66. margin-top: 20px;
  67. text-align: center;
  68. font-weight: 600;
  69. font-size: 15px;
  70. }
  71. }
  72. </style>
  73. <style scoped>
  74. /* .popup2 >>> .uni-popup__wrapper {
  75. top: -8vh;
  76. } */
  77. </style>