pad-app/wxcomponents/vant/dist/row/index.js

24 lines
560 B
JavaScript
Raw Normal View History

2023-07-03 17:49:29 +08:00
import { VantComponent } from '../common/component';
import { useChildren } from '../common/relation';
VantComponent({
relation: useChildren('col', function (target) {
const { gutter } = this.data;
if (gutter) {
target.setData({ gutter });
}
}),
props: {
gutter: {
type: Number,
observer: 'setGutter',
},
},
methods: {
setGutter() {
this.children.forEach((col) => {
col.setData(this.data);
});
},
},
});