123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <template name="audioComment">
- <view>
- <view class="banner">
- <dever-audio
- :src="item.audio"
- :pic="item.pic"
- :control="true"
- :loop="true"
- :load.sync="load"
- ref="audio"
- >
- </dever-audio>
- </view>
- <comment :item="item" :type="`content/audio_comment`" :type_id="item.id"></comment>
- </view>
- </template>
- <script>
- import deverAudio from '@/lib/dever/components/audio.nvue';
- import comment from "@/pages/dream/view/comment.vue";
- export default {
- name: "audioComment",
- props: {
- control : {
- type : Object,
- value : null
- },
- item : {
- type : Object,
- value : null
- },
- index : {
- type : Number,
- value : null
- },
- },
- data() {
- return {
- load : false,
- }
- },
- mounted() {
- this.control[this.index] = this;
- },
- methods:{
- start : function() {
- this.$refs.audio.start();
- },
- stop : function() {
- this.$refs.audio.stop();
- },
- },
- components:{
- deverAudio,comment
- }
- }
- </script>
- <style>
- .banner{
- position: relative;
- width: 750rpx;
- height: 422rpx;
- display: block;
- }
- </style>
|