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.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. 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; }
  2. // Mixins
  3. import { factory as GroupableFactory } from '../../mixins/groupable';
  4. // Utilities
  5. import mixins from '../../util/mixins';
  6. import { consoleWarn } from '../../util/console';
  7. export default mixins(GroupableFactory('itemGroup', 'v-item', 'v-item-group')
  8. /* @vue/component */
  9. ).extend({
  10. name: 'v-item',
  11. props: {
  12. value: {
  13. required: false
  14. }
  15. },
  16. render: function render() {
  17. if (!this.$scopedSlots.default) {
  18. consoleWarn('v-item is missing a default scopedSlot', this);
  19. return null;
  20. }
  21. var element = void 0;
  22. /* istanbul ignore else */
  23. if (this.$scopedSlots.default) {
  24. element = this.$scopedSlots.default({
  25. active: this.isActive,
  26. toggle: this.toggle
  27. });
  28. }
  29. if (Array.isArray(element) && element.length === 1) {
  30. element = element[0];
  31. }
  32. if (!element || Array.isArray(element) || !element.tag) {
  33. consoleWarn('v-item should only contain a single element', this);
  34. return element;
  35. }
  36. element.data = this._b(element.data || {}, element.tag, {
  37. class: _defineProperty({}, this.activeClass, this.isActive)
  38. });
  39. return element;
  40. }
  41. });
  42. //# sourceMappingURL=VItem.js.map