当前位置:网站首页>Label the picture below the uniapp picture
Label the picture below the uniapp picture
2022-06-30 07:24:00 【spring-java】
1、UI part
<view class="view-box" v-for="(item,index) in workCertificate" :key="index">
<image class="icon" :src="item.url" @click="imgPreview(index,workCertificate)"></image>
<text class="title">{
{item.type}}</text>
</view>
2、js part
data() {
return {
workCertificate:[
{type:" Work license ",url:"https://cdn.uviewui.com/uview/album/1.jpg"},
{type:" Work license ",url:"https://cdn.uviewui.com/uview/album/2.jpg"},
{type:" Work license ",url:"https://cdn.uviewui.com/uview/album/3.jpg"},
{type:" Work license ",url:"https://cdn.uviewui.com/uview/album/4.jpg"},
{type:" Work license ",url:"https://cdn.uviewui.com/uview/album/5.jpg"},
{type:" Work license ",url:"https://cdn.uviewui.com/uview/album/6.jpg"},
]
}
},
// Method section
imgPreview(index,picList) {
// The preview image
let urlList=[]
picList.forEach((value)=>{
urlList.push(value.url)
})
let that = this
uni.previewImage({
current: index,
urls: urlList
})
},
3、css part
.view-box {
display: flex;
flex-direction: column;
justify-content: left;
align-items: left;
background-color: #fff;
float: left;
padding: 15rpx;
}
.icon {
width: 30vw;
height: 30vw;
}
.title {
margin-top: -45rpx;
width: 30vw;
font-size: 20upx;
background-color: rgba(128,128,128,0.5);
z-index:999;
color: #ffffff;
text-align:center
}
边栏推荐
猜你喜欢
随机推荐
实验一、综合实验【Process on】
Starting MySQL ERROR! Couldn‘t find MySQL server (/usr/local/mysql/bin/mysqld_safe)
Network security - detailed explanation of VLAN and tunk methods
Qtcreator debug code after configuring CDB debugger view variable value display card
All errors reported by NPM
Pool de Threads - langage C
Record the problem that the system file cannot be modified as an administrator during the development process
B站首个UP主付费观看视频还是来了!价格“劝退”网友
1285_ Expand macros defined by AUTOSAR functions and variables with scripts to improve readability
Linux服務器安裝Redis
我今年毕业,但我不知道我要做什么
Binary tree traversal
Matter protocol
【最全】linux服务器上安装Mysql
Qdebug small details
[resolved] error 1290 (HY000): unknown error 1290
How to use string branches for switch case
【已实现】服务器jar包启动脚本、shell脚本
网络安全-单臂路由、DHCP中继和ICMP协议
MySQL encounters the problem of expression 1 of select list is not in group by claim and contains nonaggre