Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 16b67659
authored
Sep 05, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
轻改三级详情组件
1 parent
b4786eb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
0 deletions
pages/boutique/components/Picture.vue
pages/boutique/components/Picture.vue
0 → 100644
View file @
16b6765
<
template
>
<view
class=
"picture"
v-show=
"!!detailUrl"
>
<image
class=
"detail-img"
:src=
"detailUrl"
mode=
"widthFix"
/>
<view
class=
"nav-bar"
v-show=
"isBack"
>
<view
class=
"back"
@
click=
"back"
>
<uni-icons
type=
"left"
:size=
"32"
></uni-icons>
</view>
</view>
</view>
</
template
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
name
:
'Picture'
,
props
:
{
imgUrl
:
{
type
:
String
,
default
:
''
,
},
isBack
:
{
type
:
Boolean
,
default
:
true
}
},
data
()
{
return
{
detailUrl
:
''
}
},
watch
:
{
imgUrl
(
val
)
{
this
.
detailUrl
=
val
}
},
methods
:
{
back
()
{
this
.
detailUrl
=
''
this
.
$emit
(
'back'
)
}
},
}
</
script
>
<
style
scoped
lang=
"scss"
>
.picture
{
font-size
:
0
;
position
:
absolute
;
top
:
0
;
width
:
100%
;
}
.nav-bar
{
position
:
fixed
;
width
:
100%
;
height
:
96
rpx
;
left
:
0
;
top
:
48
rpx
;
z-index
:
9
;
display
:
flex
;
align-items
:
center
;
.back
{
height
:
100%
;
aspect-ratio
:
1
/
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
position
:
absolute
;
}
.title
{
width
:
100%
;
text-align
:
center
;
}
}
.detail-img
{
width
:
100%
;
height
:
auto
;
object-fit
:
cover
;
}
</
style
>
\ No newline at end of file
\ No newline at end of file
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