vant-weapp/lib/col/index.js
2020-02-24 09:50:40 +08:00

27 lines
705 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var component_1 = require("../common/component");
component_1.VantComponent({
relation: {
name: 'row',
type: 'ancestor',
current: 'col',
},
props: {
span: Number,
offset: Number
},
data: {
viewStyle: ''
},
methods: {
setGutter: function (gutter) {
var padding = gutter / 2 + "px";
var viewStyle = gutter ? "padding-left: " + padding + "; padding-right: " + padding + ";" : '';
if (viewStyle !== this.data.viewStyle) {
this.setData({ viewStyle: viewStyle });
}
}
}
});