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.

32 lines
588 B

Component({
options: {
addGlobalClass: true,
},
properties: {
data: {
type: Object,
observer(data) {
if (!data) {
return;
}
this.setData({ modelList: data });
},
},
},
data: {
modelList: [],
},
methods: {
bigImgClick(e) {
const { index } = e.currentTarget.dataset;
this.triggerEvent('bigImgClick', { ...e.detail, index });
},
smallImgClick(e) {
const { index } = e.currentTarget.dataset;
this.triggerEvent('smallImgClick', { ...e.detail, index });
},
},
});