poster.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <view class="cu-modal" :class="{'show': visible}">
  3. <view class="mask" @click="close"></view>
  4. <view class="cu-dialog" style="background-color: transparent; width:100%">
  5. <view class="relative wrapper flex-align-center">
  6. <image :src="resource.award_poster" webp class="poster" mode="widthFix" />
  7. </view>
  8. <view class="paddingT30 flex-align-center">
  9. <image :src="resource.close" class="x" @click="close" />
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. import resource from '@/utils/resource'
  16. export default {
  17. data() {
  18. return {
  19. resource,
  20. visible: false
  21. }
  22. },
  23. methods: {
  24. show() {
  25. this.visible = true
  26. },
  27. close() {
  28. this.visible = false
  29. }
  30. }
  31. }
  32. </script>
  33. <style lang="scss" scoped>
  34. .mask {
  35. position: absolute;
  36. left: 0;
  37. right: 0;
  38. top: 0;
  39. bottom: 0;
  40. }
  41. .wrapper {
  42. z-index: 2001;
  43. width: 100%;
  44. margin: 0 auto;
  45. position: relative;
  46. .poster {
  47. width: 92%;
  48. height: 0;
  49. }
  50. }
  51. .x {
  52. width: 60rpx;
  53. height: 60rpx;
  54. }
  55. </style>