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.

VMessages.js 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. require('../../../src/stylus/components/_messages.styl');
  6. var _colorable = require('../../mixins/colorable');
  7. var _colorable2 = _interopRequireDefault(_colorable);
  8. var _themeable = require('../../mixins/themeable');
  9. var _themeable2 = _interopRequireDefault(_themeable);
  10. var _mixins = require('../../util/mixins');
  11. var _mixins2 = _interopRequireDefault(_mixins);
  12. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  13. /* @vue/component */
  14. // Styles
  15. exports.default = (0, _mixins2.default)(_colorable2.default, _themeable2.default).extend({
  16. name: 'v-messages',
  17. props: {
  18. value: {
  19. type: Array,
  20. default: function _default() {
  21. return [];
  22. }
  23. }
  24. },
  25. methods: {
  26. genChildren: function genChildren() {
  27. return this.$createElement('transition-group', {
  28. staticClass: 'v-messages__wrapper',
  29. attrs: {
  30. name: 'message-transition',
  31. tag: 'div'
  32. }
  33. }, this.value.map(this.genMessage));
  34. },
  35. genMessage: function genMessage(message, key) {
  36. return this.$createElement('div', {
  37. staticClass: 'v-messages__message',
  38. key: key,
  39. domProps: {
  40. innerHTML: message
  41. }
  42. });
  43. }
  44. },
  45. render: function render(h) {
  46. return h('div', this.setTextColor(this.color, {
  47. staticClass: 'v-messages',
  48. class: this.themeClasses
  49. }), [this.genChildren()]);
  50. }
  51. });
  52. // Mixins
  53. //# sourceMappingURL=VMessages.js.map