article-footer.vue 1.3 KB
<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>
    </div>
    <div class="close ml20">收起</div>
  </div>
</template>

<script>

export default {
  name: 'ArticleFooter',
  props: ['favoriteCount', 'praiseCount', 'commentCount', 'hasFavor', 'hasPraise'],
  data() {
    return {
      option: {
        emitName: 'click'
      }
    };
  },
  computed: {
  },
  methods: {
    onZanClick() {

    },
    onFavClick() {

    },
    onComment() {
      this.$emit('on-comment-click');
    }
  },
};
</script>

<style lang="scss" scoped>

.article-footer-wrapper {
  display: flex;
  height: 100px;
  border-top: 1px solid #e0e0e0;
  background-color: white;
}

.tool-bar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.close {
  width: 200px;
  color: white;
  font-size: 32px;
  line-height: 100px;
  background-color: #d0021b;
  text-align: center;
}

.ml20 {
  margin-left: 20px;
}

</style>