12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <template name="liveComment">
- <view>
- <view class="banner">
- <dever-video
- :src="item.live"
- :pic="item.pic"
- :control="false"
- :index="0"
- :vid="item.id"
- :load.sync="load"
- :disabled="disabled"
- ref="video"
- >
- </dever-video>
- </view>
- <block v-if="item.type == 2">
- <dever-comment ref="comment" :item="item" :type="`content/live`" :type_id="item.id"></dever-comment>
- </block>
- <block v-if="item.type == 1">
- <dever-seat ref="seat" :item="item" :index="index" :type="`content/live`" :type_id="item.id" @start="start" @stop="stop" @setDisabled="setDisabled"></dever-seat>
- </block>
- </view>
- </template>
- <script>
- import deverVideo from '@/lib/dever/components/video.nvue';
- import deverComment from "@/lib/dever/components/comment.vue";
- import deverSeat from '@/lib/dever/components/seat.vue';
- export default {
- name: "liveComment",
- props: {
- control : {
- type : Object,
- value : null
- },
- item : {
- type : Object,
- value : null
- },
- index : 0
- },
- data() {
- return {
- load : false,
- //默认不能播放
- disabled : true,
- }
- },
- mounted() {
- this.control[this.index] = this;
- },
- methods:{
- start : function() {
- this.$refs.video.start();
- },
- stop : function() {
- this.$refs.video.stop(true);
- },
- setDisabled : function(value) {
- this.disabled = value;
- },
- },
- components:{
- deverVideo,deverComment,deverSeat
- }
- }
- </script>
- <style>
- .banner{
- position: relative;
- width: 750rpx;
- height: 422rpx;
- display: block;
- }
- </style>
|