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.

loadable.js 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _vue = require('vue');
  6. var _vue2 = _interopRequireDefault(_vue);
  7. var _VProgressLinear = require('../components/VProgressLinear');
  8. var _VProgressLinear2 = _interopRequireDefault(_VProgressLinear);
  9. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10. /**
  11. * Loadable
  12. *
  13. * @mixin
  14. *
  15. * Used to add linear progress bar to components
  16. * Can use a default bar with a specific color
  17. * or designate a custom progress linear bar
  18. */
  19. /* @vue/component */
  20. exports.default = _vue2.default.extend().extend({
  21. name: 'loadable',
  22. props: {
  23. loading: {
  24. type: [Boolean, String],
  25. default: false
  26. }
  27. },
  28. methods: {
  29. genProgress: function genProgress() {
  30. if (this.loading === false) return null;
  31. return this.$slots.progress || this.$createElement(_VProgressLinear2.default, {
  32. props: {
  33. color: this.loading === true || this.loading === '' ? this.color || 'primary' : this.loading,
  34. height: 2,
  35. indeterminate: true
  36. }
  37. });
  38. }
  39. }
  40. });
  41. //# sourceMappingURL=loadable.js.map