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 3b1cd963
authored
Mar 26, 2026
by
yancanhua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 自测问题修改
1 parent
9ffb01a2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
27 deletions
apps/web/venus-usedcar-quality/src/components/CustomizeForm/buttonSelectAndImageUpload.vue
apps/web/venus-usedcar-quality/src/components/CustomizeForm/customizeUploadFile.vue
apps/web/venus-usedcar-quality/src/components/CustomizeForm/buttonSelectAndImageUpload.vue
View file @
3b1cd96
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
{
onMounted
,
computed
,
ref
}
from
"vue"
;
import
{
onMounted
,
computed
,
ref
}
from
"vue"
;
import
{
uploadFile
}
from
"@/utils/upload.js"
;
import
{
uploadFile
}
from
"@/utils/upload.js"
;
import
{
showToast
}
from
"vant"
;
import
{
showToast
}
from
"vant"
;
import
{
showImagePreview
}
from
'vant'
;
const
props
=
defineProps
({
const
props
=
defineProps
({
item
:
{
item
:
{
...
@@ -76,6 +76,11 @@ function updateData() {
...
@@ -76,6 +76,11 @@ function updateData() {
}
}
}
}
// 图片预览
function
previewImage
(
url
:
string
)
{
showImagePreview
([
url
]);
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -101,7 +106,7 @@ function updateData() {
...
@@ -101,7 +106,7 @@ function updateData() {
<div
class=
"deleteBox"
@
click=
"handleDelete(url)"
>
<div
class=
"deleteBox"
@
click=
"handleDelete(url)"
>
<van-icon
color=
"#999999"
name=
"clear"
size=
"20"
/>
<van-icon
color=
"#999999"
name=
"clear"
size=
"20"
/>
</div>
</div>
<van-image
height=
"96"
:src=
"url"
style=
"border-radius: 8px;"
width=
"96"
/>
<van-image
height=
"96"
:src=
"url"
@
click=
"previewImage(url)"
style=
"border-radius: 8px;"
width=
"96"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
apps/web/venus-usedcar-quality/src/components/CustomizeForm/customizeUploadFile.vue
View file @
3b1cd96
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
onMounted
,
computed
,
ref
}
from
"vue"
;
import
{
onMounted
,
computed
,
ref
}
from
"vue"
;
import
{
uploadFile
}
from
"@/utils/upload.js"
;
import
{
uploadFile
}
from
"@/utils/upload.js"
;
import
{
showToast
}
from
"vant"
;
import
{
showToast
}
from
"vant"
;
import
{
showImagePreview
}
from
'vant'
;
const
props
=
defineProps
({
const
props
=
defineProps
({
item
:
{
item
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{},
default
:
()
=>
{
},
},
},
});
});
...
@@ -80,6 +80,11 @@ function updateData() {
...
@@ -80,6 +80,11 @@ function updateData() {
}
}
}
}
// 图片预览
function
previewImage
(
url
:
string
)
{
showImagePreview
([
url
]);
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -94,35 +99,29 @@ function updateData() {
...
@@ -94,35 +99,29 @@ function updateData() {
有损伤请拍摄图片,无损伤请忽略
有损伤请拍摄图片,无损伤请忽略
</div>
</div>
</div>
</div>
<input
ref=
"fileInputRef"
<input
ref=
"fileInputRef"
:accept=
"item.interactionType == 'image_upload' ? 'image/*' : 'video/*'"
:accept=
"item.interactionType == 'image_upload' ? 'image/*' : 'video/*'"
class=
"hidden-input"
type=
"file"
@
change=
"onFileChange"
>
class=
"hidden-input"
type=
"file"
@
change=
"onFileChange"
>
<div
class=
"uploadPage"
>
<div
class=
"uploadPage"
>
<div
v-if=
"(validationRules.maxCount || 3) > pickerValue.length"
<div
v-if=
"(validationRules.maxCount || 3) > pickerValue.length"
class=
"uploadBox"
@
click=
"pickFile"
>
class=
"uploadBox"
<van-icon
class=
"plusBox"
color=
"#999999"
name=
"plus"
size=
"24"
/>
@
click=
"pickFile"
>
<van-icon
class=
"plusBox"
color=
"#999999"
name=
"plus"
size=
"24"
/>
<div
class=
"uploadTxt"
>
<div
class=
"uploadTxt"
>
{{
item
.
interactionType
==
'image_upload'
?
'添加照片'
:
'添加视频'
}}
{{
item
.
interactionType
==
'image_upload'
?
'添加照片'
:
'添加视频'
}}
</div>
</div>
</div>
</div>
<div
v-for=
"(url, index) in pickerValue"
<div
v-for=
"(url, index) in pickerValue"
:key=
"index"
class=
"uploadBox"
>
:key=
"index"
class=
"uploadBox"
>
<div
class=
"deleteBox"
@
click=
"handleDelete(url)"
>
<div
class=
"deleteBox"
@
click=
"handleDelete(url)"
>
<van-icon
color=
"#999999"
<van-icon
color=
"#999999"
name=
"clear"
size=
"20"
/>
name=
"clear"
size=
"20"
/>
</div>
</div>
<van-image
height=
"96"
:src=
"url"
<!-- 图片 -->
style=
"border-radius: 8px;"
<van-image
v-if=
"item.interactionType == 'image_upload'"
@
click=
"previewImage(url)"
height=
"96"
:src=
"url"
width=
"96"
/>
style=
"border-radius: 8px;height: 96px;width: 96px;"
width=
"96"
/>
<!-- 视频 -->
<video
width=
"96"
v-if=
"item.interactionType == 'video_upload'"
:src=
"url"
style=
"border-radius: 8px;height: 96px;width: 96px;"
controls
>
您的浏览器不支持 video 标签。
</video>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
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