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

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