prevention/components/ImageInfo/index.js

45 lines
960 B
JavaScript

// components/ImageInfo/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
data: {
type: Object,
value: {}
}
},
observers: {
data(value) {
if(Object.keys(this.properties.data).length) {
this.setData({dataSource: this.properties.data})
let list = this.properties.data.registerFlowmanVoList || []
let arr = []
if(list.length > 0) {
list.forEach(item=> {
if(item.imageUrl) {
arr.push(item.imageUrl)
}
})
}
this.setData({imageList: arr})
}
}
},
/**
* 组件的初始数据
*/
data: {
dataSource: {},
imageList: []
},
/**
* 组件的方法列表
*/
methods: {
}
})