| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 | // components/My_SupplyAndDemandItemBox/index.jsComponent({    options: {        addGlobalClass: true,        multipleSlots: true    },    /**     * 组件的属性列表     */    properties: {        title: {            type: String,            value: "标题"        },        time: {            type: String        },        imageList: {            type: Array,            value: []        },        stopOnShow: {            type: Function        },    },    /**     * 组件的初始数据     */    data: {        urls: [],    },    /**     * 组件的方法列表     */    methods: {        /* 预览图片 */        previewImage(e) {            let imageList = this.data.imageList,                urls = [];            for (let i = 0; i < imageList.length; i++) {                urls.push(imageList[i].fobsurl)            }            const {                index            } = e.currentTarget.dataset            wx.previewImage({                urls: urls,                current: index            })            setTimeout(() => {                this.triggerEvent('stopOnShow');            }, 100)        }    }})
 |