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 2.8KB

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