index.js 652 B

12345678910111213141516171819202122232425
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var component_1 = require("../common/component");
  4. component_1.VantComponent({
  5. relation: {
  6. name: 'row',
  7. type: 'ancestor'
  8. },
  9. props: {
  10. span: Number,
  11. offset: Number
  12. },
  13. data: {
  14. style: ''
  15. },
  16. methods: {
  17. setGutter: function (gutter) {
  18. var padding = gutter / 2 + "px";
  19. var style = gutter ? "padding-left: " + padding + "; padding-right: " + padding + ";" : '';
  20. if (style !== this.data.style) {
  21. this.set({ style: style });
  22. }
  23. }
  24. }
  25. });