Ohm-Management - Projektarbeit B-ME
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.

VCard.js 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  2. // Styles
  3. import '../../../src/stylus/components/_cards.styl';
  4. // Extensions
  5. import VSheet from '../VSheet';
  6. // Mixins
  7. import Routable from '../../mixins/routable';
  8. // Helpers
  9. import mixins from '../../util/mixins';
  10. /* @vue/component */
  11. export default mixins(Routable, VSheet).extend({
  12. name: 'v-card',
  13. props: {
  14. flat: Boolean,
  15. hover: Boolean,
  16. img: String,
  17. raised: Boolean
  18. },
  19. computed: {
  20. classes: function classes() {
  21. return _extends({
  22. 'v-card': true,
  23. 'v-card--flat': this.flat,
  24. 'v-card--hover': this.hover
  25. }, VSheet.options.computed.classes.call(this));
  26. },
  27. styles: function styles() {
  28. var style = _extends({}, VSheet.options.computed.styles.call(this));
  29. if (this.img) {
  30. style.background = 'url("' + this.img + '") center center / cover no-repeat';
  31. }
  32. return style;
  33. }
  34. },
  35. render: function render(h) {
  36. var _generateRouteLink = this.generateRouteLink(this.classes),
  37. tag = _generateRouteLink.tag,
  38. data = _generateRouteLink.data;
  39. data.style = this.styles;
  40. return h(tag, this.setBackgroundColor(this.color, data), this.$slots.default);
  41. }
  42. });
  43. //# sourceMappingURL=VCard.js.map