gift-animation.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <cover-view>
  3. <cover-view class="div gift-ani">
  4. <cover-image mode="aspectFit" :src="avatar" class="img avatar"/>
  5. <cover-view class="div info-name">
  6. <cover-view><text class="div nick">{{nick}}</text></cover-view>
  7. <cover-view><text class="div gift">送出 火箭X1</text></cover-view>
  8. </cover-view>
  9. </cover-view>
  10. <cover-image mode="aspectFit" src="@/static/image/live/gift-item.png" class="img gitf-item"/>
  11. </cover-view>
  12. </template>
  13. <script>
  14. export default {
  15. props: {
  16. nick: {},
  17. avatar: {}
  18. },
  19. data () {
  20. return {}
  21. },
  22. methods: {
  23. showgift () {
  24. this.$emit('showGift')
  25. }
  26. },
  27. computed: {},
  28. created () {
  29. setTimeout(() => {
  30. this.$emit('hideani')
  31. }, 1000)
  32. }
  33. }
  34. </script>
  35. <style lang="scss" scoped>
  36. .gift-ani {
  37. background-color: rgba(0, 0, 0, 0.18);
  38. border-radius: 40rpx;
  39. width: 330rpx;
  40. height: 80rpx;
  41. position: relative;
  42. /* #ifndef APP-PLUS-NVUE */
  43. display: flex;
  44. /* #endif */
  45. flex-direction: row;
  46. align-items: center;
  47. }
  48. .info-name{
  49. }
  50. .avatar{
  51. height: 72rpx;
  52. width: 72rpx;
  53. border-radius: 36rpx;
  54. margin: 4rpx;
  55. }
  56. .nick{
  57. font-family: PingFangSC-Medium;
  58. font-size: 12px;
  59. color: #FFFFFF;
  60. /* #ifndef APP-PLUS-NVUE */
  61. letter-spacing: 0;
  62. /* #endif */
  63. text-align: left;
  64. line-height: 24rpx;
  65. }
  66. .gift{
  67. font-family: PingFangSC-Regular;
  68. font-size:12px;
  69. color: #FFFFFF;
  70. /* #ifndef APP-PLUS-NVUE */
  71. letter-spacing: 0;
  72. /* #endif */
  73. text-align: left;
  74. line-height: 44rpx;
  75. }
  76. .gitf-item{
  77. height: 170rpx;
  78. width: 93rpx;
  79. position: absolute;
  80. left: 230rpx;
  81. top: 0;
  82. }
  83. </style>