UNPKG

vuetify

Version:

Vue.js 2 Semantic Component Framework

79 lines (62 loc) 1.96 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); require('../../../src/stylus/components/_system-bars.styl'); var _applicationable = require('../../mixins/applicationable'); var _applicationable2 = _interopRequireDefault(_applicationable); var _colorable = require('../../mixins/colorable'); var _colorable2 = _interopRequireDefault(_colorable); var _themeable = require('../../mixins/themeable'); var _themeable2 = _interopRequireDefault(_themeable); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = { name: 'v-system-bar', mixins: [(0, _applicationable2.default)('bar', ['height', 'window']), _colorable2.default, _themeable2.default], props: { height: { type: [Number, String], validator: function validator(v) { return !isNaN(parseInt(v)); } }, lightsOut: Boolean, status: Boolean, window: Boolean }, computed: { classes: function classes() { return this.addBackgroundColorClassChecks(Object.assign({ 'system-bar--lights-out': this.lightsOut, 'system-bar--absolute': this.absolute, 'system-bar--fixed': !this.absolute && (this.app || this.fixed), 'system-bar--status': this.status, 'system-bar--window': this.window }, this.themeClasses)); }, computedHeight: function computedHeight() { if (this.height) return parseInt(this.height); return this.window ? 32 : 24; } }, methods: { /** * Update the application layout * * @return {number} */ updateApplication: function updateApplication() { return this.computedHeight; } }, render: function render(h) { var data = { staticClass: 'system-bar', 'class': this.classes, style: { height: this.computedHeight + 'px' } }; return h('div', data, this.$slots.default); } };