This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/vuetify/lib/components/VFooter/VFooter.js
2019-08-11 20:48:02 +02:00

88 lines
No EOL
2.3 KiB
JavaScript

// Styles
import "../../../src/components/VFooter/VFooter.sass"; // Mixins
import Applicationable from '../../mixins/applicationable';
import VSheet from '../VSheet/VSheet';
import SSRBootable from '../../mixins/ssr-bootable'; // Utilities
import mixins from '../../util/mixins';
import { convertToUnit } from '../../util/helpers';
/* @vue/component */
export default mixins(VSheet, Applicationable('footer', ['height', 'inset']), SSRBootable).extend({
name: 'v-footer',
props: {
height: {
default: 'auto',
type: [Number, String]
},
inset: Boolean,
padless: Boolean,
tile: {
type: Boolean,
default: true
}
},
computed: {
applicationProperty() {
return this.inset ? 'insetFooter' : 'footer';
},
classes() {
return { ...VSheet.options.computed.classes.call(this),
'v-footer--absolute': this.absolute,
'v-footer--fixed': !this.absolute && (this.app || this.fixed),
'v-footer--padless': this.padless,
'v-footer--inset': this.inset
};
},
computedBottom() {
if (!this.isPositioned) return undefined;
return this.app ? this.$vuetify.application.bottom : 0;
},
computedLeft() {
if (!this.isPositioned) return undefined;
return this.app && this.inset ? this.$vuetify.application.left : 0;
},
computedRight() {
if (!this.isPositioned) return undefined;
return this.app && this.inset ? this.$vuetify.application.right : 0;
},
isPositioned() {
return Boolean(this.absolute || this.fixed || this.app);
},
styles() {
const height = parseInt(this.height);
return { ...VSheet.options.computed.styles.call(this),
height: isNaN(height) ? height : convertToUnit(height),
left: convertToUnit(this.computedLeft),
right: convertToUnit(this.computedRight),
bottom: convertToUnit(this.computedBottom)
};
}
},
methods: {
updateApplication() {
const height = parseInt(this.height);
return isNaN(height) ? this.$el ? this.$el.clientHeight : 0 : height;
}
},
render(h) {
const data = this.setBackgroundColor(this.color, {
staticClass: 'v-footer',
class: this.classes,
style: this.styles
});
return h('footer', data, this.$slots.default);
}
});
//# sourceMappingURL=VFooter.js.map