vant-weapp/dist/col/index.js
2018-12-19 16:54:07 +08:00

26 lines
517 B
JavaScript

import { VantComponent } from '../common/component';
VantComponent({
relation: {
name: 'row',
type: 'ancestor'
},
props: {
span: Number,
offset: Number
},
data: {
style: ''
},
methods: {
setGutter: function setGutter(gutter) {
var padding = gutter / 2 + "px";
var style = gutter ? "padding-left: " + padding + "; padding-right: " + padding + ";" : '';
if (style !== this.data.style) {
this.set({
style: style
});
}
}
}
});