vodComment.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template name="vodComment">
  2. <view>
  3. <view class="banner">
  4. <dever-video
  5. :src="item.video"
  6. :pic="item.pic"
  7. :control="true"
  8. :index="0"
  9. :vid="item.id"
  10. :load.sync="load"
  11. ref="video"
  12. >
  13. </dever-video>
  14. </view>
  15. <comment :item="item" :type="`content/video_comment`" :type_id="item.id"></comment>
  16. </view>
  17. </template>
  18. <script>
  19. import deverVideo from '@/lib/dever/components/video.nvue';
  20. import comment from "@/pages/dream/view/comment.vue";
  21. export default {
  22. name: "vodComment",
  23. props: {
  24. control : {
  25. type : Object,
  26. value : null
  27. },
  28. item : {
  29. type : Object,
  30. value : null
  31. },
  32. index : {
  33. type : Number,
  34. value : null
  35. },
  36. },
  37. data() {
  38. return {
  39. load : false,
  40. }
  41. },
  42. mounted() {
  43. this.control[this.index] = this;
  44. },
  45. methods:{
  46. start : function() {
  47. this.$refs.video.start();
  48. },
  49. stop : function() {
  50. this.$refs.video.stop(true);
  51. },
  52. },
  53. components:{
  54. deverVideo,comment
  55. }
  56. }
  57. </script>
  58. <style>
  59. .banner{
  60. position: relative;
  61. width: 750rpx;
  62. height: 422rpx;
  63. display: block;
  64. }
  65. </style>