You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.2 KiB
59 lines
1.2 KiB
"use strict";
|
|
|
|
exports.__esModule = true;
|
|
exports.default = void 0;
|
|
|
|
var _utils = require("../utils");
|
|
|
|
var _constant = require("../utils/constant");
|
|
|
|
var _relation = require("../mixins/relation");
|
|
|
|
var _createNamespace = (0, _utils.createNamespace)('grid'),
|
|
createComponent = _createNamespace[0],
|
|
bem = _createNamespace[1];
|
|
|
|
var _default = createComponent({
|
|
mixins: [(0, _relation.ParentMixin)('vanGrid')],
|
|
props: {
|
|
square: Boolean,
|
|
gutter: [Number, String],
|
|
iconSize: [Number, String],
|
|
direction: String,
|
|
clickable: Boolean,
|
|
columnNum: {
|
|
type: [Number, String],
|
|
default: 4
|
|
},
|
|
center: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
border: {
|
|
type: Boolean,
|
|
default: true
|
|
}
|
|
},
|
|
computed: {
|
|
style: function style() {
|
|
var gutter = this.gutter;
|
|
|
|
if (gutter) {
|
|
return {
|
|
paddingLeft: (0, _utils.addUnit)(gutter)
|
|
};
|
|
}
|
|
}
|
|
},
|
|
render: function render() {
|
|
var _ref;
|
|
|
|
var h = arguments[0];
|
|
return h("div", {
|
|
"style": this.style,
|
|
"class": [bem(), (_ref = {}, _ref[_constant.BORDER_TOP] = this.border && !this.gutter, _ref)]
|
|
}, [this.slots()]);
|
|
}
|
|
});
|
|
|
|
exports.default = _default; |