widget-follow.vue
645 Bytes
<template>
<button class="btn-follow hover-opacity" v-if="!followed">关注</button>
<button class="btn-follow followed hover-opacity" v-else>已关注</button>
</template>
<script>
export default {
name: 'WidgetFollow',
props: {
authorUid: Number,
followed: Boolean
}
};
</script>
<style lang="scss" scoped>
.btn-follow {
width: 120px;
height: 50px;
padding: 0;
font-size: 26px;
border-radius: 3PX;
background-color: #222;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
&.followed {
border: solid 1px #4a4a4a;
background-color: #fff;
color: #000;
}
}
</style>