// components/My_SupplyAndDemandItemBox/index.js Component({ options: { addGlobalClass: true, multipleSlots: true }, /** * 组件的属性列表 */ properties: { title: { type: String, value: "标题" }, time: { type: String }, imageList: { type: Array, value: ['/static/userImage.png', '/static/changeImg.png', "/static/login/identity.png", '/static/changeImg.png', "/static/login/identity.png"] } }, /** * 组件的初始数据 */ data: { }, /** * 组件的方法列表 */ methods: { /* 预览图片 */ previewImage(e) { const { index } = e.currentTarget.dataset wx.previewImage({ urls: this.data.imageList, current:index }) } } })