Files
lucky_shop/components-diy/diy-channel-header.vue

41 lines
935 B
Vue

<template>
<view class="channel-header" @tap="handlerClick">
<image class="channel-avatar" :src="$util.img(value.avatarUrl)" mode="aspectFill"></image>
<view class="channel-info">
<view class="channel-name">{{ value.channelName }}</view>
<view class="channel-follow" v-if="value.showFollow">关注</view>
</view>
<image class="channel-arrow" v-if="arrowIcon" :src="$util.img(arrowIcon)" mode="aspectFill"></image>
</view>
</template>
<script>
import DiyMinx from './minx.js'
import { wechatChannelConfig } from './js/wechat-channel.js'
export default {
name: 'diy-channel-header',
props: {
value: {
type: Object,
required: true
}
},
mixins: [DiyMinx],
computed: {
arrowIcon() {
return wechatChannelConfig.icon.channelArrow
}
},
methods: {
handlerClick() {
this.$emit('header-tap', this.value);
}
}
};
</script>
<style scoped lang="scss">
@import './css/common-channel.scss';
</style>