You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.0 KiB
49 lines
1.0 KiB
5 years ago
|
// components/event/itemProcessList/itemProcessList.js
|
||
|
Component({
|
||
|
/**
|
||
|
* 组件的属性列表
|
||
|
*/
|
||
|
properties: {
|
||
|
processList: {
|
||
|
type: Object,
|
||
|
value: {}
|
||
|
}
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 组件的初始数据
|
||
|
*/
|
||
|
data: {
|
||
|
imgList:[],
|
||
|
isShow: false, //控制收起展开
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 组件的方法列表
|
||
|
*/
|
||
|
methods: {
|
||
|
//预览图片,放大预览
|
||
|
preview(event) {
|
||
|
let currentUrl = event.currentTarget.dataset.src
|
||
|
let id = event.currentTarget.dataset.id
|
||
|
for (var i = 0; i < this.data.processList.length; i++) {
|
||
|
if (id == this.data.processList[i].id){
|
||
|
this.setData({
|
||
|
imgList: this.data.processList[i].images
|
||
|
})
|
||
|
|
||
|
}
|
||
|
}
|
||
|
wx.previewImage({
|
||
|
current: currentUrl, // 当前显示图片的http链接=
|
||
|
urls: this.data.imgList // 需要预览的图片http链接列表
|
||
|
})
|
||
|
},
|
||
|
toChange: function () {
|
||
|
let that = this;
|
||
|
that.setData({
|
||
|
isShow: !that.data.isShow
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
})
|