8b6c85656187b14e3b3a9a46ac0edc9edb941cd82b2c27d7b2ae88facac27f5e33acb4b0bd86a8066db67de647b13c9883ebfbfe74675f674873f7befd3428 778 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. export default {
  2. name: 'ElRow',
  3. componentName: 'ElRow',
  4. props: {
  5. tag: {
  6. type: String,
  7. default: 'div'
  8. },
  9. gutter: Number,
  10. type: String,
  11. justify: {
  12. type: String,
  13. default: 'start'
  14. },
  15. align: String
  16. },
  17. computed: {
  18. style() {
  19. const ret = {};
  20. if (this.gutter) {
  21. ret.marginLeft = `-${this.gutter / 2}px`;
  22. ret.marginRight = ret.marginLeft;
  23. }
  24. return ret;
  25. }
  26. },
  27. render(h) {
  28. return h(this.tag, {
  29. class: [
  30. 'el-row',
  31. this.justify !== 'start' ? `is-justify-${this.justify}` : '',
  32. this.align ? `is-align-${this.align}` : '',
  33. { 'el-row--flex': this.type === 'flex' }
  34. ],
  35. style: this.style
  36. }, this.$slots.default);
  37. }
  38. };