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.

VItem.js 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _groupable = require('../../mixins/groupable');
  6. var _mixins = require('../../util/mixins');
  7. var _mixins2 = _interopRequireDefault(_mixins);
  8. var _console = require('../../util/console');
  9. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } // Mixins
  11. // Utilities
  12. exports.default = (0, _mixins2.default)((0, _groupable.factory)('itemGroup', 'v-item', 'v-item-group')
  13. /* @vue/component */
  14. ).extend({
  15. name: 'v-item',
  16. props: {
  17. value: {
  18. required: false
  19. }
  20. },
  21. render: function render() {
  22. if (!this.$scopedSlots.default) {
  23. (0, _console.consoleWarn)('v-item is missing a default scopedSlot', this);
  24. return null;
  25. }
  26. var element = void 0;
  27. /* istanbul ignore else */
  28. if (this.$scopedSlots.default) {
  29. element = this.$scopedSlots.default({
  30. active: this.isActive,
  31. toggle: this.toggle
  32. });
  33. }
  34. if (Array.isArray(element) && element.length === 1) {
  35. element = element[0];
  36. }
  37. if (!element || Array.isArray(element) || !element.tag) {
  38. (0, _console.consoleWarn)('v-item should only contain a single element', this);
  39. return element;
  40. }
  41. element.data = this._b(element.data || {}, element.tag, {
  42. class: _defineProperty({}, this.activeClass, this.isActive)
  43. });
  44. return element;
  45. }
  46. });
  47. //# sourceMappingURL=VItem.js.map