set flex amount correctly

This commit is contained in:
taehoon 2019-10-22 07:10:52 -04:00
parent ad04522206
commit b9c281c553

View file

@ -41,7 +41,7 @@ const Gallery = {
},
itemStyle (id, row) {
const total = sumBy(row, item => this.getAspectRatio(item.id))
return { flexGrow: this.getAspectRatio(id) / total }
return { flex: this.getAspectRatio(id) / total }
},
getAspectRatio (id) {
const size = this.sizes[id]