当前位置:网站首页>uniapp图片下方加标签标图片
uniapp图片下方加标签标图片
2022-06-30 07:17:00 【spring-java】
1、UI部分
<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部分
data() {
return {
workCertificate:[
{type:"上岗证",url:"https://cdn.uviewui.com/uview/album/1.jpg"},
{type:"上岗证",url:"https://cdn.uviewui.com/uview/album/2.jpg"},
{type:"上岗证",url:"https://cdn.uviewui.com/uview/album/3.jpg"},
{type:"上岗证",url:"https://cdn.uviewui.com/uview/album/4.jpg"},
{type:"上岗证",url:"https://cdn.uviewui.com/uview/album/5.jpg"},
{type:"上岗证",url:"https://cdn.uviewui.com/uview/album/6.jpg"},
]
}
},
//方法部分
imgPreview(index,picList) {
//预览图片
let urlList=[]
picList.forEach((value)=>{
urlList.push(value.url)
})
let that = this
uni.previewImage({
current: index,
urls: urlList
})
},
3、css部分
.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
}
边栏推荐
- Linux服务器安装Redis
- [most complete] install MySQL on a Linux server
- Utilisation de la commande grep
- Thread network
- 网络安全-三层交换技术和内部网络规划
- IDEA import导入的类明明存在,却飘红?
- All errors reported by NPM
- What does the real name free domain name mean?
- What if I don't know what to do after graduating from university?
- JS create PDF file
猜你喜欢

解决:div获取不到键盘事件

FreeRTOS timer group

【最全】linux服务器上安装Mysql

Introduction to go project directory structure

The most convenient serial port screen chip scheme designed at the charging pile in China

Pit stepping record: Supervisor log return information: redis extension is not installed

Network security - packet capture and IP packet header analysis

B站首个UP主付费观看视频还是来了!价格“劝退”网友

Egret P2 pit encountered by physical engine (1)

Write and run the first go language program
随机推荐
Network security - packet capture and IP packet header analysis
All errors reported by NPM
Resolution: div failed to get keyboard event
28 rounds of interviews with 10 companies in two and a half years
Idea shortcut key
QT generate random number qrandomgenerator
Egret P2 physical engine (1) small ball falling demo
Four great happenings on earth
2022年6月29日--使用C#迈出第一步--使用 C# 中的“if”、“else”和“else if”语句向代码添加决策逻辑
网络安全-三层交换技术和内部网络规划
QT common macro definitions
解决:div获取不到键盘事件
单测调用对象的私有方法
If I am in Zhuhai, where can I open an account? In addition, is it safe to open a mobile account?
[solved] failed! Error: Unknown error 1130
JS create PDF file
Swiftui creates a beautiful custom press feedback button
Golan common shortcut key settings
Starting MySQL ERROR! Couldn‘t find MySQL server (/usr/local/mysql/bin/mysqld_safe)
Detailed analysis of message signals occupying multiple bytes and bits