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.

VBadge.js 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. require('../../../src/stylus/components/_badges.styl');
  6. var _colorable = require('../../mixins/colorable');
  7. var _colorable2 = _interopRequireDefault(_colorable);
  8. var _toggleable = require('../../mixins/toggleable');
  9. var _toggleable2 = _interopRequireDefault(_toggleable);
  10. var _positionable = require('../../mixins/positionable');
  11. var _transitionable = require('../../mixins/transitionable');
  12. var _transitionable2 = _interopRequireDefault(_transitionable);
  13. var _mixins = require('../../util/mixins');
  14. var _mixins2 = _interopRequireDefault(_mixins);
  15. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  16. // Styles
  17. exports.default = (0, _mixins2.default)(_colorable2.default, _toggleable2.default, (0, _positionable.factory)(['left', 'bottom']), _transitionable2.default
  18. /* @vue/component */
  19. ).extend({
  20. name: 'v-badge',
  21. props: {
  22. color: {
  23. type: String,
  24. default: 'primary'
  25. },
  26. overlap: Boolean,
  27. transition: {
  28. type: String,
  29. default: 'fab-transition'
  30. },
  31. value: {
  32. default: true
  33. }
  34. },
  35. computed: {
  36. classes: function classes() {
  37. return {
  38. 'v-badge--bottom': this.bottom,
  39. 'v-badge--left': this.left,
  40. 'v-badge--overlap': this.overlap
  41. };
  42. }
  43. },
  44. render: function render(h) {
  45. var badge = this.$slots.badge && [h('span', this.setBackgroundColor(this.color, {
  46. staticClass: 'v-badge__badge',
  47. attrs: this.$attrs,
  48. directives: [{
  49. name: 'show',
  50. value: this.isActive
  51. }]
  52. }), this.$slots.badge)];
  53. return h('span', {
  54. staticClass: 'v-badge',
  55. 'class': this.classes
  56. }, [this.$slots.default, h('transition', {
  57. props: {
  58. name: this.transition,
  59. origin: this.origin,
  60. mode: this.mode
  61. }
  62. }, badge)]);
  63. }
  64. });
  65. // Mixins
  66. //# sourceMappingURL=VBadge.js.map