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.

VAvatar.js 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  6. // Mixins
  7. require('../../../src/stylus/components/_avatars.styl');
  8. var _colorable = require('../../mixins/colorable');
  9. var _colorable2 = _interopRequireDefault(_colorable);
  10. var _helpers = require('../../util/helpers');
  11. var _mixins = require('../../util/mixins');
  12. var _mixins2 = _interopRequireDefault(_mixins);
  13. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  14. /* @vue/component */
  15. exports.default = (0, _mixins2.default)(_colorable2.default).extend({
  16. name: 'v-avatar',
  17. functional: true,
  18. props: {
  19. // TODO: inherit these
  20. color: String,
  21. size: {
  22. type: [Number, String],
  23. default: 48
  24. },
  25. tile: Boolean
  26. },
  27. render: function render(h, _ref) {
  28. var data = _ref.data,
  29. props = _ref.props,
  30. children = _ref.children;
  31. data.staticClass = ('v-avatar ' + (data.staticClass || '')).trim();
  32. if (props.tile) data.staticClass += ' v-avatar--tile';
  33. var size = (0, _helpers.convertToUnit)(props.size);
  34. data.style = _extends({
  35. height: size,
  36. width: size
  37. }, data.style);
  38. return h('div', _colorable2.default.options.methods.setBackgroundColor(props.color, data), children);
  39. }
  40. });
  41. //# sourceMappingURL=VAvatar.js.map