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.
46 lines
1.1 KiB
46 lines
1.1 KiB
Component({
|
|
data: {
|
|
support: '../../../../images/ic_zhicihuise@2x.png',
|
|
supported: '../../../../images/ic_zhici@2x.png',
|
|
dispport: '../../../../images/ic_fanduihuise@2x.png',
|
|
dispported: '../../../../images/ic_fandu@2x.png'
|
|
},
|
|
properties: {
|
|
remarkObj: {
|
|
type: Object,
|
|
value: {}
|
|
},
|
|
remarkType: {
|
|
type: String,
|
|
value: 'new'
|
|
}
|
|
},
|
|
lifetimes: {
|
|
|
|
},
|
|
pageLifetimes: {
|
|
|
|
},
|
|
methods: {
|
|
// 对评论进行回复
|
|
replyRemark (e) {
|
|
this.triggerEvent('replyRemark', { commentId: e.currentTarget.dataset.commentid })
|
|
},
|
|
// 支持评论
|
|
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'})
|
|
}
|
|
}
|
|
}
|
|
})
|