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 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. 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; }; // Styles
  6. // Extensions
  7. // Mixins
  8. // Helpers
  9. require('../../../src/stylus/components/_cards.styl');
  10. var _VSheet = require('../VSheet');
  11. var _VSheet2 = _interopRequireDefault(_VSheet);
  12. var _routable = require('../../mixins/routable');
  13. var _routable2 = _interopRequireDefault(_routable);
  14. var _mixins = require('../../util/mixins');
  15. var _mixins2 = _interopRequireDefault(_mixins);
  16. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  17. /* @vue/component */
  18. exports.default = (0, _mixins2.default)(_routable2.default, _VSheet2.default).extend({
  19. name: 'v-card',
  20. props: {
  21. flat: Boolean,
  22. hover: Boolean,
  23. img: String,
  24. raised: Boolean
  25. },
  26. computed: {
  27. classes: function classes() {
  28. return _extends({
  29. 'v-card': true,
  30. 'v-card--flat': this.flat,
  31. 'v-card--hover': this.hover
  32. }, _VSheet2.default.options.computed.classes.call(this));
  33. },
  34. styles: function styles() {
  35. var style = _extends({}, _VSheet2.default.options.computed.styles.call(this));
  36. if (this.img) {
  37. style.background = 'url("' + this.img + '") center center / cover no-repeat';
  38. }
  39. return style;
  40. }
  41. },
  42. render: function render(h) {
  43. var _generateRouteLink = this.generateRouteLink(this.classes),
  44. tag = _generateRouteLink.tag,
  45. data = _generateRouteLink.data;
  46. data.style = this.styles;
  47. return h(tag, this.setBackgroundColor(this.color, data), this.$slots.default);
  48. }
  49. });
  50. //# sourceMappingURL=VCard.js.map