widget-share.vue
509 Bytes
<template>
<WidgetIconBtn v-if="canShow" type="share" :text="num" :option="selfOption"></WidgetIconBtn>
</template>
<script>
import {mapState} from 'vuex';
export default {
name: 'WidgetShare',
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>