当前位置:网站首页>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
边栏推荐
猜你喜欢

【机器学习】基于多元时间序列对高考预测分析案例

Lecun predicts AgI: big model and reinforcement learning are both ramps! My "world model" is the new way

What plug-ins are available for vscade?

【NLP】今年英语高考,CMU用重构预训练交出134高分,大幅超越GPT3

加密潮流:时尚向元宇宙的进阶

Blue Bridge Cup - practice system login

Day_ ten

Go language - lock operation

Multiple decorators decorate a function

error Parsing error: Unexpected reserved word ‘await‘.
随机推荐
Day_ 04
Advanced SQL statement 1 of Linux MySQL database
This article will help you understand the common concepts, advantages and disadvantages of JWT
About the use of Aidl, complex data transmission
2021, committed to better development
Hash table, generic
Beginner bug set
根据先序遍历和中序遍历生成后序遍历
Catheon Gaming任命Activision Blizzard前亚太区负责人Mark Aubrey担任首席执行官
Android修行手册之Kotlin - 自定义View的几种写法
一行代码可以做什么?
Alvaria宣布客户体验行业资深人士Jeff Cotten担任新首席执行官
Bugly hot update usage
心樓:華為運動健康的七年築造之旅
Sleep formula: how to cure bad sleep?
mysql整体架构和语句的执行流程
What is backbone network
赫尔辛基交通安全改善项目部署Velodyne Lidar智能基础设施解决方案
GO语言-锁操作
error Parsing error: Unexpected reserved word ‘await‘.