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.

measurable.js 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _helpers = require('../util/helpers');
  6. var _vue = require('vue');
  7. var _vue2 = _interopRequireDefault(_vue);
  8. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  9. // Helpers
  10. exports.default = _vue2.default.extend({
  11. name: 'measurable',
  12. props: {
  13. height: [Number, String],
  14. maxHeight: [Number, String],
  15. maxWidth: [Number, String],
  16. minHeight: [Number, String],
  17. minWidth: [Number, String],
  18. width: [Number, String]
  19. },
  20. computed: {
  21. measurableStyles: function measurableStyles() {
  22. var styles = {};
  23. var height = (0, _helpers.convertToUnit)(this.height);
  24. var minHeight = (0, _helpers.convertToUnit)(this.minHeight);
  25. var minWidth = (0, _helpers.convertToUnit)(this.minWidth);
  26. var maxHeight = (0, _helpers.convertToUnit)(this.maxHeight);
  27. var maxWidth = (0, _helpers.convertToUnit)(this.maxWidth);
  28. var width = (0, _helpers.convertToUnit)(this.width);
  29. if (height) styles.height = height;
  30. if (minHeight) styles.minHeight = minHeight;
  31. if (minWidth) styles.minWidth = minWidth;
  32. if (maxHeight) styles.maxHeight = maxHeight;
  33. if (maxWidth) styles.maxWidth = maxWidth;
  34. if (width) styles.width = width;
  35. return styles;
  36. }
  37. }
  38. });
  39. // Types
  40. //# sourceMappingURL=measurable.js.map