chore(视频号组件): 重构视频号组件,不单单是微信视频号
This commit is contained in:
45
components-diy/diy-channel-header.vue
Normal file
45
components-diy/diy-channel-header.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<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'
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
import { wechatChannelConfig } from './js/wechat-channel.js'
|
||||
// #endif
|
||||
export default {
|
||||
name: 'diy-channel-header',
|
||||
props: {
|
||||
value: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
mixins: [DiyMinx],
|
||||
computed: {
|
||||
arrowIcon() {
|
||||
// #ifdef MP-WEIXIN
|
||||
return wechatChannelConfig.icon.channelArrow
|
||||
// #endif
|
||||
return ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handlerClick() {
|
||||
this.$emit('header-tap', this.value);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import './css/common-channel.scss';
|
||||
</style>
|
||||
Reference in New Issue
Block a user