fix: set marginTop when has gutter (#2047)

This commit is contained in:
ShuaiKang Zhang 2019-09-18 17:14:49 +08:00 committed by neverland
parent d249bdcce9
commit 12862bebbc

View File

@ -41,11 +41,11 @@ VantComponent({
if (gutter) {
styleWrapper.push(`padding-right: ${gutter}px`);
}
const index = children.indexOf(this);
if (index >= columnNum) {
styleWrapper.push(`margin-top: ${gutter}px`);
const index = children.indexOf(this);
if (index >= columnNum) {
styleWrapper.push(`margin-top: ${gutter}px`);
}
}
this.setData({