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.

VBottomNav.js 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. require('../../../src/stylus/components/_bottom-navs.styl');
  6. var _applicationable = require('../../mixins/applicationable');
  7. var _applicationable2 = _interopRequireDefault(_applicationable);
  8. var _buttonGroup = require('../../mixins/button-group');
  9. var _buttonGroup2 = _interopRequireDefault(_buttonGroup);
  10. var _colorable = require('../../mixins/colorable');
  11. var _colorable2 = _interopRequireDefault(_colorable);
  12. var _themeable = require('../../mixins/themeable');
  13. var _themeable2 = _interopRequireDefault(_themeable);
  14. var _mixins = require('../../util/mixins');
  15. var _mixins2 = _interopRequireDefault(_mixins);
  16. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  17. // Styles
  18. exports.default = (0, _mixins2.default)((0, _applicationable2.default)('bottom', ['height', 'value']), _colorable2.default, _themeable2.default
  19. /* @vue/component */
  20. ).extend({
  21. name: 'v-bottom-nav',
  22. props: {
  23. active: [Number, String],
  24. mandatory: Boolean,
  25. height: {
  26. default: 56,
  27. type: [Number, String],
  28. validator: function validator(v) {
  29. return !isNaN(parseInt(v));
  30. }
  31. },
  32. shift: Boolean,
  33. value: null
  34. },
  35. computed: {
  36. classes: function classes() {
  37. return {
  38. 'v-bottom-nav--absolute': this.absolute,
  39. 'v-bottom-nav--fixed': !this.absolute && (this.app || this.fixed),
  40. 'v-bottom-nav--shift': this.shift,
  41. 'v-bottom-nav--active': this.value
  42. };
  43. },
  44. computedHeight: function computedHeight() {
  45. return parseInt(this.height);
  46. }
  47. },
  48. methods: {
  49. updateApplication: function updateApplication() {
  50. return !this.value ? 0 : this.computedHeight;
  51. },
  52. updateValue: function updateValue(val) {
  53. this.$emit('update:active', val);
  54. }
  55. },
  56. render: function render(h) {
  57. return h(_buttonGroup2.default, this.setBackgroundColor(this.color, {
  58. staticClass: 'v-bottom-nav',
  59. class: this.classes,
  60. style: {
  61. height: parseInt(this.computedHeight) + 'px'
  62. },
  63. props: {
  64. mandatory: Boolean(this.mandatory || this.active !== undefined),
  65. value: this.active
  66. },
  67. on: { change: this.updateValue }
  68. }), this.$slots.default);
  69. }
  70. });
  71. // Util
  72. // Mixins
  73. //# sourceMappingURL=VBottomNav.js.map