当前位置:网站首页>uniapp实现图片(单张/多张)预览
uniapp实现图片(单张/多张)预览
2022-06-25 15:48:00 【天使的同类】
uniapp实现图片(单张/多张)预览
一、单张预览
getImgIndex(index) {
let imgs = this.temperatureData.map(item => {
return item.img
})
uni.previewImage({
urls: imgs,
current: index
})
},
二、多张预览
getImgIndex(index) {
this.imgArray = [];
this.imgArray = this.temperatureData[index].img
uni.previewImage({
current: 0, //当前为第几张
urls: this.imgArray,
indicator: 'number',
loop: true
});
},
效果图:
预览
We’re not put on this Earth to think of only ourselves
边栏推荐
- Day_ 05
- Swift responsive programming
- Problems caused by using ApplicationContext to render layout
- The database records are read through the system time under the Android system, causing the problem of incomplete Reading Records!
- 20省市公布元宇宙路线图
- What is the NFT digital collection?
- Day_ fourteen
- Data type variable operator
- AD域登录验证
- Don't underestimate the integral mall, its role can be great!
猜你喜欢

Read the configuration, explain the principle and read the interview questions. I can only help you here...

Reverse series to obtain any wechat applet code

Day_ eleven

Bombard the headquarters. Don't let a UI framework destroy you

Navicat premium 15 for MAC (database development tool) Chinese version

The third day of mysql45

iVX低代码平台系列详解 -- 概述篇(一)

The first day of reading mysql45

Dino: Detr with improved detecting anchor boxes for end to end object detection

10 Super VIM plug-ins, I can't put them down
随机推荐
Detailed explanation of IVX low code platform series -- Overview (I)
What processes are needed to build a wechat applet from scratch?
Day_ twelve
What can NFT metauniverse development do?
Process control and method
Xinlou: Huawei's seven-year building journey of sports health
心樓:華為運動健康的七年築造之旅
Unity技术手册 - 生命周期内大小(Size over Lifetime)和速度决定大小(Size by Speed)
绕过技术聊'跨端'......
JS add custom attributes to elements
普通人的2022春招总结(阿里、腾讯offer)
根据先序遍历和中序遍历生成后序遍历
GO语言-什么是临界资源安全问题?
加密潮流:时尚向元宇宙的进阶
Alvaria宣布客户体验行业资深人士Jeff Cotten担任新首席执行官
Describe your understanding of the evolution process and internal structure of the method area
Day_ fourteen
Catheon Gaming任命Activision Blizzard前亚太区负责人Mark Aubrey担任首席执行官
MySQL_ JDBC
After flutter was upgraded from 2.2.3 to 2.5, the compilation of mixed projects became slower