// 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}) } } }, /** * 组件的初始数据 */ data: { dataSource: {}, imageList: [] }, /** * 组件的方法列表 */ methods: { } })