index.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.default = void 0;
  4. var _utils = require("../utils");
  5. var _constant = require("../utils/constant");
  6. var _relation = require("../mixins/relation");
  7. var _createNamespace = (0, _utils.createNamespace)('grid'),
  8. createComponent = _createNamespace[0],
  9. bem = _createNamespace[1];
  10. var _default = createComponent({
  11. mixins: [(0, _relation.ParentMixin)('vanGrid')],
  12. props: {
  13. square: Boolean,
  14. gutter: [Number, String],
  15. iconSize: [Number, String],
  16. direction: String,
  17. clickable: Boolean,
  18. columnNum: {
  19. type: [Number, String],
  20. default: 4
  21. },
  22. center: {
  23. type: Boolean,
  24. default: true
  25. },
  26. border: {
  27. type: Boolean,
  28. default: true
  29. }
  30. },
  31. computed: {
  32. style: function style() {
  33. var gutter = this.gutter;
  34. if (gutter) {
  35. return {
  36. paddingLeft: (0, _utils.addUnit)(gutter)
  37. };
  38. }
  39. }
  40. },
  41. render: function render() {
  42. var _ref;
  43. var h = arguments[0];
  44. return h("div", {
  45. "style": this.style,
  46. "class": [bem(), (_ref = {}, _ref[_constant.BORDER_TOP] = this.border && !this.gutter, _ref)]
  47. }, [this.slots()]);
  48. }
  49. });
  50. exports.default = _default;