deguodaigou/utils/dist/col/index.js

24 lines
546 B
JavaScript
Raw Normal View History

2019-12-14 09:20:48 +08:00
import { VantComponent } from '../common/component';
VantComponent({
relation: {
name: 'row',
type: 'ancestor'
},
props: {
span: Number,
offset: Number
},
data: {
style: ''
},
methods: {
setGutter(gutter) {
const padding = `${gutter / 2}px`;
const style = gutter ? `padding-left: ${padding}; padding-right: ${padding};` : '';
if (style !== this.data.style) {
this.setData({ style });
}
}
}
});