widget-fav.vue 637 Bytes
<template>
  <WidgetIconBtn ref="iconBtn" :fav-change="favChange" :type="type" :share="share" :text="num" :article-id="articleId" :comment-id="commentId" :option="option" :pos-id="posId"></WidgetIconBtn>
</template>

<script>
export default {
  name: 'WidgetFav',
  props: {
    num: [String, Number],
    articleId: Number,
    posId: Number,
    commentId: Number,
    option: Object,
    share: Boolean,
    favChange: {
      type: Boolean,
      default: false
    },
    type: {
      type: String,
      default: 'fav'
    }
  },
  methods: {
    click(animate) {
      this.$refs.iconBtn.onClick(animate);
    }
  }
};
</script>