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.

VFooter.js 3.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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; }; // Styles
  6. // Mixins
  7. require('../../../src/stylus/components/_footer.styl');
  8. var _applicationable = require('../../mixins/applicationable');
  9. var _applicationable2 = _interopRequireDefault(_applicationable);
  10. var _colorable = require('../../mixins/colorable');
  11. var _colorable2 = _interopRequireDefault(_colorable);
  12. var _themeable = require('../../mixins/themeable');
  13. var _themeable2 = _interopRequireDefault(_themeable);
  14. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  15. /* @vue/component */
  16. exports.default = {
  17. name: 'v-footer',
  18. mixins: [(0, _applicationable2.default)(null, ['height', 'inset']), _colorable2.default, _themeable2.default],
  19. props: {
  20. height: {
  21. default: 32,
  22. type: [Number, String]
  23. },
  24. inset: Boolean
  25. },
  26. computed: {
  27. applicationProperty: function applicationProperty() {
  28. return this.inset ? 'insetFooter' : 'footer';
  29. },
  30. computedMarginBottom: function computedMarginBottom() {
  31. if (!this.app) return;
  32. return this.$vuetify.application.bottom;
  33. },
  34. computedPaddingLeft: function computedPaddingLeft() {
  35. return !this.app || !this.inset ? 0 : this.$vuetify.application.left;
  36. },
  37. computedPaddingRight: function computedPaddingRight() {
  38. return !this.app || !this.inset ? 0 : this.$vuetify.application.right;
  39. },
  40. styles: function styles() {
  41. var styles = {
  42. height: isNaN(this.height) ? this.height : this.height + 'px'
  43. };
  44. if (this.computedPaddingLeft) {
  45. styles.paddingLeft = this.computedPaddingLeft + 'px';
  46. }
  47. if (this.computedPaddingRight) {
  48. styles.paddingRight = this.computedPaddingRight + 'px';
  49. }
  50. if (this.computedMarginBottom) {
  51. styles.marginBottom = this.computedMarginBottom + 'px';
  52. }
  53. return styles;
  54. }
  55. },
  56. methods: {
  57. /**
  58. * Update the application layout
  59. *
  60. * @return {number}
  61. */
  62. updateApplication: function updateApplication() {
  63. var height = parseInt(this.height);
  64. return isNaN(height) ? this.$el ? this.$el.clientHeight : 0 : height;
  65. }
  66. },
  67. render: function render(h) {
  68. var data = this.setBackgroundColor(this.color, {
  69. staticClass: 'v-footer',
  70. 'class': _extends({
  71. 'v-footer--absolute': this.absolute,
  72. 'v-footer--fixed': !this.absolute && (this.app || this.fixed),
  73. 'v-footer--inset': this.inset
  74. }, this.themeClasses),
  75. style: this.styles,
  76. ref: 'content'
  77. });
  78. return h('footer', data, this.$slots.default);
  79. }
  80. };
  81. //# sourceMappingURL=VFooter.js.map