1
0
mirror of https://gitee.com/vant-contrib/vant-weapp.git synced 2025-04-06 03:58:05 +08:00

[bugfix] Layout: gutter not work when dynamic render ()

This commit is contained in:
neverland 2018-09-08 10:52:28 +08:00 committed by GitHub
parent 737441db38
commit 743001a8ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 4 deletions
dist/row
packages/row

12
dist/row/index.js vendored

@ -3,7 +3,13 @@ import { create } from '../common/create';
create({ create({
relations: { relations: {
'../col/index': { '../col/index': {
type: 'descendant' type: 'descendant',
linked(target) {
if (this.data.gutter) {
target.setGutter(this.data.gutter);
}
}
} }
}, },
@ -15,7 +21,9 @@ create({
}, },
ready() { ready() {
this.setGutter(); if (this.data.gutter) {
this.setGutter();
}
}, },
methods: { methods: {

@ -3,7 +3,13 @@ import { create } from '../common/create';
create({ create({
relations: { relations: {
'../col/index': { '../col/index': {
type: 'descendant' type: 'descendant',
linked(target) {
if (this.data.gutter) {
target.setGutter(this.data.gutter);
}
}
} }
}, },
@ -15,7 +21,9 @@ create({
}, },
ready() { ready() {
this.setGutter(); if (this.data.gutter) {
this.setGutter();
}
}, },
methods: { methods: {