hjyd
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
2.8 KiB

2 years ago
  1. <template>
  2. <div :class="getBg()">
  3. <div class="dialog_text">
  4. {{ title }}
  5. </div>
  6. </div>
  7. </template>
  8. <script setup>
  9. const props = defineProps({
  10. title: String,
  11. i: String,
  12. })
  13. const getBg = () => {
  14. if (props.i == '1') {
  15. return 'read_card_container bg1'
  16. }
  17. if (props.i == '2') {
  18. return 'read_card_container bg2'
  19. }
  20. if (props.i == '3') {
  21. return 'read_card_container bg3'
  22. }
  23. if (props.i == '4') {
  24. return 'read_card_container bg4'
  25. }
  26. if (props.i == '5') {
  27. return 'read_card_container bg5'
  28. }
  29. if (props.i == '6') {
  30. return 'read_card_container bg6'
  31. }
  32. if (props.i == '7') {
  33. return 'read_card_container bg7'
  34. }
  35. if (props.i == '8') {
  36. return 'read_card_container bg8'
  37. }
  38. if (props.i == '9') {
  39. return 'read_card_container bg9'
  40. }
  41. if (props.i == '10') {
  42. return 'read_card_container bg10'
  43. }
  44. if (props.i == '11') {
  45. return 'read_card_container bg11'
  46. }
  47. if (props.i == '12') {
  48. return 'read_card_container bg12'
  49. }
  50. }
  51. </script>
  52. <style lang="scss" scoped>
  53. .read_card_container {
  54. width: 350px;
  55. height: 205px;
  56. position: relative;
  57. .dialog_text {
  58. position: absolute;
  59. left: 0;
  60. top: 0;
  61. right: 0;
  62. bottom: 0;
  63. width: 100%;
  64. height: 100%;
  65. background: rgba(0, 0, 0, 0.68);
  66. font-size: 24px;
  67. font-family: 'SourceHanSans';
  68. font-weight: 500;
  69. color: #ffffff;
  70. display: flex;
  71. align-items: center;
  72. justify-content: center;
  73. }
  74. }
  75. .bg1 {
  76. background: url(../../../../../assets/img/readwidely/01.png) no-repeat;
  77. background-size: 100% 100%;
  78. }
  79. .bg2 {
  80. background: url(../../../../../assets/img/readwidely/02.png) no-repeat;
  81. background-size: 100% 100%;
  82. }
  83. .bg3 {
  84. background: url(../../../../../assets/img/readwidely/03.png) no-repeat;
  85. background-size: 100% 100%;
  86. }
  87. .bg4 {
  88. background: url(../../../../../assets/img/readwidely/04.png) no-repeat;
  89. background-size: 100% 100%;
  90. }
  91. .bg5 {
  92. background: url(../../../../../assets/img/readwidely/05.png) no-repeat;
  93. background-size: 100% 100%;
  94. }
  95. .bg6 {
  96. background: url(../../../../../assets/img/readwidely/06.png) no-repeat;
  97. background-size: 100% 100%;
  98. }
  99. .bg7 {
  100. background: url(../../../../../assets/img/readwidely/07.png) no-repeat;
  101. background-size: 100% 100%;
  102. }
  103. .bg8 {
  104. background: url(../../../../../assets/img/readwidely/08.png) no-repeat;
  105. background-size: 100% 100%;
  106. }
  107. .bg9 {
  108. background: url(../../../../../assets/img/readwidely/09.png) no-repeat;
  109. background-size: 100% 100%;
  110. }
  111. .bg10 {
  112. background: url(../../../../../assets/img/readwidely/10.png) no-repeat;
  113. background-size: 100% 100%;
  114. }
  115. .bg11 {
  116. background: url(../../../../../assets/img/readwidely/11.png) no-repeat;
  117. background-size: 100% 100%;
  118. }
  119. .bg12 {
  120. background: url(../../../../../assets/img/readwidely/12.png) no-repeat;
  121. background-size: 100% 100%;
  122. }
  123. </style>