|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
* @Author: ch
|
|
|
|
|
* @Date: 2022-06-21 16:01:19
|
|
|
|
|
* @LastEditors: ch
|
|
|
|
|
* @LastEditTime: 2022-06-29 10:20:40
|
|
|
|
|
* @LastEditTime: 2022-07-01 17:55:01
|
|
|
|
|
* @Description: file content
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
@ -19,7 +19,7 @@
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import {Debounce} from '@/common/utils';
|
|
|
|
|
import {Debounce, HandleApiError} from '@/common/utils';
|
|
|
|
|
import {ApiPutCommentUseful} from '@/common/api/comment'
|
|
|
|
|
export default {
|
|
|
|
|
props : {
|
|
|
|
@ -36,13 +36,18 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch :{
|
|
|
|
|
commentDetail (){
|
|
|
|
|
this.isLike = this.commentDetail.isLike;
|
|
|
|
|
this.usefulCount = this.commentDetail.usefulCount;
|
|
|
|
|
commentDetail :{
|
|
|
|
|
handler(){
|
|
|
|
|
this.isLike = this.commentDetail.isLike;
|
|
|
|
|
this.usefulCount = this.commentDetail.usefulCount;
|
|
|
|
|
},
|
|
|
|
|
deep:true
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted(){
|
|
|
|
|
this.isLike = this.commentDetail.isLike;
|
|
|
|
|
// console.log('---',this.isLike,this.commentDetail.usefulCount);
|
|
|
|
|
this.usefulCount = this.commentDetail.usefulCount;
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
@ -66,6 +71,7 @@ export default {
|
|
|
|
|
commentId : this.commentDetail.id,
|
|
|
|
|
isLike : this.isLike
|
|
|
|
|
});
|
|
|
|
|
HandleApiError(error);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|