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.

picker-button.js 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _colorable = require('./colorable');
  6. var _colorable2 = _interopRequireDefault(_colorable);
  7. var _mixins = require('../util/mixins');
  8. var _mixins2 = _interopRequireDefault(_mixins);
  9. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10. /* @vue/component */
  11. // Mixins
  12. exports.default = (0, _mixins2.default)(_colorable2.default).extend({
  13. methods: {
  14. genPickerButton: function genPickerButton(prop, value, content) {
  15. var _this = this;
  16. var readonly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  17. var staticClass = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';
  18. var active = this[prop] === value;
  19. var click = function click(event) {
  20. event.stopPropagation();
  21. _this.$emit('update:' + prop, value);
  22. };
  23. return this.$createElement('div', {
  24. staticClass: ('v-picker__title__btn ' + staticClass).trim(),
  25. 'class': {
  26. 'v-picker__title__btn--active': active,
  27. 'v-picker__title__btn--readonly': readonly
  28. },
  29. on: active || readonly ? undefined : { click: click }
  30. }, Array.isArray(content) ? content : [content]);
  31. }
  32. }
  33. });
  34. // Utilities
  35. //# sourceMappingURL=picker-button.js.map