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/mixins/measurable/index.js
2019-08-11 20:48:02 +02:00

35 lines
No EOL
1 KiB
JavaScript

// Helpers
import { convertToUnit } from '../../util/helpers'; // Types
import Vue from 'vue';
export default Vue.extend({
name: 'measurable',
props: {
height: [Number, String],
maxHeight: [Number, String],
maxWidth: [Number, String],
minHeight: [Number, String],
minWidth: [Number, String],
width: [Number, String]
},
computed: {
measurableStyles() {
const styles = {};
const height = convertToUnit(this.height);
const minHeight = convertToUnit(this.minHeight);
const minWidth = convertToUnit(this.minWidth);
const maxHeight = convertToUnit(this.maxHeight);
const maxWidth = convertToUnit(this.maxWidth);
const width = convertToUnit(this.width);
if (height) styles.height = height;
if (minHeight) styles.minHeight = minHeight;
if (minWidth) styles.minWidth = minWidth;
if (maxHeight) styles.maxHeight = maxHeight;
if (maxWidth) styles.maxWidth = maxWidth;
if (width) styles.width = width;
return styles;
}
}
});
//# sourceMappingURL=index.js.map