|
|
<template>
|
|
|
<div class="article-footer-wrapper">
|
|
|
<div class="tool-bar">
|
|
|
<WidgetIconBtn class="item" type="fav" :text="praiseCount" :option="option" @click="onZanClick"></WidgetIconBtn>
|
|
|
<WidgetIconBtn class="item" type="star" :text="favoriteCount" :option="option" @click="onFavClick"></WidgetIconBtn>
|
|
|
<WidgetIconBtn class="item" type="msg" :text="commentCount" :option="option" @click="onComment"></WidgetIconBtn>
|
|
|
<WidgetIconBtn class="item" type="fav" :text="praiseCount" :option="optionPraise" @click="onZanClick"></WidgetIconBtn>
|
|
|
<WidgetIconBtn class="item" type="star" :text="favoriteCount" :option="optionFav" @click="onFavClick"></WidgetIconBtn>
|
|
|
<WidgetIconBtn class="item" type="msg" :text="commentCount" :option="optionComment" @click="onComment"></WidgetIconBtn>
|
|
|
</div>
|
|
|
<div class="close ml20" @click="onClose">收起</div>
|
|
|
</div>
|
...
|
...
|
@@ -16,9 +16,17 @@ export default { |
|
|
props: ['favoriteCount', 'praiseCount', 'commentCount', 'hasFavor', 'hasPraise'],
|
|
|
data() {
|
|
|
return {
|
|
|
option: {
|
|
|
emitName: 'click'
|
|
|
}
|
|
|
optionPraise: {
|
|
|
emitName: 'click',
|
|
|
selected: this.hasPraise === 'Y'
|
|
|
},
|
|
|
optionFav: {
|
|
|
emitName: 'click',
|
|
|
selected: this.hasFavor === 'Y'
|
|
|
},
|
|
|
optionComment: {
|
|
|
emitName: 'click',
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
...
|
...
|
|