widget-share-author.vue
519 Bytes
<template>
<WidgetIconBtn v-if="canShow" type="shareAuthor" :text="num" :option="selfOption"></WidgetIconBtn>
</template>
<script>
import {mapState} from 'vuex';
export default {
name: 'WidgetShareAuthor',
props: {
num: [String, Number],
option: Object
},
computed: {
...mapState(['yoho']),
canShow() {
return this.yoho.context.env.isYohoBuy;
},
selfOption() {
let option = this.option || {};
option.canSelect = false;
return option;
}
}
};
</script>