Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-04-25 15:33:49 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9ff2443c11040c5ff811f0019dffceae76a10012
9ff2443c
1 parent
709d6368
✨ feat(视频控件): 样式细节调整,播放全屏播放问题
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
9 deletions
src/components/VideoCard/index.vue
src/components/VideoCard/index.vue
View file @
9ff2443
<template>
<div
style="margin: 1rem; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.13);">
<div :id="'mui-player-' + item.case_id" style="border-top-left-radius: 5px; border-top-right-radius: 5px;"></div>
<div style="color: #713610; padding: 1rem; padding-bottom: 0.5rem;">
<div class="video-wrapper">
<div class="video-div" :id="'mui-player-' + item.case_id"></div>
<div class="video-bar">
<van-row>
<van-col span="12">
<van-col span="12"
@click="goTo"
>
<van-image round width="2rem" height="2rem" style="vertical-align: bottom;"
src="https://cdn.jsdelivr.net/npm/@vant/assets/cat.jpeg" />
<span style="font-size: 1.05rem;">王忆慈</span>
</van-col>
<van-col span="12">
<div style="padding: 0.25rem; padding-top: 0.75rem; text-align: right;">
<span @click="setComm
i
t">
<span @click="setComm
en
t">
<van-icon :name="icon_liuyan" size="1.2rem" style="vertical-align: bottom;" />
67
</span>
...
...
@@ -25,7 +24,7 @@
</van-col>
</van-row>
</div>
<div style="color: #999999; padding: 0px 1rem 0.5rem;">杨浦民办科技幼稚园 | 藏语</div>
<div
@click="goTo"
style="color: #999999; padding: 0px 1rem 0.5rem;">杨浦民办科技幼稚园 | 藏语</div>
</div>
</template>
...
...
@@ -39,6 +38,16 @@ import 'mui-player/dist/mui-player.min.css'
import MuiPlayer from 'mui-player'
import _ from 'lodash';
import { useRoute, useRouter } from 'vue-router'
const $route = useRoute();
const $router = useRouter();
const goTo = () => { // 跳转作品详情页
$router.push({
path: '/client/videoDetail'
});
}
onMounted(() => {
})
...
...
@@ -60,7 +69,12 @@ export default {
title: this.item.title,
src: this.item.video.url,
poster: this.item.cover.url,
autoFit: false
autoFit: false,
videoAttribute: [ // 声明启用同层播放, 不让会自动全屏播放
{attrKey:'webkit-playsinline',attrValue:'webkit-playsinline'},
{attrKey:'playsinline',attrValue:'playsinline'},
{attrKey:'x5-video-player-type',attrValue:'h5-page'},
]
})
this.detail = _.cloneDeep(this.item)
},
...
...
@@ -68,7 +82,7 @@ export default {
setLike() {
this.detail.liked = !this.detail.liked
},
setComm
i
t() {
setComm
en
t() {
console.warn('跳转详情页,移动到留言页');
console.warn(this.detail.case_id);
}
...
...
@@ -77,4 +91,19 @@ export default {
</script>
<style lang="less" scoped>
.video-wrapper {
margin: 1rem;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.13);
.video-div {
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
.video-bar {
color: #713610;
padding: 1rem;
padding-bottom: 0.5rem;
}
}
</style>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment