Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
67ae3d39
Commit
67ae3d39
authored
Jan 17, 2025
by
wuqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片展示
parent
8edcc9d1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
8 deletions
+23
-8
src/components/ImageView.vue
+20
-6
src/views/order/ProductInfo.vue
+3
-2
No files found.
src/components/ImageView.vue
View file @
67ae3d39
...
...
@@ -5,25 +5,39 @@
@
mouseover=
"(ev) => mouseoverImg(ev, src)"
@
mouseleave=
"mouseleaveImg"
>
<img
:src=
"src"
style=
"width: 30; height: 30px
"
/>
<img
:src=
"src"
:style=
"imageStyle
"
/>
</div>
</
template
>
<
script
setup
lang=
"ts"
>
import
useImagePreview
from
'@/utils/hooks/useImagePreview.'
defineProps
({
import
{
computed
,
defineProps
}
from
'vue'
const
props
=
defineProps
({
src
:
{
type
:
String
,
default
:
()
=>
''
,
},
width
:
{
type
:
String
,
default
:
()
=>
'30px'
,
},
height
:
{
type
:
String
,
default
:
()
=>
'30px'
,
},
})
const
imageStyle
=
computed
(()
=>
{
return
{
width
:
props
.
width
,
height
:
props
.
height
,
}
})
const
{
mouseoverImg
,
mouseleaveImg
}
=
useImagePreview
()
</
script
>
<
style
lang=
"scss"
scoped
>
.image-view
{
.image-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
cursor
:
pointer
cursor
:
pointer
;
}
</
style
>
</
style
>
src/views/order/ProductInfo.vue
View file @
67ae3d39
...
...
@@ -8,7 +8,8 @@
class=
"order-list-expand_item"
>
<div
class=
"order-list-expand_item_img"
>
<img
:src=
"item.variantImage"
style=
"width: 100%; height: 100%"
/>
<!--
<img
:src=
"item.variantImage"
style=
"width: 100%; height: 100%"
/>
-->
<ImageView
:src=
"item.variantImage"
width=
"98px"
height=
"98px"
/>
</div>
<div
class=
"order-list-expand_item_info"
>
<div
...
...
@@ -124,7 +125,6 @@
v-if=
"!isPod"
:title=
"item.material || ''"
class=
"order-list-expand_item_info_title"
>
<span
class=
"order-list-expand_item_label"
>
材质:
</span>
<span
class=
"order-list-expand_item_value"
...
...
@@ -214,6 +214,7 @@
</div>
</
template
>
<
script
setup
lang=
"ts"
>
import
ImageView
from
'@/components/ImageView.vue'
import
{
DocumentCopy
,
EditPen
}
from
'@element-plus/icons-vue'
import
{
filePath
}
from
'@/api/axios'
import
{
downloadOrder
}
from
'@/api/order'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment