Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
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 1e99a8b3
authored
Apr 07, 2026
by
yancanhua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 视频播放优化
1 parent
6e977361
Pipeline
#184
for
1e99a8b3
failed
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
apps/web/venus-usedcar-quality/src/components/CustomizeForm/customizeUploadFile.vue
apps/web/venus-usedcar-quality/src/components/CustomizeForm/customizeUploadFile.vue
View file @
1e99a8b
...
@@ -77,6 +77,11 @@ async function onFileChange(ev: Event) {
...
@@ -77,6 +77,11 @@ async function onFileChange(ev: Event) {
function
handleDelete
(
item
:
string
)
{
function
handleDelete
(
item
:
string
)
{
pickerValue
.
value
=
pickerValue
.
value
.
filter
((
i
)
=>
i
!==
item
);
pickerValue
.
value
=
pickerValue
.
value
.
filter
((
i
)
=>
i
!==
item
);
console
.
log
(
"pickerValue.value111111111111111"
,
pickerValue
.
value
);
// 清除视频预览状态,防止缓存
sourceSrcUrl
.
value
=
""
;
sourceUrl
.
value
=
[];
videoShow
.
value
=
false
;
updateData
();
updateData
();
}
}
...
@@ -100,9 +105,15 @@ function previewImage(url: string) {
...
@@ -100,9 +105,15 @@ function previewImage(url: string) {
// 视频预览
// 视频预览
const
videoShow
=
ref
(
false
);
const
videoShow
=
ref
(
false
);
const
sourceUrl
=
ref
([]);
const
sourceUrl
=
ref
([]);
const
sourceSrcUrl
=
ref
(
""
);
function
previewVideo
(
url
:
string
)
{
function
previewVideo
(
url
:
string
)
{
sourceUrl
.
value
=
[
url
];
// 添加时间戳参数,防止浏览器缓存
const
timestamp
=
new
Date
().
getTime
();
const
urlWithTimestamp
=
url
.
includes
(
'?'
)
?
`
${
url
}
&t=
${
timestamp
}
`
:
`
${
url
}
?t=
${
timestamp
}
`
;
sourceSrcUrl
.
value
=
urlWithTimestamp
;
sourceUrl
.
value
=
[
urlWithTimestamp
];
console
.
log
(
"sourceUrl.value"
,
sourceUrl
.
value
);
console
.
log
(
"sourceUrl.value"
,
sourceUrl
.
value
);
videoShow
.
value
=
true
;
videoShow
.
value
=
true
;
}
}
...
@@ -124,7 +135,7 @@ function previewVideo(url: string) {
...
@@ -124,7 +135,7 @@ function previewVideo(url: string) {
</van-overlay>
</van-overlay>
<!-- 图片预览 -->
<!-- 图片预览 -->
<van-image-preview
v-model:show=
"imagePreview"
:images=
"previewImagesList"
></van-image-preview>
<van-image-preview
v-model:show=
"imagePreview"
:
closeable=
"true"
:close-on-click-image=
"false"
:
images=
"previewImagesList"
></van-image-preview>
<!-- 视频预览 -->
<!-- 视频预览 -->
<van-image-preview
v-model:show=
"videoShow"
<van-image-preview
v-model:show=
"videoShow"
...
@@ -133,7 +144,7 @@ function previewVideo(url: string) {
...
@@ -133,7 +144,7 @@ function previewVideo(url: string) {
:images=
"sourceUrl"
>
:images=
"sourceUrl"
>
<template
#
image=
"
{ src }">
<template
#
image=
"
{ src }">
<video
controls
style=
"width: 100%;"
>
<video
controls
style=
"width: 100%;"
>
<source
:src=
"s
rc
"
/>
<source
:src=
"s
ourceSrcUrl
"
/>
</video>
</video>
</
template
>
</
template
>
</van-image-preview>
</van-image-preview>
...
@@ -178,10 +189,8 @@ function previewVideo(url: string) {
...
@@ -178,10 +189,8 @@ function previewVideo(url: string) {
<!-- 图片 -->
<!-- 图片 -->
<van-image
v-if=
"item.interactionType == 'image_upload'"
<van-image
v-if=
"item.interactionType == 'image_upload'"
class=
"uploadBoxImg"
class=
"uploadBoxImg"
height=
"96"
radius=
"8px"
radius=
"8px"
:src=
"url"
:src=
"url"
width=
"96"
@
click=
"previewImage(url)"
/>
@
click=
"previewImage(url)"
/>
<!-- 视频 -->
<!-- 视频 -->
<video
v-if=
"item.interactionType == 'video_upload'"
<video
v-if=
"item.interactionType == 'video_upload'"
...
@@ -263,12 +272,14 @@ function previewVideo(url: string) {
...
@@ -263,12 +272,14 @@ function previewVideo(url: string) {
margin-right
:
12px
;
margin-right
:
12px
;
margin-bottom
:
16px
;
margin-bottom
:
16px
;
background
:
#f9f9f9
;
background
:
#f9f9f9
;
border
:
1px
solid
#f9f9f9
;
border-radius
:
8px
;
border-radius
:
8px
;
}
}
.uploadBoxImg
{
.uploadBoxImg
{
width
:
96px
;
width
:
100%
;
height
:
96px
;
height
:
100%
;
z-index
:
9
;
border-radius
:
8px
;
border-radius
:
8px
;
}
}
...
...
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