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.

VPicker.js 3.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  6. // Mixins
  7. // Helpers
  8. require('../../../src/stylus/components/_pickers.styl');
  9. require('../../../src/stylus/components/_cards.styl');
  10. var _colorable = require('../../mixins/colorable');
  11. var _colorable2 = _interopRequireDefault(_colorable);
  12. var _themeable = require('../../mixins/themeable');
  13. var _themeable2 = _interopRequireDefault(_themeable);
  14. var _helpers = require('../../util/helpers');
  15. var _mixins = require('../../util/mixins');
  16. var _mixins2 = _interopRequireDefault(_mixins);
  17. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  18. /* @vue/component */
  19. exports.default = (0, _mixins2.default)(_colorable2.default, _themeable2.default).extend({
  20. name: 'v-picker',
  21. props: {
  22. fullWidth: Boolean,
  23. landscape: Boolean,
  24. transition: {
  25. type: String,
  26. default: 'fade-transition'
  27. },
  28. width: {
  29. type: [Number, String],
  30. default: 290
  31. }
  32. },
  33. computed: {
  34. computedTitleColor: function computedTitleColor() {
  35. var defaultTitleColor = this.isDark ? false : this.color || 'primary';
  36. return this.color || defaultTitleColor;
  37. }
  38. },
  39. methods: {
  40. genTitle: function genTitle() {
  41. return this.$createElement('div', this.setBackgroundColor(this.computedTitleColor, {
  42. staticClass: 'v-picker__title',
  43. 'class': {
  44. 'v-picker__title--landscape': this.landscape
  45. }
  46. }), this.$slots.title);
  47. },
  48. genBodyTransition: function genBodyTransition() {
  49. return this.$createElement('transition', {
  50. props: {
  51. name: this.transition
  52. }
  53. }, this.$slots.default);
  54. },
  55. genBody: function genBody() {
  56. return this.$createElement('div', {
  57. staticClass: 'v-picker__body',
  58. 'class': this.themeClasses,
  59. style: this.fullWidth ? undefined : {
  60. width: (0, _helpers.convertToUnit)(this.width)
  61. }
  62. }, [this.genBodyTransition()]);
  63. },
  64. genActions: function genActions() {
  65. return this.$createElement('div', {
  66. staticClass: 'v-picker__actions v-card__actions'
  67. }, this.$slots.actions);
  68. }
  69. },
  70. render: function render(h) {
  71. return h('div', {
  72. staticClass: 'v-picker v-card',
  73. 'class': _extends({
  74. 'v-picker--landscape': this.landscape,
  75. 'v-picker--full-width': this.fullWidth
  76. }, this.themeClasses)
  77. }, [this.$slots.title ? this.genTitle() : null, this.genBody(), this.$slots.actions ? this.genActions() : null]);
  78. }
  79. });
  80. //# sourceMappingURL=VPicker.js.map