You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.3 KiB
54 lines
1.3 KiB
5 years ago
|
Component({
|
||
|
data: {
|
||
|
support: '../../../../images/smallgoodhui.png',
|
||
|
supported: '../../../../images/smallgoodliang.png',
|
||
|
dispport: '../../../../images/smallbadhui.png',
|
||
|
dispported: '../../../../images/smallbadliang.png'
|
||
|
},
|
||
|
properties: {
|
||
|
topList: {
|
||
|
type: Object
|
||
|
},
|
||
|
remarkType: {
|
||
|
type: String,
|
||
|
value: 'new'
|
||
|
},
|
||
|
commentList: {
|
||
|
type: Array
|
||
|
},
|
||
|
isShowDetailRemark: {
|
||
|
type: Boolean
|
||
|
},
|
||
|
topicId:{
|
||
|
type:String
|
||
|
}
|
||
|
},
|
||
|
lifetimes: {
|
||
|
|
||
|
},
|
||
|
pageLifetimes: {
|
||
|
|
||
|
},
|
||
|
methods: {
|
||
|
// 对评论进行回复
|
||
|
replyRemark(e: any) {
|
||
|
this.triggerEvent('replyRemark', { type: 'replay', commentId: e.currentTarget.dataset.commentid ,topicId:e.currentTarget.dataset.topicid})
|
||
|
},
|
||
|
// 支持评论
|
||
|
supportRemark(e) {
|
||
|
this.triggerEvent('supportRemark', { commentId: e.currentTarget.dataset.commentid })
|
||
|
},
|
||
|
// 反对 评论
|
||
|
dispportRemark(e) {
|
||
|
this.triggerEvent('dispportRemark', { commentId: e.currentTarget.dataset.commentid })
|
||
|
},
|
||
|
// 最新最热 切换
|
||
|
changeRemarkType() {
|
||
|
if (this.data.remarkType === 'new') {
|
||
|
this.triggerEvent('changeRemarkType', { type: 'hot' })
|
||
|
} else {
|
||
|
this.triggerEvent('changeRemarkType', { type: 'new' })
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
})
|