Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6e46cb65
authored
Jul 14, 2025
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
视频添加默认图,以及弹窗关闭视频播放
1 parent
6541adff
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
src/assets/video-default.png
src/views/contentManager/components/preview/index.vue
src/assets/video-default.png
0 → 100644
View file @
6e46cb6
6.56 KB
src/views/contentManager/components/preview/index.vue
View file @
6e46cb6
...
@@ -16,6 +16,10 @@
...
@@ -16,6 +16,10 @@
<video
id=
"video"
width=
"100%"
height=
"100%"
preload=
"none"
loop
muted
>
<video
id=
"video"
width=
"100%"
height=
"100%"
preload=
"none"
loop
muted
>
<source
:src=
"item"
type=
"video/mp4"
/>
<source
:src=
"item"
type=
"video/mp4"
/>
</video>
</video>
<img
class=
"video-poster"
src=
"../../../../assets/video-default.png"
/>
<div
class=
"mask"
>
<div
class=
"mask"
>
<div
<div
class=
"pic-pane-close"
class=
"pic-pane-close"
...
@@ -199,6 +203,20 @@ export default {
...
@@ -199,6 +203,20 @@ export default {
default
:
-
1
default
:
-
1
}
}
},
},
watch
:
{
dialogVisibleImg
(
val
)
{
if
(
!
val
)
{
// 关闭所有视频播放
const
videos
=
document
.
querySelectorAll
(
'.preVideo'
);
videos
.
forEach
(
video
=>
{
if
(
video
&&
!
video
.
paused
)
{
video
.
pause
();
video
.
currentTime
=
0
;
}
});
}
}
},
data
()
{
data
()
{
return
{
return
{
uploading
:
false
,
uploading
:
false
,
...
@@ -471,6 +489,16 @@ export default {
...
@@ -471,6 +489,16 @@ export default {
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
}
}
.video-poster
{
position
:
absolute
;
width
:
104px
;
height
:
104px
;
object-fit
:
fill
;
top
:
0
;
right
:
0
;
left
:
0
;
bottom
:
0
;
}
.mask
{
.mask
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment