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

123456789101112131415161718192021222324252627282930
  1. // Mixins
  2. import Colorable from './colorable';
  3. // Utilities
  4. import mixins from '../util/mixins';
  5. /* @vue/component */
  6. export default mixins(Colorable).extend({
  7. methods: {
  8. genPickerButton: function genPickerButton(prop, value, content) {
  9. var _this = this;
  10. var readonly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  11. var staticClass = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';
  12. var active = this[prop] === value;
  13. var click = function click(event) {
  14. event.stopPropagation();
  15. _this.$emit('update:' + prop, value);
  16. };
  17. return this.$createElement('div', {
  18. staticClass: ('v-picker__title__btn ' + staticClass).trim(),
  19. 'class': {
  20. 'v-picker__title__btn--active': active,
  21. 'v-picker__title__btn--readonly': readonly
  22. },
  23. on: active || readonly ? undefined : { click: click }
  24. }, Array.isArray(content) ? content : [content]);
  25. }
  26. }
  27. });
  28. //# sourceMappingURL=picker-button.js.map