chore(视频号组件): 重构视频号组件,不单单是微信视频号

This commit is contained in:
2026-01-10 15:05:08 +08:00
parent 7f54666629
commit 6f6899deaa
9 changed files with 874 additions and 696 deletions

View 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>