video.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <div class="videoBox warp" :class="'terminal' + terminal">
  3. <div class="videoLeftBox">
  4. <h3>{{componentContent.title}}</h3>
  5. <div v-html="componentContent.mainBody"></div>
  6. </div>
  7. <div class="videoRightBox">
  8. <video class="myVideo" id="myVideo" :src="componentContent.videoUrl" enable-danmu danmu-btn controls></video>
  9. </div>
  10. <div class="clear"></div>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. name: 'videoBox',
  16. props: {
  17. terminal: {
  18. type: Number,
  19. default: 4
  20. },
  21. componentContent: {
  22. type: Object
  23. }
  24. },
  25. data () {
  26. return {
  27. }
  28. }
  29. }
  30. </script>
  31. <style lang="scss" scoped>
  32. .videoBox {
  33. padding: 20px 0;
  34. display: flex;
  35. justify-content: flex-start;
  36. align-items: center;
  37. .videoLeftBox {
  38. width: 50%;
  39. padding-right: 10%;
  40. h3 {
  41. font-size: 28px;
  42. color: #333333;
  43. margin-bottom: 30px;
  44. }
  45. p {
  46. color: #333333;
  47. font-size: 14px;
  48. line-height: 30px;
  49. }
  50. }
  51. .videoRightBox {
  52. width: 50%;
  53. video {
  54. width: 100%;
  55. }
  56. }
  57. .clear {
  58. clear: both;
  59. }
  60. }
  61. .terminal1,.terminal2,.terminal3{
  62. &.videoBox{
  63. display: block;
  64. .videoLeftBox{
  65. width: 100%;
  66. text-align: center;
  67. margin-bottom: 20px;
  68. }
  69. .videoRightBox {
  70. width: 100%;
  71. }
  72. }
  73. }
  74. </style>