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.

VSystemBar.js 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. require('../../../src/stylus/components/_system-bars.styl');
  7. var _applicationable = require('../../mixins/applicationable');
  8. var _applicationable2 = _interopRequireDefault(_applicationable);
  9. var _colorable = require('../../mixins/colorable');
  10. var _colorable2 = _interopRequireDefault(_colorable);
  11. var _themeable = require('../../mixins/themeable');
  12. var _themeable2 = _interopRequireDefault(_themeable);
  13. var _mixins = require('../../util/mixins');
  14. var _mixins2 = _interopRequireDefault(_mixins);
  15. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  16. exports.default = (0, _mixins2.default)((0, _applicationable2.default)('bar', ['height', 'window']), _colorable2.default, _themeable2.default
  17. /* @vue/component */
  18. ).extend({
  19. name: 'v-system-bar',
  20. props: {
  21. height: {
  22. type: [Number, String],
  23. validator: function validator(v) {
  24. return !isNaN(parseInt(v));
  25. }
  26. },
  27. lightsOut: Boolean,
  28. status: Boolean,
  29. window: Boolean
  30. },
  31. computed: {
  32. classes: function classes() {
  33. return _extends({
  34. 'v-system-bar--lights-out': this.lightsOut,
  35. 'v-system-bar--absolute': this.absolute,
  36. 'v-system-bar--fixed': !this.absolute && (this.app || this.fixed),
  37. 'v-system-bar--status': this.status,
  38. 'v-system-bar--window': this.window
  39. }, this.themeClasses);
  40. },
  41. computedHeight: function computedHeight() {
  42. if (this.height) return parseInt(this.height);
  43. return this.window ? 32 : 24;
  44. }
  45. },
  46. methods: {
  47. /**
  48. * Update the application layout
  49. *
  50. * @return {number}
  51. */
  52. updateApplication: function updateApplication() {
  53. return this.computedHeight;
  54. }
  55. },
  56. render: function render(h) {
  57. var data = {
  58. staticClass: 'v-system-bar',
  59. 'class': this.classes,
  60. style: {
  61. height: this.computedHeight + 'px'
  62. }
  63. };
  64. return h('div', this.setBackgroundColor(this.color, data), this.$slots.default);
  65. }
  66. });
  67. //# sourceMappingURL=VSystemBar.js.map