LiveFooter.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <script>
  2. import LiveInput from "@/components/live-input/LiveInput.vue";
  3. export default {
  4. name: "LiveFooter",
  5. components: {LiveInput},
  6. props: {
  7. // 是否全屏
  8. isFullScreen: {
  9. type: Boolean,
  10. default: false,
  11. }
  12. },
  13. methods: {
  14. handleShowInput() {
  15. console.log("点击了")
  16. this.$refs.liveInput.show();
  17. }
  18. }
  19. }
  20. </script>
  21. <template>
  22. <div class="live-footer" :class="{'horiz': isFullScreen}">
  23. <div class="live-input-row" @click="handleShowInput">发个弹幕吧~</div>
  24. <div class="live-footer-item" style="padding: 6px 5px">
  25. <img src="@/assets/cart.png" class="live-footer-icon" />
  26. </div>
  27. <div class="live-footer-item">
  28. <img src="@/assets/share.png" class="live-footer-icon" />
  29. <span class="live-footer-count">345.9W</span>
  30. </div>
  31. <div class="live-footer-item">
  32. <img src="@/assets/like_active.png" class="live-footer-icon" />
  33. <span class="live-footer-count">999.9K</span>
  34. </div>
  35. <live-input ref="liveInput" v-on="$listeners" />
  36. </div>
  37. </template>
  38. <style scoped>
  39. .live-footer {
  40. margin: 8px 8px 10px;
  41. display: flex;
  42. align-items: center;
  43. column-gap: 6px;
  44. }
  45. .live-input-row {
  46. width: 122px;
  47. height: 36px;
  48. background: rgba(26, 40, 55, 0.5);
  49. box-shadow: 0px 0px 4px 0px rgba(0,0,0,0.24);
  50. border-radius: 18px;
  51. font-weight: 400;
  52. font-size: 16px;
  53. color: rgba(255,255,255,0.5);
  54. display: flex;
  55. align-items: center;
  56. justify-content: center;
  57. }
  58. .live-footer-item {
  59. display: flex;
  60. align-items: center;
  61. column-gap: 4px;
  62. background: rgba(26, 40, 55, 0.5);
  63. box-shadow: 0px 0px 4px 0px rgba(0,0,0,0.24);
  64. border-radius: 18px;
  65. box-sizing: border-box;
  66. padding: 6px 10px;
  67. }
  68. .live-footer-icon {
  69. width: 24px;
  70. height: 24px;
  71. }
  72. .live-footer-count {
  73. font-weight: bold;
  74. font-size: 12px;
  75. color: #FFFFFF;
  76. }
  77. /*横屏样式*/
  78. .horiz {
  79. margin: 8px 60px 34px ;
  80. }
  81. </style>