fix(视频号组件): 整体控制是否显示观看次数没有生效
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
<!-- 视频号视频卡片,轮播模式 -->
|
<!-- 视频号视频卡片,轮播模式 -->
|
||||||
<diy-channel-video :value="item" @video-play="playVideo" :list-mode="true"
|
<diy-channel-video :value="item" @video-play="playVideo" :list-mode="true"
|
||||||
:title-line-clamp="value.titleLineClamp" :show-play-btn="value.showPlayBtn"
|
:title-line-clamp="value.titleLineClamp" :show-play-btn="value.showPlayBtn"
|
||||||
|
:show-view-count="value.showViewCount"
|
||||||
:cover-style="computedCoverStyle" :play-btn-style="value.playBtnStyle"
|
:cover-style="computedCoverStyle" :play-btn-style="value.playBtnStyle"
|
||||||
:aspect-ratio="value.aspectRatio" />
|
:aspect-ratio="value.aspectRatio" />
|
||||||
</view>
|
</view>
|
||||||
@@ -24,6 +25,7 @@
|
|||||||
<!-- 视频号视频卡片,列表模式 -->
|
<!-- 视频号视频卡片,列表模式 -->
|
||||||
<diy-channel-video :value="item" @video-play="playVideo" :list-mode="true"
|
<diy-channel-video :value="item" @video-play="playVideo" :list-mode="true"
|
||||||
:title-line-clamp="value.titleLineClamp" :show-play-btn="value.showPlayBtn"
|
:title-line-clamp="value.titleLineClamp" :show-play-btn="value.showPlayBtn"
|
||||||
|
:show-view-count="value.showViewCount"
|
||||||
:cover-style="computedCoverStyle" :play-btn-style="value.playBtnStyle"
|
:cover-style="computedCoverStyle" :play-btn-style="value.playBtnStyle"
|
||||||
:aspect-ratio="value.aspectRatio" />
|
:aspect-ratio="value.aspectRatio" />
|
||||||
</view>
|
</view>
|
||||||
@@ -38,6 +40,7 @@
|
|||||||
<!-- 视频号视频卡片,滚动模式 -->
|
<!-- 视频号视频卡片,滚动模式 -->
|
||||||
<diy-channel-video :value="item" @video-play="playVideo" :list-mode="true"
|
<diy-channel-video :value="item" @video-play="playVideo" :list-mode="true"
|
||||||
:title-line-clamp="value.titleLineClamp" :show-play-btn="value.showPlayBtn"
|
:title-line-clamp="value.titleLineClamp" :show-play-btn="value.showPlayBtn"
|
||||||
|
:show-view-count="value.showViewCount"
|
||||||
:cover-style="computedCoverStyle" :play-btn-style="value.playBtnStyle"
|
:cover-style="computedCoverStyle" :play-btn-style="value.playBtnStyle"
|
||||||
:aspect-ratio="value.aspectRatio" />
|
:aspect-ratio="value.aspectRatio" />
|
||||||
</view>
|
</view>
|
||||||
@@ -71,6 +74,7 @@ export default {
|
|||||||
* @property {number} topAroundRadius - 顶部圆角半径
|
* @property {number} topAroundRadius - 顶部圆角半径
|
||||||
* @property {number} bottomAroundRadius - 底部圆角半径
|
* @property {number} bottomAroundRadius - 底部圆角半径
|
||||||
* @property {Object} ornament - 装饰效果配置
|
* @property {Object} ornament - 装饰效果配置
|
||||||
|
* @property {boolean} showViewCount - 是否显示播放量,可选值:true, false
|
||||||
* @property {number} titleLineClamp - 标题显示行数
|
* @property {number} titleLineClamp - 标题显示行数
|
||||||
* @property {string} aspectRatio - 视频比例,可选值:16:9, 3:4
|
* @property {string} aspectRatio - 视频比例,可选值:16:9, 3:4
|
||||||
* @property {boolean} showPlayBtn - 是否显示播放按钮
|
* @property {boolean} showPlayBtn - 是否显示播放按钮
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<view class="video-title" :style="{ '--title-line-clamp': titleLineClamp }">{{ value.videoTitle }}
|
<view class="video-title" :style="{ '--title-line-clamp': titleLineClamp }">{{ value.videoTitle }}
|
||||||
</view>
|
</view>
|
||||||
<!-- 视频统计信息 -->
|
<!-- 视频统计信息 -->
|
||||||
<view class="video-stats" v-if="value.showViewCount">{{ value.viewCount }}次观看</view>
|
<view class="video-stats" v-if="showViewCount && value.showViewCount">{{ value.viewCount }}次观看</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<view class="channel-play-btn" v-if="showPlayBtn" :style="[playBtnStyle]">
|
<view class="channel-play-btn" v-if="showPlayBtn" :style="[playBtnStyle]">
|
||||||
<view class="play-icon-css"></view>
|
<view class="play-icon-css"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="video-stats-overlay" v-if="value.showViewCount">
|
<view class="video-stats-overlay" v-if="showViewCount && value.showViewCount">
|
||||||
{{ value.viewCount }}次观看
|
{{ value.viewCount }}次观看
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<view class="video-title" :style="{ '--title-line-clamp': titleLineClamp }">{{ value.videoTitle }}
|
<view class="video-title" :style="{ '--title-line-clamp': titleLineClamp }">{{ value.videoTitle }}
|
||||||
</view>
|
</view>
|
||||||
<!-- 视频统计信息,非列表模式下显示 -->
|
<!-- 视频统计信息,非列表模式下显示 -->
|
||||||
<view class="video-stats" v-if="value.showViewCount && !listMode">{{ value.viewCount }}次观看</view>
|
<view class="video-stats" v-if="showViewCount && value.showViewCount && !listMode">{{ value.viewCount }}次观看</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -80,6 +80,11 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
/** 是否显示观看次数,由父组件可以整体配置 */
|
||||||
|
showViewCount: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 标题显示行数
|
* 标题显示行数
|
||||||
* @type {number}
|
* @type {number}
|
||||||
|
|||||||
Reference in New Issue
Block a user