Closed ec50n9 closed 9 months ago
让用户可以控制瀑布流中图片的比例。
例如:限制图片只能为3:4或者4:3
<Waterfall :list="dataList" :breakpoints="{ 1200: { rowPerView: 2 } }" :load-props="{ ratioCalculator: (width: number, height: number) => { let ratio = 1; if (width > height) ratio = 3 / 4; else if (width < height) ratio = 4 / 3; return ratio; }, }" > ... </Waterfall>
可以的 :)
让用户可以控制瀑布流中图片的比例。
例如:限制图片只能为3:4或者4:3